From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matej Kupljen Date: Wed, 17 Aug 2005 10:24:54 +0200 Subject: [U-Boot-Users] Re: MIPS LE build problems In-Reply-To: <20050817080842.36E19353CFF@atlas.denx.de> References: <20050817080842.36E19353CFF@atlas.denx.de> Message-ID: <1124267094.16175.30.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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