Toolchain setup-env LDFLAGS definition broken?
Mike (mwester)
mwester at dls.net
Mon May 12 07:41:47 CEST 2008
Nigel Cunningham wrote:
> Hi.
>
> Further to my email the other day, I changed the definition of LDFLAGS
> from
>
> export LDFLAGS="-L${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib -Wl,-rpath-link,${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib -Wl,-O1"
>
> to
>
> export LDFLAGS="-L${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib -rpath-link ${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib -O1"
>
> And I can now compile uboot. The help
> for /usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-ld makes no
> mention of accepting -Wl as an option, and -rpath-link should have a
> space, not a comma between the option and its parameter.
>
> I can't understand how this is working for anyone else.
The "-Wl" syntax is not an argument for ld directly; rather that syntax
is for gcc, and instructs gcc to pass the -rpath-link switch and
argument to ld.
So the problem is that the link phase is using ld directly when the
LDFLAGS variable seems to be constructed in such a fashion to be used by
gcc when gcc is doing the linking. One of the two is wrong; now the
trick is to figure out which it is.
> Nigel
Regards,
Mike (mwester)
More information about the openmoko-kernel
mailing list