From patchwork Sat Nov 8 17:14:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 123801 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59D6B3858C2C for ; Sat, 8 Nov 2025 17:15:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59D6B3858C2C X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 9CF363858D26 for ; Sat, 8 Nov 2025 17:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CF363858D26 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9CF363858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762622065; cv=none; b=EgsFG8LsK2X39/VlYj4/ORC+N4ESz4e52n2AjGW218qpKIahPl/tkOkXzznRg52xULn4R9kSFjIAbVOO/T6gm+9l4ymJTlgx5hujqtOV+5PIsboBZ+RpSh1dfRLnTDKWBXCk+DevpagCc/RbISRpySjmHWuNgVRoCpNV8chCu9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762622065; c=relaxed/simple; bh=yABNov20lOJa9oQIEeMH5clmbE+UvCJdnJCjc2ckBe8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=u42PU0VHd/66MERL8a1NuCelAkh/42CMT+7AC2bqIqccRpuXPJc+v1bNdcVyo8tht3uJ64i35HQs38p/aV1jXv4ieriCZGjpuOj/mVpBRUBiyjftam/EDi/RjtlWj6LJytHZwJs6lWcds0tzcJcpXLeagj0psEhZ5tLtAy2ApwM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CF363858D26 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 64D26A1BD1; Sat, 8 Nov 2025 18:14:24 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hc762xSuYPFg; Sat, 8 Nov 2025 18:14:24 +0100 (CET) Received: from end (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 2F79DA19CF; Sat, 8 Nov 2025 18:14:24 +0100 (CET) Received: from samy by end with local (Exim 4.98.2) (envelope-from ) id 1vHmW7-00000003gVI-373B; Sat, 08 Nov 2025 18:14:23 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited] Add missing $(rpath-link) to /elf/ld.so --library-path Date: Sat, 8 Nov 2025 18:14:22 +0100 Message-ID: <20251108171422.878360-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This is notably needed for GNU/Hurd's libmachuser.so and libhurduser.so. --- iconv/Makefile | 4 ++-- iconv/tst-iconv_prog.sh | 4 +++- iconv/tst-iconvconfig.sh | 4 +++- iconvdata/Makefile | 2 +- iconvdata/run-iconv-test.sh | 4 +++- locale/Makefile | 3 ++- locale/tst-locale-locpath.sh | 4 +++- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/iconv/Makefile b/iconv/Makefile index 672126d452..97a3f586e4 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -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) diff --git a/iconv/tst-iconv_prog.sh b/iconv/tst-iconv_prog.sh index e2a43280d2..ac0060e7f5 100644 --- a/iconv/tst-iconv_prog.sh +++ b/iconv/tst-iconv_prog.sh @@ -21,13 +21,15 @@ 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" diff --git a/iconv/tst-iconvconfig.sh b/iconv/tst-iconvconfig.sh index 0b16b17f0d..93c653e83a 100755 --- a/iconv/tst-iconvconfig.sh +++ b/iconv/tst-iconvconfig.sh @@ -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" diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 5a2abeea24..a09ff12ead 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -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 \ diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh index a6c3acc44d..063885a7f9 100755 --- a/iconvdata/run-iconv-test.sh +++ b/iconvdata/run-iconv-test.sh @@ -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" diff --git a/locale/Makefile b/locale/Makefile index 9d9c1a7691..66b9a16e25 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -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) diff --git a/locale/tst-locale-locpath.sh b/locale/tst-locale-locpath.sh index 5c5b7610ad..bc07f4d194 100644 --- a/locale/tst-locale-locpath.sh +++ b/locale/tst-locale-locpath.sh @@ -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"