bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk build hardcodes AR and ARFLAGS


From: arnold
Subject: Re: gawk build hardcodes AR and ARFLAGS
Date: Sun, 15 Aug 2021 08:43:15 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Jacob Burkholder <jake.burkholder2@gmail.com> wrote:

> Hi, I had trouble compiling gawk on a system that has
> x86_64-pc-linux-gnu-ar but not ar.  I don't want to cross compile, I want
> to override the ar used during the build with AR= like I do for CC=, but
> gawk hardcodes AR and ARFLAGS in support/Makefile.in.  I fixed it with the
> attached patch, other packages like m4 have a lot more logic for setting AR
> in configure that I didn't duplicate.  Any chance to get this fixed?

Thanks for the report. Below is the patch I've committed to git.

Arnold
---------------------------
diff --git a/ChangeLog b/ChangeLog
index 4e82bffb..ff1f213a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-08-15         Arnold D. Robbins     <arnold@skeeve.com>
+
+       Allow setting AR and ARFLAGS on the configure command line.
+       Thanks to Jacob Burkholder <jake.burkholder2@gmail.com> for
+       the report.
+
+       * configure.ac (AR_FLAGS): Provide default value.
+       (AR): Call AC_SUBST on it.
+
 2021-08-13         Arnold D. Robbins     <arnold@skeeve.com>
 
        * builtin.c (do_sub): Rationalize handling of strongly typed
diff --git a/configure b/configure
index d9003da0..50a05114 100755
--- a/configure
+++ b/configure
@@ -5677,6 +5677,9 @@ unknown)
 esac
 
 
+AR_FLAGS = cru         # set default
+
+
 # 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 69c6524e..8fe35f89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,9 @@ AC_PROG_MAKE_SET
 # support/ builds libsupport.a, allow for cross version of ar
 AM_PROG_AR
 
+AR_FLAGS = cru         # set default
+AC_SUBST(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/support/ChangeLog b/support/ChangeLog
index 8baacf3c..81b564aa 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2021-08-15         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (AR): Set from @AR@ so that it can be set
+       at configure time.
+
 2021-06-30         Arnold D. Robbins     <arnold@skeeve.com>
 
        * dfa.c, dynarray.h, libc-config.h, regexec.c,
diff --git a/support/Makefile.am b/support/Makefile.am
index 18e50204..a2d2df05 100644
--- a/support/Makefile.am
+++ b/support/Makefile.am
@@ -26,6 +26,8 @@
 AM_CFLAGS  = @CFLAGS@
 AM_LDFLAGS = @LDFLAGS@
 
+AR = @AR@
+
 # Stuff to include in the dist that doesn't need it's own
 # Makefile.am files
 EXTRA_DIST = \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]