diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config.in | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 2 | ||||
-rw-r--r-- | gcc/config/mips/t-linux64 | 21 | ||||
-rwxr-xr-x | gcc/configure | 4 | ||||
-rw-r--r-- | gcc/configure.ac | 3 |
5 files changed, 35 insertions, 1 deletions
diff --git a/gcc/config.in b/gcc/config.in index 5e41748a354..38ef792bd67 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -2324,6 +2324,12 @@ #endif +/* Specify if mutliarch is enabled. */ +#ifndef USED_FOR_TARGET +#undef ENABLE_MULTIARCH +#endif + + /* The size of `dev_t', as computed by sizeof. */ #ifndef USED_FOR_TARGET #undef SIZEOF_DEV_T diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 74b6e11aabb..fe7f5b274b9 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3427,6 +3427,7 @@ struct GTY(()) machine_function { /* If we are *not* using multilibs and the default ABI is not ABI_32 we need to change these from /lib and /usr/lib. */ +#ifndef ENABLE_MULTIARCH #if MIPS_ABI_DEFAULT == ABI_N32 #define STANDARD_STARTFILE_PREFIX_1 "/lib32/" #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/" @@ -3434,6 +3435,7 @@ struct GTY(()) machine_function { #define STANDARD_STARTFILE_PREFIX_1 "/lib64/" #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/" #endif +#endif /* Load store bonding is not supported by micromips and fix_24k. The performance can be degraded for those targets. Hence, do not bond for diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 index 2fdd8e00407..37d176ea309 100644 --- a/gcc/config/mips/t-linux64 +++ b/gcc/config/mips/t-linux64 @@ -20,7 +20,26 @@ 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 = \ +ifeq (yes,$(enable_multiarch)) + ifneq (,$(findstring gnuabi64,$(target))) + MULTILIB_OSDIRNAMES = \ + ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ + ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ + ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + else ifneq (,$(findstring gnuabin32,$(target))) + MULTILIB_OSDIRNAMES = \ + ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ + ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ + ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + else + 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)) + endif +else + 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)) +endif diff --git a/gcc/configure b/gcc/configure index c6def4c88e5..8e3c89b609e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7842,6 +7842,10 @@ if test x${enable_multiarch} = xauto; then enable_multiarch=no fi fi +if test x${enable_multiarch} = xyes; then + $as_echo "#define ENABLE_MULTIARCH 1" >>confdefs.h + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch configuration" >&5 $as_echo_n "checking for multiarch configuration... " >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index 45bf7560e6f..eb92a37cd46 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -887,6 +887,9 @@ if test x${enable_multiarch} = xauto; then enable_multiarch=no fi fi +if test x${enable_multiarch} = xyes; then + AC_DEFINE(ENABLE_MULTIARCH, 1) +fi AC_MSG_CHECKING(for multiarch configuration) AC_SUBST(enable_multiarch) AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) |