Unix Technical Forum

Gentoo and CFLAGS="... -Wl,--as-needed"

This is a discussion on Gentoo and CFLAGS="... -Wl,--as-needed" within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hi, Just read http://osnews.com/story.php?news_id=10152 and wants to know if this it OK with emerge in general, seeams to work ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 09:38 AM
Lars H.
 
Posts: n/a
Default Gentoo and CFLAGS="... -Wl,--as-needed"

Hi,

Just read
http://osnews.com/story.php?news_id=10152

and wants to know if this it OK with emerge in general, seeams to work for
me.



P4_2400 root # emerge --info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 i686)
================================================== ===============
System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005,
18:22:45)]
ccache version 2.3 [enabled]
dev-lang/python: 2.3.4-r1
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4, 1.8.5-r3
sys-devel/binutils: 2.15.92.0.2-r1
sys-devel/libtool: 1.5.10-r4
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -march=pentium4 -pipe -Wl,--as-needed"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -march=pentium4 -pipe -Wl,--as-needed"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.pudas.net/gentoo
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts cdparanoia cdr
codecs crypt cscope css cups curl doc dvd dvdread emboss encode esd fam
flac foomaticdb fortran gdbm gif gnome gpm gtk gtk2 i8x0 imagemagick imlib
java jpeg junit kde libg++ libwww lm_sensors mad mikmod motif mozilla mp3
mpeg mysql ncurses nls nvidia oggvorbis opengl oss pam pdflib perl png
python qt quicktime readline sdl slang spell ssl svga tcpd tetex tiff
truetype truetype-fonts type1-fonts v4l2 xml2 xmms xv zlib"
Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS

P4_2400 root #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 09:38 AM
Lars H.
 
Posts: n/a
Default Re: Gentoo and CFLAGS="... -Wl,--as-needed"


OK well, have found that LDFLAGS is the right way of doing this.

As "emerge --info" shows nothing sat for LDFLAGS I guess "gentoo" is not
using any value for LDFLAGS.

But then again what is then the default value of LDFLAGS that is safe for
most emerges.

I'm trying to go with..
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

Anyone having experience with LDFLAGS ?


Lars H. wrote:

> Hi,
>
> Just read
> http://osnews.com/story.php?news_id=10152
>
> and wants to know if this it OK with emerge in general, seeams to work for
> me.
>
>
>
> P4_2400 root # emerge --info
> Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5,
> glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 i686)
> ================================================== ===============
> System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
> Gentoo Base System version 1.4.16
> Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005,
> 18:22:45)]
> ccache version 2.3 [enabled]
> dev-lang/python: 2.3.4-r1
> sys-devel/autoconf: 2.13, 2.59-r6
> sys-devel/automake: 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4, 1.8.5-r3
> sys-devel/binutils: 2.15.92.0.2-r1
> sys-devel/libtool: 1.5.10-r4
> virtual/os-headers: 2.6.8.1-r2
> ACCEPT_KEYWORDS="x86"
> AUTOCLEAN="yes"
> CFLAGS="-O2 -mcpu=i686 -march=pentium4 -pipe -Wl,--as-needed"
> CHOST="i686-pc-linux-gnu"
> CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
> /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
> /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
> /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
> /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
> /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf
> /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -march=pentium4 -pipe
> -Wl,--as-needed" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs
> autoconfig ccache distlocks sandbox sfperms"
> GENTOO_MIRRORS="ftp://mirror.pudas.net/gentoo
> ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
> http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo"
> MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp"
> PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage"
> SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apache2 apm
> arts avi berkdb bitmap-fonts cdparanoia cdr codecs crypt cscope css cups
> curl doc dvd dvdread emboss encode esd fam flac foomaticdb fortran gdbm
> gif gnome gpm gtk gtk2 i8x0 imagemagick imlib java jpeg junit kde libg++
> libwww lm_sensors mad mikmod motif mozilla mp3 mpeg mysql ncurses nls
> nvidia oggvorbis opengl oss pam pdflib perl png python qt quicktime
> readline sdl slang spell ssl svga tcpd tetex tiff truetype truetype-fonts
> type1-fonts v4l2 xml2 xmms xv zlib"
> Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
>
> P4_2400 root #


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 09:38 AM
ric_man
 
Posts: n/a
Default Re: Gentoo and CFLAGS="... -Wl,--as-needed"

Lars H. wrote:
> OK well, have found that LDFLAGS is the right way of doing this.
>
> As "emerge --info" shows nothing sat for LDFLAGS I guess "gentoo" is not
> using any value for LDFLAGS.
>
> But then again what is then the default value of LDFLAGS that is safe for
> most emerges.
>
> I'm trying to go with..
> LDFLAGS="-Wl,-O1 -Wl,--as-needed"
>
> Anyone having experience with LDFLAGS ?


Can't say personal experience, but found these two threads in the Gentoo
forums that may be able to assist:

http://forums.gentoo.org/viewtopic-t-316445.html
http://forums.gentoo.org/viewtopic-t-316417.html

I'm interested in this too... I may give it a go and get back to you on
it...

HTH,

....Ric
--
Send email to Ric using: rdefrance_NO_SPAM_@_NO_SPAM_gmail.com
Just remove both instances of "_NO_SPAM_"
== Do you, uh... Gentoo? Gentoooo-hooo!! ==
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com