Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135356 - klibc doesn't like "-Wl,"-style LDFLAGS
Summary: klibc doesn't like "-Wl,"-style LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Christian Heim (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-03 00:12 UTC by Ron MacNeil
Modified: 2007-05-20 16:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for klibc-1.2.1-r1.ebuild which fixes LDFLAGS-related breakage (patch-klibc-ldflags,695 bytes, patch)
2006-06-03 00:21 UTC, Ron MacNeil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ron MacNeil 2006-06-03 00:12:10 UTC
The following ld error occurs when building klibc with -Wl,... flags in LDFLAGS:

>>> Emerging (1 of 1) dev-libs/klibc-1.2.1-r1 to /
...
>>> Compiling source in /var/tmp/portage/klibc-1.2.1-r1/work/klibc-1.2.1 ...
  ...
  KLIBCLD klibc/syscalls/syscalls.o
ld: unrecognized option '-Wl,-O1'
ld: use the --help option for usage information
make[3]: *** [klibc/syscalls/syscalls.o] Error 1
make[2]: *** [klibc/syscalls] Error 2
make[1]: *** [all] Error 2
make: *** [klibc] Error 2



emerge --info
Portage 2.1_rc3 (default-linux/ppc/ppc32/2006.0/G4, gcc-4.1.1, glibc-2.3.6-r4, 2.6.15-gentoo-r1 ppc)
=================================================================
System uname: 2.6.15-gentoo-r1 ppc 7400, altivec supported
Gentoo Base System version 1.12.0
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=G4 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=G4 -maltivec -mabi=altivec"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.pacific.net.au/gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="ppc X aac alsa altivec apache2 apm berkdb cdr cli crypt dbus dri encode fbcon ffmpeg gdbm gif gpm gstreamer gtk2 hal imlib ipv6 jpeg kde libg++ libwww mad matroska mmap mono mp3 mpeg msn ncurses nls nptl nptlonly offensive ogg opengl pam pcre pdf pdflib perl pic png python qt quicktime readline reflection ruby session spl ssl svg tcpd theora tiff truetype truetype-fonts udev unicode usb vorbis wifi xml xmms xorg xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_r128 video_cards_rage128 video_cards_ati"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Ron MacNeil 2006-06-03 00:21:01 UTC
Created attachment 88242 [details, diff]
Patch for klibc-1.2.1-r1.ebuild which fixes LDFLAGS-related breakage

...and here's a proposed patch to the ebuild which adds LDFLAGS="$(raw-ldflags)" to the build and install command lines (which fixes the problem), although I have no idea whether this is the Right Thing to do.

Best,
Ron
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-07 06:29:24 UTC
Is this only on ppc ?  Because it works fine with LDFLAGS="-Wl,-O1" on amd64 and x86.
Comment 3 Ron MacNeil 2006-07-07 19:44:28 UTC
I can't say for sure, Martin, as I no longer have the PPC machine to test.  Can anyone else confirm whether this still happens on PPC?
Comment 4 Christian Heim (RETIRED) gentoo-dev 2007-05-20 16:56:52 UTC
This seems fixed w/ klibc-1.5, I just compiled it on a ppc32 box, and it didn't complain about any LDFLAGS (which I had defined via environment).