libstdc++ configure fail due to -EL option

Bryan Hundven bryanhundven@gmail.com
Mon Jan 23 21:08:00 GMT 2012


On Wed, Jan 18, 2012 at 2:28 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Wednesday 18 January 2012 02:09:09 Zhenqiang Chen wrote:
>> > -EL is only valid for mips gcc as far as ct-ng is concerned. It should
>> > not be used for arm configurations since arm is little endian by
>> > default pluis this is an invalid option you need
>> > -mlittle-endian for arm if you really want to specify it explicitly.
>>
>> -EL/-EB is added in crosstool-ng automatically. Here is the code
>> segment in scripts/functions
>>
>> CT_DoBuildTargetTuple() {
>>     # Set the endianness suffix, and the default endianness gcc option
>>     case "${CT_ARCH_ENDIAN}" in
>>         big)
>>             target_endian_eb=eb
>>             target_endian_el=
>>             CT_ARCH_ENDIAN_CFLAG="-mbig-endian"
>>             CT_ARCH_ENDIAN_LDFLAG="-EB"
>>             ;;
>>         little)
>>             target_endian_eb=
>>             target_endian_el=el
>>             CT_ARCH_ENDIAN_CFLAG="-mlittle-endian"
>>             CT_ARCH_ENDIAN_LDFLAG="-EL"
>>             ;;
>>     esac
>
> LDFLAGS should take the form as needed by the compiler driver.  i.e. -Wl,-EL.

Well, we'd get the same error if we pass -Wl,-EL to ld, where that
would fix it for passing to gcc.

Sounds like we should have:

  CT_ARCH_ENDIAN_GCC_LDFLAGS="-Wl,${CT_ARCH_ENDIAN_LDFLAG}"

for cases where we are passing LDFLAGS to gcc and not ld.

> i'm guessing some other code takes care of transforming this before exporting
> LDFLAGS to the build ?
> -mike

Not that I'm aware of. I'm running a test to see if that GCC_LDFLAGS
is even needed or not.
Thanks for the tip, Mike!

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list