Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 641672 Details for
Bug 720450
sys-apps/gawk calls ar directly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gawk-5.1.0-respect-AR.patch
gawk-5.1.0-respect-AR.patch (text/plain), 14.13 KB, created by
Sergei Trofimovich (RETIRED)
on 2020-05-25 10:08:41 UTC
(
hide
)
Description:
gawk-5.1.0-respect-AR.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2020-05-25 10:08:41 UTC
Size:
14.13 KB
patch
obsolete
>From 092e5f9be23ac9d4faad9ce801dab7cf8f8a5515 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Mon, 25 May 2020 10:59:03 +0100 >Subject: [PATCH] gawk: detect 'ar' tool via AM_PROG_AR > >Before the change > $ ./configure --host=x86_64-pc-linux-gnu && make >was referring to 'ar' tool. > >After the change it refers to 'x86_64-pc-linux-gnu-ar' >tool if that exists. This helps user to consistently >pick 'ar' implementation. > >The actual change is to add 'AM_PROG_AR' into configure.ac. >The rest is autogenerated by: > $ aclocal > $ automake --add-missing > $ autoconf > >Reported-by: Agostino Sarubbo >Bug: https://bugs.gentoo.org/720450 >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > Makefile.in | 8 +- > aclocal.m4 | 60 +++++++++++++++ > ar-lib | 1 + > awklib/Makefile.in | 2 + > configure | 175 ++++++++++++++++++++++++++++++++++++++++++++ > configure.ac | 3 + > doc/Makefile.in | 2 + > extras/Makefile.in | 2 + > support/Makefile.in | 3 +- > test/Makefile.in | 2 + > 10 files changed, 254 insertions(+), 4 deletions(-) > create mode 120000 ar-lib > >diff --git a/Makefile.in b/Makefile.in >index 18e1b327..1891a401 100644 >--- a/Makefile.in >+++ b/Makefile.in >@@ -279,9 +279,9 @@ CTAGS = ctags > CSCOPE = cscope > DIST_SUBDIRS = support . extension extras doc awklib po test > am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in ABOUT-NLS \ >- AUTHORS COPYING ChangeLog INSTALL NEWS README TODO awkgram.c \ >- command.c compile config.guess config.rpath config.sub depcomp \ >- install-sh missing mkinstalldirs ylwrap >+ AUTHORS COPYING ChangeLog INSTALL NEWS README TODO ar-lib \ >+ awkgram.c command.c compile config.guess config.rpath \ >+ config.sub depcomp install-sh missing mkinstalldirs ylwrap > DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) > distdir = $(PACKAGE)-$(VERSION) > top_distdir = $(distdir) >@@ -330,6 +330,7 @@ pkgdatadir = $(datadir)/awk > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -407,6 +408,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >diff --git a/aclocal.m4 b/aclocal.m4 >index 08ec5447..f5b7339a 100644 >--- a/aclocal.m4 >+++ b/aclocal.m4 >@@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION], > [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl > _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) > >+# Copyright (C) 2011-2020 Free Software Foundation, Inc. >+# >+# This file is free software; the Free Software Foundation >+# gives unlimited permission to copy and/or distribute it, >+# with or without modifications, as long as this notice is preserved. >+ >+# AM_PROG_AR([ACT-IF-FAIL]) >+# ------------------------- >+# Try to determine the archiver interface, and trigger the ar-lib wrapper >+# if it is needed. If the detection of archiver interface fails, run >+# ACT-IF-FAIL (default is to abort configure with a proper error message). >+AC_DEFUN([AM_PROG_AR], >+[AC_BEFORE([$0], [LT_INIT])dnl >+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl >+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl >+AC_REQUIRE_AUX_FILE([ar-lib])dnl >+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) >+: ${AR=ar} >+ >+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], >+ [AC_LANG_PUSH([C]) >+ am_cv_ar_interface=ar >+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], >+ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' >+ AC_TRY_EVAL([am_ar_try]) >+ if test "$ac_status" -eq 0; then >+ am_cv_ar_interface=ar >+ else >+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' >+ AC_TRY_EVAL([am_ar_try]) >+ if test "$ac_status" -eq 0; then >+ am_cv_ar_interface=lib >+ else >+ am_cv_ar_interface=unknown >+ fi >+ fi >+ rm -f conftest.lib libconftest.a >+ ]) >+ AC_LANG_POP([C])]) >+ >+case $am_cv_ar_interface in >+ar) >+ ;; >+lib) >+ # Microsoft lib, so override with the ar-lib wrapper script. >+ # FIXME: It is wrong to rewrite AR. >+ # But if we don't then we get into trouble of one sort or another. >+ # A longer-term fix would be to have automake use am__AR in this case, >+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something >+ # similar. >+ AR="$am_aux_dir/ar-lib $AR" >+ ;; >+unknown) >+ m4_default([$1], >+ [AC_MSG_ERROR([could not determine $AR interface])]) >+ ;; >+esac >+AC_SUBST([AR])dnl >+]) >+ > # AM_AUX_DIR_EXPAND -*- Autoconf -*- > > # Copyright (C) 2001-2020 Free Software Foundation, Inc. >diff --git a/ar-lib b/ar-lib >new file mode 120000 >index 00000000..d28a2981 >--- /dev/null >+++ b/ar-lib >@@ -0,0 +1 @@ >+/usr/share/automake-1.16/ar-lib >\ No newline at end of file >diff --git a/awklib/Makefile.in b/awklib/Makefile.in >index 2c492675..2683ea1a 100644 >--- a/awklib/Makefile.in >+++ b/awklib/Makefile.in >@@ -202,6 +202,7 @@ pkglibexecdir = $(libexecdir)/awk > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -279,6 +280,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >diff --git a/configure b/configure >index 684c76db..22f17993 100755 >--- a/configure >+++ b/configure >@@ -662,6 +662,8 @@ USE_NLS > SED > ZOS_FAIL > acl_shlibext >+ac_ct_AR >+AR > RANLIB > LN_S > YFLAGS >@@ -5506,6 +5508,179 @@ $as_echo "no" >&6; } > fi > > >+# support/ builds libsupport.a >+if test -n "$ac_tool_prefix"; then >+ for ac_prog in ar lib "link -lib" >+ do >+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. >+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 >+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 >+$as_echo_n "checking for $ac_word... " >&6; } >+if ${ac_cv_prog_AR+:} false; then : >+ $as_echo_n "(cached) " >&6 >+else >+ if test -n "$AR"; then >+ ac_cv_prog_AR="$AR" # Let the user override the test. >+else >+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >+for as_dir in $PATH >+do >+ IFS=$as_save_IFS >+ test -z "$as_dir" && as_dir=. >+ for ac_exec_ext in '' $ac_executable_extensions; do >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" >+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 >+ break 2 >+ fi >+done >+ done >+IFS=$as_save_IFS >+ >+fi >+fi >+AR=$ac_cv_prog_AR >+if test -n "$AR"; then >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 >+$as_echo "$AR" >&6; } >+else >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >+$as_echo "no" >&6; } >+fi >+ >+ >+ test -n "$AR" && break >+ done >+fi >+if test -z "$AR"; then >+ ac_ct_AR=$AR >+ for ac_prog in ar lib "link -lib" >+do >+ # Extract the first word of "$ac_prog", so it can be a program name with args. >+set dummy $ac_prog; ac_word=$2 >+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 >+$as_echo_n "checking for $ac_word... " >&6; } >+if ${ac_cv_prog_ac_ct_AR+:} false; then : >+ $as_echo_n "(cached) " >&6 >+else >+ if test -n "$ac_ct_AR"; then >+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. >+else >+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR >+for as_dir in $PATH >+do >+ IFS=$as_save_IFS >+ test -z "$as_dir" && as_dir=. >+ for ac_exec_ext in '' $ac_executable_extensions; do >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then >+ ac_cv_prog_ac_ct_AR="$ac_prog" >+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 >+ break 2 >+ fi >+done >+ done >+IFS=$as_save_IFS >+ >+fi >+fi >+ac_ct_AR=$ac_cv_prog_ac_ct_AR >+if test -n "$ac_ct_AR"; then >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 >+$as_echo "$ac_ct_AR" >&6; } >+else >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >+$as_echo "no" >&6; } >+fi >+ >+ >+ test -n "$ac_ct_AR" && break >+done >+ >+ if test "x$ac_ct_AR" = x; then >+ AR="false" >+ else >+ case $cross_compiling:$ac_tool_warned in >+yes:) >+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 >+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} >+ac_tool_warned=yes ;; >+esac >+ AR=$ac_ct_AR >+ fi >+fi >+ >+: ${AR=ar} >+ >+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 >+$as_echo_n "checking the archiver ($AR) interface... " >&6; } >+if ${am_cv_ar_interface+:} false; then : >+ $as_echo_n "(cached) " >&6 >+else >+ ac_ext=c >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >+ac_compiler_gnu=$ac_cv_c_compiler_gnu >+ >+ am_cv_ar_interface=ar >+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext >+/* end confdefs.h. */ >+int some_variable = 0; >+_ACEOF >+if ac_fn_c_try_compile "$LINENO"; then : >+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' >+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 >+ (eval $am_ar_try) 2>&5 >+ ac_status=$? >+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >+ test $ac_status = 0; } >+ if test "$ac_status" -eq 0; then >+ am_cv_ar_interface=ar >+ else >+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' >+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 >+ (eval $am_ar_try) 2>&5 >+ ac_status=$? >+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >+ test $ac_status = 0; } >+ if test "$ac_status" -eq 0; then >+ am_cv_ar_interface=lib >+ else >+ am_cv_ar_interface=unknown >+ fi >+ fi >+ rm -f conftest.lib libconftest.a >+ >+fi >+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext >+ ac_ext=c >+ac_cpp='$CPP $CPPFLAGS' >+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' >+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' >+ac_compiler_gnu=$ac_cv_c_compiler_gnu >+ >+fi >+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 >+$as_echo "$am_cv_ar_interface" >&6; } >+ >+case $am_cv_ar_interface in >+ar) >+ ;; >+lib) >+ # Microsoft lib, so override with the ar-lib wrapper script. >+ # FIXME: It is wrong to rewrite AR. >+ # But if we don't then we get into trouble of one sort or another. >+ # A longer-term fix would be to have automake use am__AR in this case, >+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something >+ # similar. >+ AR="$am_aux_dir/ar-lib $AR" >+ ;; >+unknown) >+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5 >+ ;; >+esac >+ >+ > # This is mainly for my use during testing and development. > # Yes, it's a bit of a hack. > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special development options" >&5 >diff --git a/configure.ac b/configure.ac >index 31364ab8..3f972e7f 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -105,6 +105,9 @@ AC_EXEEXT > AC_PROG_INSTALL > AC_PROG_MAKE_SET > >+# support/ builds libsupport.a >+AM_PROG_AR >+ > # This is mainly for my use during testing and development. > # Yes, it's a bit of a hack. > AC_MSG_CHECKING([for special development options]) >diff --git a/doc/Makefile.in b/doc/Makefile.in >index e38e3f38..298dbc71 100644 >--- a/doc/Makefile.in >+++ b/doc/Makefile.in >@@ -230,6 +230,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -307,6 +308,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >diff --git a/extras/Makefile.in b/extras/Makefile.in >index a9e4fd2a..f087564f 100644 >--- a/extras/Makefile.in >+++ b/extras/Makefile.in >@@ -187,6 +187,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -264,6 +265,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >diff --git a/support/Makefile.in b/support/Makefile.in >index 28e2c0ca..cac49744 100644 >--- a/support/Makefile.in >+++ b/support/Makefile.in >@@ -133,7 +133,6 @@ CONFIG_HEADER = $(top_builddir)/config.h > CONFIG_CLEAN_FILES = > CONFIG_CLEAN_VPATH_FILES = > LIBRARIES = $(noinst_LIBRARIES) >-AR = ar > ARFLAGS = cru > AM_V_AR = $(am__v_AR_@AM_V@) > am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) >@@ -208,6 +207,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -285,6 +285,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >diff --git a/test/Makefile.in b/test/Makefile.in >index f5f8e05a..dd1f8316 100644 >--- a/test/Makefile.in >+++ b/test/Makefile.in >@@ -157,6 +157,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) > ACLOCAL = @ACLOCAL@ > AMTAR = @AMTAR@ > AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ >+AR = @AR@ > AUTOCONF = @AUTOCONF@ > AUTOHEADER = @AUTOHEADER@ > AUTOMAKE = @AUTOMAKE@ >@@ -234,6 +235,7 @@ abs_builddir = @abs_builddir@ > abs_srcdir = @abs_srcdir@ > abs_top_builddir = @abs_top_builddir@ > abs_top_srcdir = @abs_top_srcdir@ >+ac_ct_AR = @ac_ct_AR@ > ac_ct_CC = @ac_ct_CC@ > acl_shlibext = @acl_shlibext@ > am__include = @am__include@ >-- >2.26.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 720450
:
635708
| 641672