[RFC/PATCH] buildsys: cache build flags in vars

Khem Raj raj.khem at gmail.com
Tue Jan 17 02:39:34 UTC 2012


On Mon, Jan 16, 2012 at 6:12 PM, Mike Frysinger <vapier at gentoo.org> wrote:
>
> you don't check linker flags via gcc.  you check the linker flags via the
> linker.  this is why the cache funcs setup additional variables for use via
> the compiler driver.

right and one of those additional variables gets set wrongly to be used by gcc
and its used as well what gcc gets is

gcc ... -Wl,--sort-sections alignment ....

and then complains that it does not know anything about 'alignment'
the right options to gcc would have been

gcc ... -Wl,--sort-sections -Wl,alignment ....

so computing CFLAG_-Wl* flags does not do the right thing in above case

see this commit 9e886c4836f3598f89631489fd380d3241e92897
how it handles the option where it enquires the bare ld with the right syntax
and then adds the options to CPU_LDFLAGS-y in a way that would be accepted
by gcc driver


More information about the uClibc mailing list