aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2015-06-03 16:38:10 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2015-06-03 16:38:10 +0000
commit5123acd24138878133e447eb369831caa03d305a (patch)
treeebacaa694ad2837c4490e108f3bbd2e38a3963e2 /gcc/config
parent27a0b7f2ee9689c9a0092a6403edacdcb7158516 (diff)
downloadgcc-5123acd24138878133e447eb369831caa03d305a.zip
gcc-5123acd24138878133e447eb369831caa03d305a.tar.gz
gcc-5123acd24138878133e447eb369831caa03d305a.tar.bz2
config.gcc (powerpc*-*-*): Add support for a new configure option --with-advance-toolchain=<xxx> which...
2015-06-03 Michael Meissner <meissner@linux.vnet.ibm.com> * config.gcc (powerpc*-*-*): Add support for a new configure option --with-advance-toolchain=<xxx> which overrides using the default header files, libraries and dynamic linker. * config/rs6000/linux64.h (SUBSUBTARGET_EXTRA_SPECS): Add new specs to support the configure --with-advance-toolchain=<xxx> option. (INCLUDE_EXTRA_SPEC): Likewise. (LINK_OS_EXTRA_SPEC32): Likewise. (LINK_OK_EXTRA_SPEC64): Likewise. (LINK_OS_NEW_DTAGS_SPEC): Likewise. (DYNAMIC_LINKER_PREFIX): Likewise. (CPP_OS_DEFAULT_SPEC): Use the new specs for providing advance toolchain support. (GLIBC_DYNAMIC_LINKER32): Likewise. (GLIBC_DYNAMIC_LINKER64): Likewise. (LINK_OS_LINUX_SPEC32): Likewise. (LINK_OS_LINUX_SPEC64): Likewise. * doc/install.texi (--enable-advance-toolchain=<xx>): Document new configuration option. From-SVN: r224095
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/linux64.h51
1 files changed, 44 insertions, 7 deletions
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index bec0fd9..9599735 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -207,7 +207,36 @@ extern int dot_symbols;
{ "asm_spec32", ASM_SPEC32 }, \
{ "asm_spec64", ASM_SPEC64 }, \
{ "link_os_linux_spec32", LINK_OS_LINUX_SPEC32 }, \
- { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 },
+ { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 }, \
+ { "link_os_extra_spec32", LINK_OS_EXTRA_SPEC32 }, \
+ { "link_os_extra_spec64", LINK_OS_EXTRA_SPEC64 }, \
+ { "link_os_new_dtags", LINK_OS_NEW_DTAGS_SPEC }, \
+ { "include_extra", INCLUDE_EXTRA_SPEC }, \
+ { "dynamic_linker_prefix", DYNAMIC_LINKER_PREFIX },
+
+/* Optional specs used for overriding the system include directory, default
+ -rpath links, and prefix for the dynamic linker. Normally, there are not
+ defined, but if the user configure with the --with-advance-toolchain=<xxx>
+ option, the advance-toolchain.h file will override these. */
+#ifndef INCLUDE_EXTRA_SPEC
+#define INCLUDE_EXTRA_SPEC ""
+#endif
+
+#ifndef LINK_OS_EXTRA_SPEC32
+#define LINK_OS_EXTRA_SPEC32 ""
+#endif
+
+#ifndef LINK_OS_EXTRA_SPEC64
+#define LINK_OS_EXTRA_SPEC64 ""
+#endif
+
+#ifndef LINK_OS_NEW_DTAGS_SPEC
+#define LINK_OS_NEW_DTAGS_SPEC ""
+#endif
+
+#ifndef DYNAMIC_LINKER_PREFIX
+#define DYNAMIC_LINKER_PREFIX ""
+#endif
#undef MULTILIB_DEFAULTS
#if DEFAULT_ARCH64_P
@@ -341,7 +370,7 @@ extern int dot_symbols;
while (0)
#undef CPP_OS_DEFAULT_SPEC
-#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux) %(include_extra)"
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
@@ -361,12 +390,18 @@ extern int dot_symbols;
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
+
#ifdef LINUX64_DEFAULT_ABI_ELFv2
-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
+#define GLIBC_DYNAMIC_LINKER64 \
+"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
+":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
#else
-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
+#define GLIBC_DYNAMIC_LINKER64 \
+"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
+":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
#endif
+
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#if DEFAULT_LIBC == LIBC_UCLIBC
@@ -402,11 +437,13 @@ extern int dot_symbols;
#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}"
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
+ %(link_os_extra_spec32)"
#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}"
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}} \
+ %(link_os_extra_spec64)"
#undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \