summaryrefslogtreecommitdiff
path: root/gcc/config.host
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-19 14:55:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-19 14:55:42 +0000
commitb2e8a46e7efe8a63e9b9c93ca8e81baebb4af5cd (patch)
treecf5c7224efe9bcccb76478acaed7d423f3ca80be /gcc/config.host
parentf2c7d583e06bf1d32c8c488d973921a737b7c106 (diff)
downloadgcc-b2e8a46e7efe8a63e9b9c93ca8e81baebb4af5cd.tar.gz
PR bootstrap/37739
* config.host: For powerpc*-*-linux* host with 32-bit GCC, use rs6000/x-linux-relax snippet if ld is new enough, otherwise use rs6000/x-linux-O1. * config/rs6000/x-linux-relax: New file. * config/x-cflags-O1: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config.host')
-rw-r--r--gcc/config.host21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config.host b/gcc/config.host
index 2cfcd6bf13a..939cc1536ca 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -124,6 +124,27 @@ case ${host} in
host_xmake_file="${host_xmake_file} rs6000/x-rs6000"
;;
esac
+ case ${host} in
+ *-*-linux* )
+ if test "${GCC}:${ac_cv_sizeof_long}" = yes:4; then
+ # On powerpc*-*-linux* use -Wl,--relax to link cc1,
+ # if ld is new enough, otherwise force -O1 in CFLAGS.
+ host_ppc_relax_xmake_file=
+ host_ld_ver=`${CC} -Wl,--version 2>/dev/null | sed 1q`
+ if echo "$host_ld_ver" | grep GNU > /dev/null; then
+ host_ld_date=`echo $host_ld_ver \
+ | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+ if test 0"$host_ld_date" -gt 20080806; then
+ host_ppc_relax_xmake_file=rs6000/x-linux-relax
+ fi
+ fi
+ if test -z "${host_ppc_relax_xmake_file}"; then
+ host_ppc_relax_xmake_file=x-cflags-O1
+ fi
+ host_xmake_file="${host_xmake_file} ${host_ppc_relax_xmake_file}"
+ fi
+ ;;
+ esac
;;
esac