diff mbox series

Run $(objpfx)iconvconfig as an installed program

Message ID 20210226211507.3430032-1-hjl.tools@gmail.com
State Under Review
Delegated to: Carlos O'Donell
Headers show
Series Run $(objpfx)iconvconfig as an installed program | expand

Commit Message

H.J. Lu Feb. 26, 2021, 9:15 p.m. UTC
When glibc is configured with --enable-hardcoded-path-in-tests,
"make xcheck" failed with

...
env GCONV_PATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconvdata LOCPATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/localedata LC_ALL=C  /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig  --output=$tmp --nostdlib /usr/lib64/gconv;
...
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig)
...
FAIL: iconv/test-iconvconfig

Since $(objpfx)iconvconfig is an installed program, run it as one.
---
 iconv/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

H.J. Lu April 19, 2021, 12:55 p.m. UTC | #1
On Fri, Feb 26, 2021 at 1:15 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> When glibc is configured with --enable-hardcoded-path-in-tests,
> "make xcheck" failed with
>
> ...
> env GCONV_PATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconvdata LOCPATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/localedata LC_ALL=C  /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig  --output=$tmp --nostdlib /usr/lib64/gconv;
> ...
> /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig)
> ...
> FAIL: iconv/test-iconvconfig
>
> Since $(objpfx)iconvconfig is an installed program, run it as one.
> ---
>  iconv/Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/iconv/Makefile b/iconv/Makefile
> index 659857dd8c..4af3eea0d8 100644
> --- a/iconv/Makefile
> +++ b/iconv/Makefile
> @@ -95,11 +95,13 @@ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
>  $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
>  $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
>
> -$(objpfx)test-iconvconfig.out: /dev/null $(objpfx)iconvconfig
> +$(objpfx)test-iconvconfig.out: $(objpfx)iconvconfig
>         (set -e; \
>          tmp=$(objpfx)gconv-modules.cache.$$$$; \
>          rm -f $$tmp; \
> -        $(make-test-out) --output=$$tmp --nostdlib $(inst_gconvdir); \
> +        $(built-program-cmd-before-env) \
> +               $(run-program-env) $(built-program-cmd-after-env) $< \
> +               --output=$$tmp --nostdlib $(inst_gconvdir); \
>          cmp $$tmp $(inst_gconvdir)/gconv-modules.cache; \
>          rm -f $$tmp) > $@; \
>         $(evaluate-test)
> --
> 2.29.2
>

PING.
diff mbox series

Patch

diff --git a/iconv/Makefile b/iconv/Makefile
index 659857dd8c..4af3eea0d8 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -95,11 +95,13 @@  $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
 
-$(objpfx)test-iconvconfig.out: /dev/null $(objpfx)iconvconfig
+$(objpfx)test-iconvconfig.out: $(objpfx)iconvconfig
 	(set -e; \
 	 tmp=$(objpfx)gconv-modules.cache.$$$$; \
 	 rm -f $$tmp; \
-	 $(make-test-out) --output=$$tmp --nostdlib $(inst_gconvdir); \
+	 $(built-program-cmd-before-env) \
+		$(run-program-env) $(built-program-cmd-after-env) $< \
+		--output=$$tmp --nostdlib $(inst_gconvdir); \
 	 cmp $$tmp $(inst_gconvdir)/gconv-modules.cache; \
 	 rm -f $$tmp) > $@; \
 	$(evaluate-test)