aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.h
diff options
context:
space:
mode:
authorYunQiang Su <yunqiang.su@cipunited.com>2022-09-21 11:13:03 +0000
committerYunQiang Su <yunqiang.su@cipunited.com>2022-10-25 16:06:20 +0800
commit354c97ee05b23707efbfc7ff6640dcec7336ac7a (patch)
tree4c8687c1d9db07128edc44eb14fb11abf43dc355 /gcc/config/mips/mips.h
parent19295e8607da2f743368fe6f5708146616aafa91 (diff)
downloadgcc-354c97ee05b23707efbfc7ff6640dcec7336ac7a.zip
gcc-354c97ee05b23707efbfc7ff6640dcec7336ac7a.tar.gz
gcc-354c97ee05b23707efbfc7ff6640dcec7336ac7a.tar.bz2
MIPS: fix building on multiarch platform
On platforms that support multiarch, such as Debian, the filesystem hierarchy doesn't fellow the old Irix style: lib & lib/<multiarch> for native lib64 for N64 on N32/O32 systems lib32 for N32 on N64/O32 systems libo32 for O32 on N64/N32 systems Thus we cannot #define STANDARD_STARTFILE_PREFIX_1 #define STANDARD_STARTFILE_PREFIX_2 on N32 or N64 systems, else collect2 won't look for libraries on /lib/<multiarch>. gcc/ChangeLog: * configure.ac: AC_DEFINE(ENABLE_MULTIARCH, 1) * configure: Regenerated. * config.in: Regenerated. * config/mips/mips.h: don't define STANDARD_STARTFILE_PREFIX_1 if ENABLE_MULTIARCH is defined. * config/mips/t-linux64: define correct multiarch path when multiarch is enabled.
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r--gcc/config/mips/mips.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 74b6e11..fe7f5b2 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