]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add missing $(rpath-link) to /elf/ld.so --library-path
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 8 Nov 2025 16:44:05 +0000 (17:44 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 8 Nov 2025 16:44:48 +0000 (17:44 +0100)
This is notably needed for GNU/Hurd's libmachuser.so and libhurduser.so.

iconv/Makefile
iconv/tst-iconv_prog.sh
iconv/tst-iconvconfig.sh
iconvdata/Makefile
iconvdata/run-iconv-test.sh
locale/Makefile
locale/tst-locale-locpath.sh

index 672126d45263c5472a5c5de3c17e5524d29f5284..97a3f586e4fd6f4e535542516f83e342fe178249 100644 (file)
@@ -141,7 +141,7 @@ $(objpfx)test-iconvconfig.out: $(objpfx)iconvconfig
 
 $(objpfx)tst-iconv_prog.out: tst-iconv_prog.sh $(objpfx)iconv_prog
        $(BASH) $< $(common-objdir) '$(test-wrapper-env)' \
-                '$(run-program-env)' > $@; \
+                '$(run-program-env)' '$(rpath-link)' > $@; \
        $(evaluate-test)
 
 $(objpfx)tst-translit-mchar.out: tst-translit-mchar.sh \
@@ -168,5 +168,5 @@ $(objpfx)tst-iconv_prog-buffer-large.out: \
 
 $(objpfx)tst-iconvconfig.out: tst-iconvconfig.sh $(objpfx)iconvconfig
        $(BASH) $< $(common-objdir) '$(test-wrapper-env)' \
-               '$(run-program-env)' > $@; \
+               '$(run-program-env)' '$(rpath-link)' > $@; \
     $(evaluate-test)
index e2a43280d2659f73fb99f72111d65e2270171fc0..ac0060e7f5553c14a2b5169edf99cd9eafc61935 100644 (file)
 codir=$1
 test_wrapper_env="$2"
 run_program_env="$3"
+# Remove the last space to allow concatenate extra paths.
+library_path="$(echo $4)"
 
 # We have to have some directories in the library path.
 LIBPATH=$codir:$codir/iconvdata
 
 # How the start the iconv(1) program.  $from is not defined/expanded yet.
 ICONV='
-$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so
+$codir/elf/ld.so --library-path $library_path:$LIBPATH --inhibit-rpath ${from}.so
 $codir/iconv/iconv_prog
 '
 ICONV="$test_wrapper_env $run_program_env $ICONV"
index 0b16b17f0df5dc83efad1e6d7dfd6240dd457f08..93c653e83a39fdae8b5c98539406d733fbe55a38 100755 (executable)
@@ -22,12 +22,14 @@ set -e
 build_dir=$1
 test_wrapper_env="$2"
 run_program_env="$3"
+# Remove the last space to allow concatenate extra paths.
+library_path="$(echo $4)"
 
 # We have to have some directories in the library path.
 LIBPATH=$build_dir:$build_dir/iconvdata
 
 ICONVCONFIG="
-$build_dir/elf/ld.so --library-path $LIBPATH $build_dir/iconv/iconvconfig
+$build_dir/elf/ld.so --library-path $library_path:$LIBPATH $build_dir/iconv/iconvconfig
 "
 
 ICONVCONFIG="$test_wrapper_env $run_program_env $ICONVCONFIG"
index 5a2abeea24cdb40494fbda1e3d958cafd6eed325..a09ff12eadebca082bc9ddad3d248b654987a584 100644 (file)
@@ -340,7 +340,7 @@ $(objpfx)iconv-test.out: run-iconv-test.sh \
                         $(common-objdir)/iconv/iconv_prog TESTS
        iconv_modules="$(modules)" \
        $(SHELL) $< $(common-objdir) '$(test-wrapper-env)' \
-                '$(run-program-env)' > $@; \
+                '$(run-program-env)' '$(rpath-link)' > $@; \
        $(evaluate-test)
 
 $(objpfx)tst-tables.out: tst-tables.sh \
index a6c3acc44d860b6cad5d37863eda0071bc5ae054..063885a7f97fb3b879e4d4ad4415be5c6993fe47 100755 (executable)
@@ -22,6 +22,8 @@ set -e
 codir=$1
 test_wrapper_env="$2"
 run_program_env="$3"
+# Remove the last space to allow concatenate extra paths.
+library_path="$(echo $4)"
 
 # We use always the same temporary file.
 temp1=$codir/iconvdata/iconv-test.xxx
@@ -33,7 +35,7 @@ trap "rm -f $temp1 $temp2" 1 2 3 15
 LIBPATH=$codir:$codir/iconvdata
 
 # How the start the iconv(1) program.
-ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
+ICONV='$codir/elf/ld.so --library-path $library_path:$LIBPATH --inhibit-rpath ${from}.so \
        $codir/iconv/iconv_prog'
 ICONV="$test_wrapper_env $run_program_env $ICONV"
 
index 9d9c1a769160eb20a46b529058de02b134daf386..66b9a16e259def2d77c65152ad5beb92d72cf01a 100644 (file)
@@ -180,7 +180,8 @@ lib := locale-programs
 include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
 
 $(objpfx)tst-locale-locpath.out : tst-locale-locpath.sh $(objpfx)locale
-       $(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' '$(run-program-env)' > $@; \
+       $(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \
+               '$(run-program-env)' '$(rpath-link)' > $@; \
        $(evaluate-test)
 
 $(objpfx)tst-localedef-path-norm: $(shared-thread-library)
index 5c5b7610adf71d934d55de1158834bcccb1d81ec..bc07f4d19493b746e402c537960bcbe3e167a2e4 100644 (file)
@@ -22,6 +22,8 @@ set -ex
 common_objpfx=$1
 test_wrapper_env=$2
 run_program_env=$3
+# Remove the last space to allow concatenate extra paths.
+library_path="$(echo $4)"
 
 LIBPATH="$common_objpfx"
 
@@ -36,7 +38,7 @@ mkdir -p $testroot
 
 ${test_wrapper_env} \
 ${run_program_env} LANG= LC_ALL=invalid-locale LOCPATH=does-not-exist \
-${common_objpfx}elf/ld.so --library-path "$LIBPATH" \
+${common_objpfx}elf/ld.so --library-path "$library_path:$LIBPATH" \
   "${common_objpfx}locale/locale" \
   > "$testroot/stdout" 2> "$testroot/stderr"