summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-27 20:35:54 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-27 20:35:54 +0000
commitb6bcc48fcdb890eb96a8404646af9502fe1398e8 (patch)
treee35f58f5c5ef495d2de849689e0398b292c98c9c /gcc/configure.ac
parent94340fb21d9400707e26883469d72d51bf51d34d (diff)
downloadgcc-b6bcc48fcdb890eb96a8404646af9502fe1398e8.tar.gz
* configure.ac: Check for ld --sysroot support.
* gcc.c: Document %R specifier for specs. (SYSROOT_SPEC): New macro. (sysroot_spec): New variable. (static_specs): Add sysroot_spec. (main): Pass the sysroot spec to the linker if appropriate. * configure: Regenerated. * config.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index efa758c9464..23c914de443 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3024,6 +3024,23 @@ EOF
;;
esac
+AC_CACHE_CHECK(linker --sysroot support,
+ gcc_cv_ld_sysroot,
+ [gcc_cv_ld_sysroot=no
+ if test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then
+ gcc_cv_ld_sysroot = yes
+ fi
+ elif test x$gcc_cv_ld != x; then
+ if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
+ gcc_cv_ld_sysroot=yes
+ fi
+ fi])
+if test x"$gcc_cv_ld_sysroot" = xyes; then
+ AC_DEFINE(HAVE_LD_SYSROOT, 1,
+ [Define if your linker supports --sysroot.])
+fi
+
if test x$with_sysroot = x && test x$host = x$target \
&& test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include",