summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ChangeLog6
-rwxr-xr-xld/configure15
-rw-r--r--ld/configure.in15
3 files changed, 24 insertions, 12 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3cc0c85141..19f66d36ee 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-16 Richard Sandiford <richard@codesourcery.com>
+
+ * configure.in: Allow sysroots to be relocated under $prefix as
+ well as $exec_prefix.
+ * configure: Regenerate.
+
2007-05-14 Andreas Schwab <schwab@suse.de>
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern):
diff --git a/ld/configure b/ld/configure
index d34367de17..d825ecf0ab 100755
--- a/ld/configure
+++ b/ld/configure
@@ -4198,17 +4198,20 @@ if test "${with_sysroot+set}" = set; then
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
use_sysroot=yes
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
+ test_exec_prefix=$test_prefix
else
- test_prefix=$exec_prefix
+ test_exec_prefix=$exec_prefix
fi
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"
diff --git a/ld/configure.in b/ld/configure.in
index 3fd64c068f..0589578a74 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -41,17 +41,20 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
use_sysroot=yes
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
+ test_exec_prefix=$test_prefix
else
- test_prefix=$exec_prefix
+ test_exec_prefix=$exec_prefix
fi
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"