This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: ARM Multilib libc - make install only copies the default libc.a file to the toolchain directory.
- From: "Gibson, David" <David dot Gibson at analog dot com>
- To: James Walmsley <james at fullfat-fs dot co dot uk>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 19 Nov 2013 16:00:28 +0000
- Subject: RE: ARM Multilib libc - make install only copies the default libc.a file to the toolchain directory.
- Authentication-results: sourceware.org; auth=none
- References: <8a302e579c8048f999a44c39bc85a02b at DB3PR04MB203 dot eurprd04 dot prod dot outlook dot com>,<DEE282494B151642A2C7A978F0E6129E0A666B5C at NWD2MBX5 dot ad dot analog dot com>,<f3cd9617ea0841b1bb8886feb9dbe5e2 at DB3PR04MB203 dot eurprd04 dot prod dot outlook dot com>
See,
this is exactly why I don't like multilib. It's great for a simple configuration but once you try and do something clever the config file just spirals out of control.
I think* that there's something wrong in that you've added a multilib option for mfpu=neon and then added the very same switch on it's own as an exception (second line from botton).
Have you tried using the -print-multilib switch to see what multilibs GCC ended up with?
I'd also recommend taking a look at Ian Lance Taylor's Configuration guide for GCC. (http://airs.com/ian/configure/configure_toc.html)
It's the closest thing you'll find to documentation on multilib.
Sorry I can't be more helpful,
Dave
* I say think as I'm far from an expert on multilib files.
________________________________________
From: James Walmsley [james@fullfat-fs.co.uk]
Sent: 19 November 2013 15:38
To: Gibson, David; newlib@sourceware.org
Subject: RE: ARM Multilib libc - make install only copies the default libc.a file to the toolchain directory.
Hi David,
>> Have you configured the appropriate multilib configuration file in GCC to define the appropriate multilib definitions for your compiler?
>> For example, with the bare metal toolchain take a look at gcc/config/arm/t-arm-elf (Assuming you're building a bare metal toolchain).
>> You can uncomment the appropriate lines in there to support the processors you want to produce libs for.
I created my own file, based on the rtems example:
# Custom BT EABI multilibs
MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
# Enumeration of multilibs
MULTILIB_EXCEPTIONS =
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m
#MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
#MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
#MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
#MULTILIB_EXCEPTIONS += march=armv7-a
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mfpu=neon
MULTILIB_EXCEPTIONS += mfloat-abi=hard
Do you think the last exceptions also disable my -mfloat-abi=hard when -march=armv7-a is enabled.
I see the t-arm-elf uses matches rather than exceptions.
>> If you're building a cross compiler you'll typically build the first stage gcc without multilibs, and only enable them (add --enable-multilib) and build the appropriate libraries during the second stage build.
I have --enable-multilibs enabled for both stages, I shall change this and try again.
>> Hope that helps.
>> Dave
Many thanks, I'm beginning to understand this stuff now.
James