aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
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.gcc
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.gcc')
-rw-r--r--gcc/config.gcc52
1 files changed, 51 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index e23a34c..13a567f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4044,7 +4044,7 @@ case "${target}" in
;;
powerpc*-*-* | rs6000-*-*)
- supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64"
+ supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
eval "val=\$with_$which"
@@ -4091,6 +4091,56 @@ case "${target}" in
exit 1
;;
esac
+
+ if test "x$with_advance_toolchain" != x; then
+ if test -d "/opt/$with_advance_toolchain/." -a \
+ -d "/opt/$with_advance_toolchain/bin/." -a \
+ -d "/opt/$with_advance_toolchain/include/."; then
+
+ tm_file="$tm_file ./advance-toolchain.h"
+ (at="/opt/$with_advance_toolchain"
+ echo "/* Use Advance Toolchain $at */"
+ echo
+ echo "#ifndef USE_AT_INCLUDE_FILES"
+ echo "#define USE_AT_INCLUDE_FILES 1"
+ echo "#endif"
+ echo
+ echo "#if USE_AT_INCLUDE_FILES"
+ echo "#undef INCLUDE_EXTRA_SPEC"
+ echo "#define INCLUDE_EXTRA_SPEC" \
+ "\"-isystem $at/include\""
+ echo "#endif"
+ echo
+ echo "#undef LINK_OS_EXTRA_SPEC32"
+ echo "#define LINK_OS_EXTRA_SPEC32" \
+ "\"%(link_os_new_dtags)" \
+ "-rpath $prefix/lib -rpath $at/lib" \
+ "-L $prefix/lib -L $at/lib\""
+ echo
+ echo "#undef LINK_OS_EXTRA_SPEC64"
+ echo "#define LINK_OS_EXTRA_SPEC64" \
+ "\"%(link_os_new_dtags)" \
+ "-rpath $prefix/lib64 -rpath $at/lib64" \
+ "-L $prefix/lib64 -L $at/lib64\""
+ echo
+ echo "#undef LINK_OS_NEW_DTAGS_SPEC"
+ echo "#define LINK_OS_NEW_DTAGS_SPEC" \
+ "\"--enable-new-dtags\""
+ echo
+ echo "#undef DYNAMIC_LINKER_PREFIX"
+ echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
+ echo
+ echo "#undef MD_EXEC_PREFIX"
+ echo "#define MD_EXEC_PREFIX \"$at/bin/\""
+ echo
+ echo "#undef MD_STARTFILE_PREFIX"
+ echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \
+ > advance-toolchain.h
+ else
+ echo "Unknown advance-toolchain $with_advance_toolchain"
+ exit 1
+ fi
+ fi
;;
s390*-*-*)