Genkernel: unrecognized option '-Wl,-O1' [Solved]

Anything that pertains to Portage

Moderator: Moderators

Post Reply
Old Dear Hen
Posts: 742
Joined: Mon Jul 09, 2007 20:29
Location: Mobile, AL, USA

Genkernel: unrecognized option '-Wl,-O1' [Solved]

Post by DontPanic » Tue Nov 25, 2008 20:56

With the latest versions of genkernel (>=3.4.10), I've been having a problem with emerging the sys-kernel/linux-sabayon package with an error such as:

Code: Select all

ld: unrecognized option '-Wl,-O1'
ld: use the --help option for usage information
make[1]: *** [applets/built-in.o] Error 1
make: *** [applets] Error 2
make: *** Waiting for unfinished jobs....
I've found this is related to poor handling of the LDFLAGS setting in my make.conf.

LDFLAGS="-Wl,-O1" is supposed to be a fairly safe LDFLAGS setting (I thought), but it is causing a problem in the latest genkernel (see Gentoo bug report).

My solution is to emerge the sys-kernel/linux-sabayon package with LDFLAGS over-ridden from the command line:

Code: Select all

LDFLAGS="" emerge -av sys-kernel/linux-sabayon
Oddly enough, I don't get this problem when running genkernel directly from the command line, but only when invoking genkernel via emerging the kernel packages. I guess genkernel won't otherwise look at your make.conf.

If anybody else has come up with alternative solutions, please post them here.
Gigabyte GA-P35-DS3L - Intel(R) Core(TM)2 Duo CPU [email protected] 2.66GHz
nVidia GeForce 7600 GS

Post Reply