This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Cross compiling and multiple sysroot question
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Steve Ellcey <Steve dot Ellcey at imgtec dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 12 Jan 2015 20:05:51 +0000
- Subject: RE: Cross compiling and multiple sysroot question
- Authentication-results: sourceware.org; auth=none
- References: <023c43de-da14-4832-a95c-38ff7601a439 at BAMAIL02 dot ba dot imgtec dot org> <alpine dot DEB dot 2 dot 10 dot 1501082203560 dot 22036 at digraph dot polyomino dot org dot uk> <1421085908 dot 18579 dot 18 dot camel at ubuntu-sellcey> <alpine dot DEB dot 2 dot 10 dot 1501121850010 dot 31523 at digraph dot polyomino dot org dot uk>
> On Mon, 12 Jan 2015, Steve Ellcey wrote:
>
> > MULTILIB_OSDIRNAMES += mips32r2=mipsr2/lib MULTILIB_OSDIRNAMES +=
> > .=mipsr2/lib
> >
> > I don't think the first one would work because -mips32r2 is the
> > default architecture and is not explicitly listed in MULTILIB_OPTIONS
> > and I don't think the second form is supported at all, but maybe there
> > is some other way to specify the location of the default libraries?
>
> The default libraries for x86_64-linux-gnu go in ../lib64, so it's
> clearly possible by doing something sufficiently similar to how it's
> done for x86_64.
MIPS does this too for mips64-linux-gnu as it has n32 for the default
multilib which gets placed in lib32. I don't honestly know how the multilib
spec doesn't end up building 4 multilibs though. I'm assuming the fact
that the default ABI is added to the DRIVER_SELF_SPECS may be the reason.
t-linux64:
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
MULTILIB_OSDIRNAMES = \
../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
Matthew