aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-10-03 22:35:14 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2002-10-03 22:35:14 +0200
commit5bbcd587a2aa8ea9427a737e6c9dade11f744867 (patch)
tree456cd45052f2e8eae6252ce7e1adc27a5c880d61 /gcc/config
parentc07f146f074b93fa33272cb47040d8394739865d (diff)
downloadgcc-5bbcd587a2aa8ea9427a737e6c9dade11f744867.zip
gcc-5bbcd587a2aa8ea9427a737e6c9dade11f744867.tar.gz
gcc-5bbcd587a2aa8ea9427a737e6c9dade11f744867.tar.bz2
gcc.c (print_multi_os_directory): New variable.
* gcc.c (print_multi_os_directory): New variable. (option_map): Support --print-multi-os-directory. (struct prefix_list): Add os_multilib field. (multilib_os_dir): New variable. (static_specs): Add multilib_options. (find_a_file): Add multilib argument. Search in GCC or OS multilib subdirs if non-zero. (read_specs, execute): Update callers. (find_file): Likewise. Don't prefix name with multilib_dir, instead pass 1 as multilib option. (display_help): Include --print-multi-os-directory. (add_prefix): Add os_multilib argument. Initialize pl->os_multilib. (process_command): Update callers. Handle --print-multi-os-directory. (do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is set. (main): Update find_a_file and add_prefix callers. Handle print_multi_os_directory. (struct mdswitchstr): New. (mdswitches, n_mdswitches): New variables. (used_arg): Add MULTILIB_DEFAULT switches too if they are not present on the command line nor their mutually incompatible switches. (default_arg): Optimize. (set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches array. (print_multilib_info): Only print GCC multilib dir name, not OS multilib dirname. * genmultilib: Add osdirnames parameter. Output multilib_options variable. If osdirnames is specified, output dirnames as dirname:osdirname. * mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES to compute libgcc_s soname and install path. * Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of SHLIB_SLIBDIR_SUFFIXES to mklibgcc. (s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib argument. * config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64, ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove. (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32 and -m64. * config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. * config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove. (STARTFILE_ARCH_SPEC): Remove. * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove. * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set. (SHLIB_SLIBDIR_SUFFIXES): Remove. From-SVN: r57786
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/linux64.h4
-rw-r--r--gcc/config/i386/t-linux643
-rw-r--r--gcc/config/mips/t-iris63
-rw-r--r--gcc/config/sparc/linux64.h68
-rw-r--r--gcc/config/sparc/sol2-bi.h18
-rw-r--r--gcc/config/sparc/t-linux643
-rw-r--r--gcc/config/sparc/t-sol2-643
7 files changed, 11 insertions, 91 deletions
diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
index d211390..965120a 100644
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
@@ -60,10 +60,6 @@ Boston, MA 02111-1307, USA. */
%{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
%{static:-static}}"
-#define STARTFILE_PREFIX_SPEC "\
- %{m32: /usr/local/lib/ /lib/ /usr/lib/} \
- %{!m32: /usr/local/lib64/ /lib64/ /usr/lib64/}"
-
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
index 46a7caa..8780321 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -6,10 +6,9 @@ SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
+MULTILIB_OSDIRNAMES = ../lib64 ../lib32
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
-
-SHLIB_SLIBDIR_SUFFIXES = 64:64 32:
diff --git a/gcc/config/mips/t-iris6 b/gcc/config/mips/t-iris6
index 582ec4c..b55bc36 100644
--- a/gcc/config/mips/t-iris6
+++ b/gcc/config/mips/t-iris6
@@ -4,6 +4,7 @@
MULTILIB_OPTIONS=mabi=n32/mabi=64
MULTILIB_DIRNAMES=
MULTILIB_MATCHES=
+MULTILIB_OSDIRNAMES=../lib32 ../lib64
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
@@ -14,8 +15,6 @@ INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
CRTSTUFF_T_CFLAGS=-g1
-SHLIB_SLIBDIR_SUFFIXES = mabi=64:/mabi=64 mabi=n32:
-
# This is only needed in the static libgcc as a band-aid until gcc correctly
# implements the N32/N64 ABI structure passing conventions
LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/mips/irix6-libc-compat.c
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 51eca16..eb81eb6 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -1,5 +1,5 @@
/* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
- Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@caip.rutgers.edu)
This file is part of GNU CC.
@@ -55,38 +55,11 @@ Boston, MA 02111-1307, USA. */
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC32 \
- "%{!shared: \
- %{pg:/usr/lib/gcrt1.o%s} %{!pg:%{p:/usr/lib/gcrt1.o%s} %{!p:/usr/lib/crt1.o%s}}}\
- /usr/lib/crti.o%s %{static:crtbeginT.o%s}\
+#define STARTFILE_SPEC \
+ "%{!shared:%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
+ crti.o%s %{static:crtbeginT.o%s}\
%{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
-#define STARTFILE_SPEC64 \
- "%{!shared: \
- %{pg:/usr/lib64/gcrt1.o%s} %{!pg:%{p:/usr/lib64/gcrt1.o%s} %{!p:/usr/lib64/crt1.o%s}}}\
- /usr/lib64/crti.o%s %{static:crtbeginT.o%s}\
- %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
-
-#ifdef SPARC_BI_ARCH
-
-#if DEFAULT_ARCH32_P
-#define STARTFILE_SPEC "\
-%{m32:" STARTFILE_SPEC32 "} \
-%{m64:" STARTFILE_SPEC64 "} \
-%{!m32:%{!m64:" STARTFILE_SPEC32 "}}"
-#else
-#define STARTFILE_SPEC "\
-%{m32:" STARTFILE_SPEC32 "} \
-%{m64:" STARTFILE_SPEC64 "} \
-%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
-#endif
-
-#else
-
-#define STARTFILE_SPEC STARTFILE_SPEC64
-
-#endif
-
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
the GNU/Linux magical crtend.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -95,36 +68,9 @@ Boston, MA 02111-1307, USA. */
#undef ENDFILE_SPEC
-#define ENDFILE_SPEC32 \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} /usr/lib/crtn.o%s"
-
-#define ENDFILE_SPEC64 \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} /usr/lib64/crtn.o%s"
-
-#define ENDFILE_SPEC_COMMON \
- "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
-
-#ifdef SPARC_BI_ARCH
-
-#if DEFAULT_ARCH32_P
-#define ENDFILE_SPEC "\
-%{m32:" ENDFILE_SPEC32 "} \
-%{m64:" ENDFILE_SPEC64 "} \
-%{!m32:%{!m64:" ENDFILE_SPEC32 "}} " \
-ENDFILE_SPEC_COMMON
-#else
-#define ENDFILE_SPEC "\
-%{m32:" ENDFILE_SPEC32 "} \
-%{m64:" ENDFILE_SPEC64 "} \
-%{!m32:%{!m64:" ENDFILE_SPEC64 "}} " \
-ENDFILE_SPEC_COMMON
-#endif
-
-#else
-
-#define ENDFILE_SPEC ENDFILE_SPEC64 " " ENDFILE_SPEC_COMMON
-
-#endif
+#define ENDFILE_SPEC \
+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s\
+ %{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h
index 1ba5260..3f9416d 100644
--- a/gcc/config/sparc/sol2-bi.h
+++ b/gcc/config/sparc/sol2-bi.h
@@ -57,24 +57,6 @@
%{!mcpu*:%(asm_cpu_default)} \
"
-#define STARTFILE_ARCH64_SPEC "\
-%{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
-%{!ansi:/usr/lib/sparcv9/values-Xa.o%s}"
-
-#undef STARTFILE_ARCH_SPEC
-
-#if DEFAULT_ARCH32_P
-#define STARTFILE_ARCH_SPEC "\
-%{m32:" STARTFILE_ARCH32_SPEC "} \
-%{m64:" STARTFILE_ARCH64_SPEC "} \
-%{!m32:%{!m64:" STARTFILE_ARCH32_SPEC "}}"
-#else
-#define STARTFILE_ARCH_SPEC "\
-%{m32:" STARTFILE_ARCH32_SPEC "} \
-%{m64:" STARTFILE_ARCH64_SPEC "} \
-%{!m32:%{!m64:" STARTFILE_ARCH64_SPEC "}}"
-#endif
-
#undef CPP_CPU_DEFAULT_SPEC
#define CPP_CPU_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? "\
diff --git a/gcc/config/sparc/t-linux64 b/gcc/config/sparc/t-linux64
index a648626..5b66033 100644
--- a/gcc/config/sparc/t-linux64
+++ b/gcc/config/sparc/t-linux64
@@ -3,6 +3,7 @@ MULTILIB_DIRNAMES = 64 32 alt
MULTILIB_MATCHES = mcmodel?medany=mcmodel?medmid
MULTILIB_EXCEPTIONS = m32/mno-app-regs* m32/mcmodel=*
MULTILIB_EXCLUSIONS = m32/!m64/mno-app-regs m32/!m64/mcmodel=medany
+MULTILIB_OSDIRNAMES = ../lib64 ../lib alt
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
@@ -10,8 +11,6 @@ INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
crtfastmath.o
-SHLIB_SLIBDIR_SUFFIXES = 64:64 32:
-
# Override t-slibgcc-elf-ver to export some libgcc symbols with
# the symbol versions that glibc used.
# Avoid the t-linux version file.
diff --git a/gcc/config/sparc/t-sol2-64 b/gcc/config/sparc/t-sol2-64
index 39204d7..3c15f0a 100644
--- a/gcc/config/sparc/t-sol2-64
+++ b/gcc/config/sparc/t-sol2-64
@@ -1,11 +1,10 @@
MULTILIB_OPTIONS = m32/m64
MULTILIB_DIRNAMES = sparcv7 sparcv9
MULTILIB_MATCHES =
+MULTILIB_OSDIRNAMES = . sparcv9
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o gmon.o crt1.o crti.o crtn.o gcrt1.o \
crtfastmath.o
-
-SHLIB_SLIBDIR_SUFFIXES = sparcv9:/sparcv9 sparcv7: