aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-04-27 20:35:54 +0000
committerMark Mitchell <mark@codesourcery.com>2005-04-27 20:35:54 +0000
commit72c845691cedc1da906ebb7333441c0c9817cf24 (patch)
treee35f58f5c5ef495d2de849689e0398b292c98c9c /gcc/configure
parentee4353c76f381077a4d528a6d36ea1bcab029633 (diff)
* 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: https://gcc.gnu.org/svn/gcc/trunk@98880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index 98639dbcdb8..bf9966f4340 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -15050,6 +15050,32 @@ _ACEOF
;;
esac
+echo "$as_me:$LINENO: checking linker --sysroot support" >&5
+echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
+if test "${gcc_cv_ld_sysroot+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
+echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
+if test x"$gcc_cv_ld_sysroot" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LD_SYSROOT 1
+_ACEOF
+
+fi
+
if test x$with_sysroot = x && test x$host = x$target \
&& test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then