aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rwxr-xr-xld/configure17
-rw-r--r--ld/configure.ac13
-rw-r--r--ld/testsuite/ld-elf/indirect.exp15
4 files changed, 45 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 52bbeda..96960ab 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2025-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR ld/32580
+ * configure.ac <*-*-solaris2*>: Enforce SHELL=/bin/bash.
+ * configure: Regenerate.
+
2025-07-13 Nick Clifton <nickc@redhat.com>
* 2.45 Branch point.
diff --git a/ld/configure b/ld/configure
index 015666d..124b441 100755
--- a/ld/configure
+++ b/ld/configure
@@ -3362,6 +3362,19 @@ fi
+case $target in
+ *-*-solaris2*)
+ case "$SHELL" in
+ *bash*)
+ ;;
+ *)
+ # PR 32580: Force use of bash to avoid corrupt linker scripts.
+ SHELL=/bin/bash
+ ;;
+ esac
+ ;;
+esac
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11501,7 +11514,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11504 "configure"
+#line 11517 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11607,7 +11620,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11610 "configure"
+#line 11623 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/ld/configure.ac b/ld/configure.ac
index af065fe..e306c1d 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -28,6 +28,19 @@ AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
+case $target in
+ *-*-solaris2*)
+ case "$SHELL" in
+ *bash*)
+ ;;
+ *)
+ # PR 32580: Force use of bash to avoid corrupt linker scripts.
+ SHELL=/bin/bash
+ ;;
+ esac
+ ;;
+esac
+
AC_PROG_CC
AC_PROG_CXX
AC_PROG_GREP
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp
index 9a0bcb2..3d9cc2a 100644
--- a/ld/testsuite/ld-elf/indirect.exp
+++ b/ld/testsuite/ld-elf/indirect.exp
@@ -189,14 +189,21 @@ set run_tests [list \
{check-ptr-eq.c} "pr18720d" "pr18720.out"] \
[list "Run with libpr19553b.so" \
"-Wl,--no-as-needed tmpdir/libpr19553b.so tmpdir/libpr19553d.so -Wl,-rpath-link,." "" \
- {pr19553a.c} "pr19553b" "pr19553b.out"] \
+ {pr19553a.c} "pr19553b" "pr19553b.out"]
+]
+
+# This test relies on versioned symbols, which Solaris ld.so.1 doesn't support.
+if { ![istarget *-*-solaris2*] } {
+ lappend run_tests \
[list "Run with libpr19553c.so" \
"-Wl,--no-as-needed tmpdir/libpr19553c.so tmpdir/libpr19553b.so tmpdir/libpr19553d.so" "" \
- {pr19553a.c} "pr19553c" "pr19553c.out"] \
+ {pr19553a.c} "pr19553c" "pr19553c.out"]
+}
+
+lappend run_tests \
[list "Run with libpr19553d.so" \
"-Wl,--no-as-needed tmpdir/libpr19553d.so tmpdir/libpr19553b.so -Wl,-rpath-link,." "" \
- {pr19553a.c} "pr19553d" "pr19553d.out"] \
-]
+ {pr19553a.c} "pr19553d" "pr19553d.out"]
run_ld_link_exec_tests $run_tests