
17 Aug
2005
17 Aug
'05
10:24 a.m.
Hi
So is there a clever way to "ask" gcc which endianess it's using? I tried to come up with one but failed so far...
You do something similar in the cpu/mips/config.mk where the version of assembler is checked and then appropriate flags are chosen. How about something like: # ${CROSS_COMPILE}gcc -dumpspecs
And check what is written under the *multilib_defaults, if it is EL or EB.
In my case (little endian): *multilib_defaults: EL mips1 mabi=32
And then add to LDFLAGS either -EL or -EB.
I am not a awk/sed/grep expert. :-( Maybe someone else who knows the tools can do that?
BR, Matej