]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libcpp, libdecnumber: configure and substitute AR
authorDavid Edelsohn <dje.gcc@gmail.com>
Sat, 23 May 2020 21:41:45 +0000 (21:41 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sat, 23 May 2020 21:59:02 +0000 (21:59 +0000)
AIX supports "FAT" libraries containing 32 bit and 64 bit objects
(similar to Darwin), but commands for manipulating libraries do not
default to accept both 32 bit and 64 bit object files.  While updating
the AIX configuration to support building and running GCC as a 64 bit
application, I have encountered some build libraries that hard code
AR=ar instead of testing the environment.

This patch adds AR_CHECK_TOOL(AR, ar) to configure.ac for the two
libraries and updates Makefile.in to accept the substitution.

2020-05-23  David Edelsohn  <dje.gcc@gmail.com>

libcpp/ChangeLog:
* Makefile.in (AR): Substitute @AR@.
* configure.ac (CHECK_PROG AR): New.
* configure: Regenerate.

libdecnumber/ChangeLog:
* Makefile.in (AR): Substitute @AR@.
* configure.ac (CHECK_PROG AR): New.
* configure: Regenerate.

libcpp/ChangeLog
libcpp/Makefile.in
libcpp/configure
libcpp/configure.ac
libdecnumber/ChangeLog
libdecnumber/Makefile.in
libdecnumber/configure
libdecnumber/configure.ac

index 622260391da34b370339959e7e811f75b8eddc7f..4c2eee4411d42de3fd8f82ab9b389fbda71b93c1 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-23  David Edelsohn  <dje.gcc@gmail.com>
+
+       * Makefile.in (AR): Substitute @AR@.
+       * configure.ac (CHECK_PROG AR): New.
+       * configure: Regenerate.
+
 2020-05-20  Nathan Sidwell  <nathan@acm.org>
 
        * internal.h (typedef _cpp_file): Delete, unnecessary in C++.
index ebbca07f542e67c1198506f1b39882711c95efd6..5fbba9b9c769ee2ecfa18330e41e3693ee6af577 100644 (file)
@@ -25,7 +25,7 @@ srcdir = @srcdir@
 top_builddir = .
 VPATH = @srcdir@
 INSTALL = @INSTALL@
-AR = ar
+AR = @AR@
 ARFLAGS = cru
 ACLOCAL = @ACLOCAL@
 AUTOCONF = @AUTOCONF@
index 7f02d6b4a9ee39166d58426b5d0a3287123a7545..6a967cff6acb253ab89da6a961b8715f778e17c0 100755 (executable)
@@ -658,6 +658,7 @@ ACLOCAL
 EGREP
 GREP
 CPP
+AR
 RANLIB
 ac_ct_CXX
 CXXFLAGS
@@ -4011,6 +4012,98 @@ else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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}ar"
+    $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
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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="ar"
+    $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
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  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
+else
+  AR="$ac_cv_prog_AR"
+fi
+
 
 
 ac_ext=c
index 540efeb4629b57dd874961bf270012f67bd56539..1efa96f7ca3fb8f8600d58f126c2717469d1d406 100644 (file)
@@ -12,6 +12,7 @@ AC_PROG_INSTALL
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB
+AC_CHECK_TOOL(AR, ar)
 
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
index 75627e4825d0914ea2bb33308fca8c47cfd52022..d9d276784f7399eb16529e947357e81208284d04 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-23  David Edelsohn  <dje.gcc@gmail.com>
+
+       * Makefile.in (AR): Substitute @AR@.
+       * configure.ac (CHECK_PROG AR): New.
+       * configure: Regenerate.
+
 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure: Regenerated.
index 9260b4849c8cd58df6e66274f6d58a58f76e1a03..9da028d7f2f462936a73bea84beae53a71cb8775 100644 (file)
@@ -25,7 +25,7 @@ srcdir = @srcdir@
 top_builddir = .
 VPATH = @srcdir@
 INSTALL = @INSTALL@
-AR = ar
+AR = @AR@
 ARFLAGS = cru
 ACLOCAL = @ACLOCAL@
 AUTOCONF = @AUTOCONF@
index c2c8040f5f3cab97b50c59ee903f634960211ecf..577b250930c0189669ce763d096d6fb0a16ae921 100755 (executable)
@@ -651,6 +651,7 @@ WARN_CFLAGS
 AUTOHEADER
 AUTOCONF
 ACLOCAL
+AR
 RANLIB
 OBJEXT
 EXEEXT
@@ -3247,6 +3248,98 @@ else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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}ar"
+    $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
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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="ar"
+    $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
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  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
+else
+  AR="$ac_cv_prog_AR"
+fi
+
 
 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
 for ac_prog in aclocal
index de7e0088ceb5bdd68e751c5238ab88ee0ed81980..ae475a02c23d179fa631e26a6d8899c3e877f48b 100644 (file)
@@ -28,6 +28,7 @@ AC_CONFIG_AUX_DIR(..)
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_CHECK_TOOL(AR, ar)
 
 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])