Problem with multilib build

Ethan Du
Wed Apr 16 09:10:00 GMT 2008

Hi, guys:
   I am building gcc-4.2 for arm-none-linux-eabi. I want to build
multi lib, this is what I modified in gcc/config/arm/t-linux-eabi

MULTILIB_OPTIONS    += march=armv4t/mcpu=cortex-a8/march=armv7
MULTILIB_DIRNAMES   += armv4t cortex-a8 armv7
MULTILIB_EXCEPTIONS += *mthumb/*mcpu?cortex-a8*
MULTILIB_EXCEPTIONS += *mthumb/*march?armv4t*

# As of at least 4.2, gcc passes the wrong -L options if some multilibs are
MULTILIB_OSDIRNAMES    = mcpu.cortex-a8=!cortex-a8
MULTILIB_OSDIRNAMES   += march.armv4t=!armv4t
MULTILIB_OSDIRNAMES   += mthumb/march.armv7=!thumb2

   After the build, I did get some multilib folders:

// for armv4t, I got


// for cortex-a8, I got


 You see, "./arm-none-linux-gnueabi/lib/cortex-a8" was missing. After
gave a check I found the binaries should be placed under
"./arm-none-linux-gnueabi/lib/cortex-a8" was actually placed under

 My questions are:

 I was thinking config/arm/t-linux-eabi should be the only place need
to be modified for multilib build, is that right?

 I see libraries under ./arm-none-linux-gnueabi/lib/ is armv5, where
is this default arch value defined?

 I already have such a toolchain installed, but without the multilib
I want. To avoid a new install, I just copied the multilib folders to
the old toolchain, and used -specs=my_new_specs to try, I defined
multilib/multilib_options... in the specs file. But it didn't work.
When calling collect2, the library path for the command is not
pointing to my multilib folder. With debug option, I saw in "options
passed", there was a "-imultilib" missing. So, will changing specs be
enough or is re-install the only way to update my gcc?

 Will appraciate any hint!

PS: I was using a free codesourcery released gcc, but I think multilib
build should have no change between them.

- Ethan

More information about the Gcc-help mailing list