public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with multilib build
@ 2008-04-15  4:28 Ethan Du
  2008-04-16  9:10 ` Ethan Du
  0 siblings, 1 reply; 3+ messages in thread
From: Ethan Du @ 2008-04-15  4:28 UTC (permalink / raw)
  To: gcc-help

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     = mthumb
MULTILIB_DIRNAMES    = thumb
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*
MULTILIB_EXCEPTIONS += march=armv7*
MULTILIB_EXCEPTIONS += mthumb

# As of at least 4.2, gcc passes the wrong -L options if some multilibs are
# omitted from MULTILIB_OSDIRNAMES
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

./lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t
./arm-none-linux-gnueabi/lib/armv4t
./arm-none-linux-gnueabi/include/c++/4.2.0/arm-none-linux-gnueabi/armv4t

// for cortex-a8, I got

./lib/gcc/arm-none-linux-gnueabi/4.2.0/cortex-a8
./arm-none-linux-gnueabi/include/c++/4.2.0/arm-none-linux-gnueabi/cortex-a8


  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
"./arm-none-linux-gnueabi/lib".

  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Problem with multilib build
  2008-04-15  4:28 Problem with multilib build Ethan Du
@ 2008-04-16  9:10 ` Ethan Du
  2008-04-18 18:26   ` Jim Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Ethan Du @ 2008-04-16  9:10 UTC (permalink / raw)
  To: gcc-help, ethan.too

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     = mthumb
MULTILIB_DIRNAMES    = thumb
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*
MULTILIB_EXCEPTIONS += march=armv7*
MULTILIB_EXCEPTIONS += mthumb

# As of at least 4.2, gcc passes the wrong -L options if some multilibs are
# omitted from MULTILIB_OSDIRNAMES
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

./lib/gcc/arm-none-linux-gnueabi/4.2.0/armv4t
./arm-none-linux-gnueabi/lib/armv4t
./arm-none-linux-gnueabi/include/c++/4.2.0/arm-none-linux-gnueabi/armv4t

// for cortex-a8, I got

./lib/gcc/arm-none-linux-gnueabi/4.2.0/cortex-a8
./arm-none-linux-gnueabi/include/c++/4.2.0/arm-none-linux-gnueabi/cortex-a8


 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
"./arm-none-linux-gnueabi/lib".

 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with multilib build
  2008-04-16  9:10 ` Ethan Du
@ 2008-04-18 18:26   ` Jim Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Wilson @ 2008-04-18 18:26 UTC (permalink / raw)
  To: Ethan Du; +Cc: gcc-help

Ethan Du wrote:
>  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
> "./arm-none-linux-gnueabi/lib".

Check the multilib.h file in the build directory to make sure it is OK. 
  You also might be able to get some useful info by looking at the build 
files.

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

Normally, yes, though it depends on what you are trying to do.

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

Look for a definition of MULTILIB_DEFAULTS in one of the .h files.

>  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,

There is a multilib.h file created that is included by gcc.c.  You can't 
override this stuff via the specs files.  You need to build a new gcc 
driver.  You should not need to rebuild anything else.

Jim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-18 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-15  4:28 Problem with multilib build Ethan Du
2008-04-16  9:10 ` Ethan Du
2008-04-18 18:26   ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).