aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@gnu.org>2023-05-06 13:50:36 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-11-27 15:44:53 +0100
commit5707e9db9c398d311defc80c5b7822c9a07ead60 (patch)
treeb72b61d8a22e8cfa09bbf339985941d200d07f18
parente09007308c96a036a4a4e6fd4d6c09442b4c4420 (diff)
downloadgcc-5707e9db9c398d311defc80c5b7822c9a07ead60.zip
gcc-5707e9db9c398d311defc80c5b7822c9a07ead60.tar.gz
gcc-5707e9db9c398d311defc80c5b7822c9a07ead60.tar.bz2
hurd: Add multilib paths for gnu-x86_64
We need the multilib paths in gcc to find e.g. glibc crt files on Debian. This is essentially based on t-linux64 version. gcc/ChangeLog: * config/i386/t-gnu64: New file. * config.gcc [x86_64-*-gnu*]: Add i386/t-gnu64 to tmake_file.
-rw-r--r--gcc/config.gcc3
-rw-r--r--gcc/config/i386/t-gnu6438
2 files changed, 41 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3000379..e62849c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5973,6 +5973,9 @@ case ${target} in
visium-*-*)
target_cpu_default2="TARGET_CPU_$with_cpu"
;;
+ x86_64-*-gnu*)
+ tmake_file="$tmake_file i386/t-gnu64"
+ ;;
esac
t=
diff --git a/gcc/config/i386/t-gnu64 b/gcc/config/i386/t-gnu64
new file mode 100644
index 0000000..23ee682
--- /dev/null
+++ b/gcc/config/i386/t-gnu64
@@ -0,0 +1,38 @@
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# On Debian, Ubuntu and other derivative distributions, the 32bit libraries
+# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to
+# /lib and /usr/lib, while other distributions install libraries into /lib64
+# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64,
+# it doesn't tell anything about the 32bit libraries on those systems. Set
+# MULTILIB_OSDIRNAMES according to what is found on the target.
+
+# To support i386, x86-64 and x32 libraries, the directory structrue
+# should be:
+#
+# /lib has i386 libraries.
+# /lib64 has x86-64 libraries.
+# /libx32 has x32 libraries.
+#
+comma=,
+MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu)
+MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu)
+MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)