When running genkernel everything is going well, until: * busybox: >> Applying patches... * busybox: >> Configuring... * busybox: >> Compiling... * ERROR: Failed to compile the "all" target... Snippet from genkernel.log: --------------------------- LD applets/built-in.o 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 So the linking fails. Reproducible: Always Steps to Reproduce: 1. use genkernel to create initramfs and kernel Actual Results: genkernel crashed doing linking (compiling busybox) Expected Results: A freshly squeezed kernel and initramfs with busybox. Funtoo amd64 stage (from yesterday) Running in automated build system. (chroot).
I resolved the bug myself (only minutes after filing the bug *sigh*). I was going to post my `emerge --info`, and noticed this interesting line: LDFLAGS="-Wl,-O1" Exactly what ld was complaining about. So. Setting LDFLAGS="" on the commandline solved the problem. Maybe LDFLAGS="-Wl,-O1" shouldn't be in /usr/portage/profiles/default/linux/make.defaults I guess the bug shouldn't be closed, as this still is a bug, unless I misunderstood something :)
(In reply to comment #1) > Maybe LDFLAGS="-Wl,-O1" shouldn't be in > /usr/portage/profiles/default/linux/make.defaults Or, it should be there (because I've had no previous problems), and genkernel should do something about it.
Probably it should just use something like raw-ldflags from flag-o-matic.eclass.
The vars defined by the portage profiles have very little to do with running portage, unless those vars leak into the env, which they apparently do not: kagome ~ # emerge --info | grep LDFLAGS LDFLAGS="-Wl,-O1" kagome ~ # echo "|${LDFLAGS}|" || You had to have "manually" set LDFLAGS in your env for it to bleed through like this. It's not really genkernel's job to sanitize the env.