Fixes after recent configure changes relating to static libraries
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 30 Jan 2020 12:18:13 +0000 (12:18 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 1 Feb 2020 00:34:28 +0000 (00:34 +0000)
This commit:

  commit e7c26e04b2dd6266d62d5a5825ff7eb44d1cf14e (tjteru/master)
  Date:   Wed Jan 22 14:54:26 2020 +0000

      gcc: Add new configure options to allow static libraries to be selected

contains a couple of issues.  First I failed to correctly regenerate
all of the configure files it should have done.  Second, there was a
mistake in lib-link.m4, one of the conditions didn't use pure sh
syntax, I wrote this:

  if x$lib_type = xauto || x$lib_type = xshared; then

When I should have written this:

  if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then

These issues were raised on the mailing list in these messages:

  https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01827.html
  https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01921.html

config/ChangeLog:

* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.

gcc/ChangeLog:

* configure: Regenerate.

intl/ChangeLog:

* configure: Regenerate.

libcpp/ChangeLog:

* configure: Regenerate.

libstdc++-v3/ChangeLog:

* configure: Regenerate.

config/ChangeLog
config/lib-link.m4
gcc/ChangeLog
gcc/configure
intl/ChangeLog
intl/configure
libcpp/ChangeLog
libcpp/configure
libstdc++-v3/ChangeLog
libstdc++-v3/configure

index fb339196a2271cdcfb1c170ff7c981d32a5742c4..f1fec81a0ca7d491dce4bd10c73fc5ca0c745365 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.
+
 2020-01-27  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new
index 662192e0a073518ccda8cc634a169dae07befb0d..20e281fd323a31eb8c416b14c9b8540cf29bb0f0 100644 (file)
@@ -492,7 +492,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
             dnl known to the linker and runtime loader. (All the system
             dnl directories known to the linker should also be known to the
             dnl runtime loader, otherwise the system is severely misconfigured.)
-            if x$lib_type = xauto || x$lib_type = xshared; then
+            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
               LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
               LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
             else
index e4a3efd4fd36cd6e9f2e4fc7df37955e5c5f3a45..2d1488cff364ecb94d11828764f3dfd8c7a9723e 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * configure: Regenerate.
+
 2020-01-31  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/91333
index e2c8fc7177274378be29bc4072af97645650895f..4c2c5991c0e8ca966fd26e948a4e70e218064d75 100755 (executable)
@@ -974,6 +974,7 @@ with_zstd_include
 with_zstd_lib
 enable_rpath
 with_libiconv_prefix
+with_libiconv_type
 enable_sjlj_exceptions
 with_gcc_major_version_only
 enable_secureplt
@@ -1811,6 +1812,7 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-libiconv-type=TYPE     type of library to search for (auto/static/shared)
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
   --with-pic              try to use only PIC/non-PIC objects [default=use
@@ -10730,6 +10732,16 @@ if test "${with_libiconv_prefix+set}" = set; then :
 
 fi
 
+
+# Check whether --with-libiconv-type was given.
+if test "${with_libiconv_type+set}" = set; then :
+  withval=$with_libiconv_type;  with_libiconv_type=$withval
+else
+   with_libiconv_type=auto
+fi
+
+  lib_type=`eval echo \$with_libiconv_type`
+
       LIBICONV=
   LTLIBICONV=
   INCICONV=
           found_so=
           found_a=
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
               found_dir="$additional_libdir"
               found_so="$additional_libdir/lib$name.$shlibext"
               if test -f "$additional_libdir/lib$name.la"; then
                 found_la="$additional_libdir/lib$name.la"
               fi
-            else
+            elif test x$lib_type != xshared; then
               if test -f "$additional_libdir/lib$name.$libext"; then
                 found_dir="$additional_libdir"
                 found_a="$additional_libdir/lib$name.$libext"
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
                     found_dir="$dir"
                     found_so="$dir/lib$name.$shlibext"
                     if test -f "$dir/lib$name.la"; then
                       found_la="$dir/lib$name.la"
                     fi
-                  else
+                  elif test x$lib_type != xshared; then
                     if test -f "$dir/lib$name.$libext"; then
                       found_dir="$dir"
                       found_a="$dir/lib$name.$libext"
               done
             fi
           else
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
+              LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+            else
+              LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
+              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
+            fi
           fi
         fi
       fi
index 8c936960c30efbf93f0a3e215010e99bbd43704a..fa518ec154a173d7a2451ddec4f2bb00f64e7006 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * configure: Regenerate.
+
 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
 
         * configure: Regenerated.
index 2f35993148e526cdb9ce68d04dae16a0e5d7b5ae..870b29f7d3fe660ba3d16b50a0c2dbad62dd3a34 100755 (executable)
@@ -719,8 +719,10 @@ enable_nls
 with_gnu_ld
 enable_rpath
 with_libiconv_prefix
+with_libiconv_type
 with_included_gettext
 with_libintl_prefix
+with_libintl_type
 enable_maintainer_mode
 '
       ac_precious_vars='build_alias
@@ -1353,9 +1355,11 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-libiconv-type=TYPE     type of library to search for (auto/static/shared)
   --with-included-gettext use the GNU gettext library included here
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
+  --with-libintl-type=TYPE     type of library to search for (auto/static/shared)
 
 Some influential environment variables:
   CC          C compiler command
@@ -5195,6 +5199,16 @@ if test "${with_libiconv_prefix+set}" = set; then :
 
 fi
 
+
+# Check whether --with-libiconv-type was given.
+if test "${with_libiconv_type+set}" = set; then :
+  withval=$with_libiconv_type;  with_libiconv_type=$withval
+else
+   with_libiconv_type=auto
+fi
+
+  lib_type=`eval echo \$with_libiconv_type`
+
       LIBICONV=
   LTLIBICONV=
   INCICONV=
@@ -5232,13 +5246,13 @@ fi
           found_so=
           found_a=
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
               found_dir="$additional_libdir"
               found_so="$additional_libdir/lib$name.$shlibext"
               if test -f "$additional_libdir/lib$name.la"; then
                 found_la="$additional_libdir/lib$name.la"
               fi
-            else
+            elif test x$lib_type != xshared; then
               if test -f "$additional_libdir/lib$name.$libext"; then
                 found_dir="$additional_libdir"
                 found_a="$additional_libdir/lib$name.$libext"
@@ -5262,13 +5276,13 @@ fi
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
                     found_dir="$dir"
                     found_so="$dir/lib$name.$shlibext"
                     if test -f "$dir/lib$name.la"; then
                       found_la="$dir/lib$name.la"
                     fi
-                  else
+                  elif test x$lib_type != xshared; then
                     if test -f "$dir/lib$name.$libext"; then
                       found_dir="$dir"
                       found_a="$dir/lib$name.$libext"
@@ -5496,8 +5510,13 @@ fi
               done
             fi
           else
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
+              LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+            else
+              LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
+              LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
+            fi
           fi
         fi
       fi
@@ -6026,6 +6045,16 @@ if test "${with_libintl_prefix+set}" = set; then :
 
 fi
 
+
+# Check whether --with-libintl-type was given.
+if test "${with_libintl_type+set}" = set; then :
+  withval=$with_libintl_type;  with_libintl_type=$withval
+else
+   with_libintl_type=auto
+fi
+
+  lib_type=`eval echo \$with_libintl_type`
+
       LIBINTL=
   LTLIBINTL=
   INCINTL=
@@ -6063,13 +6092,13 @@ fi
           found_so=
           found_a=
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
               found_dir="$additional_libdir"
               found_so="$additional_libdir/lib$name.$shlibext"
               if test -f "$additional_libdir/lib$name.la"; then
                 found_la="$additional_libdir/lib$name.la"
               fi
-            else
+            elif test x$lib_type != xshared; then
               if test -f "$additional_libdir/lib$name.$libext"; then
                 found_dir="$additional_libdir"
                 found_a="$additional_libdir/lib$name.$libext"
@@ -6093,13 +6122,13 @@ fi
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
                     found_dir="$dir"
                     found_so="$dir/lib$name.$shlibext"
                     if test -f "$dir/lib$name.la"; then
                       found_la="$dir/lib$name.la"
                     fi
-                  else
+                  elif test x$lib_type != xshared; then
                     if test -f "$dir/lib$name.$libext"; then
                       found_dir="$dir"
                       found_a="$dir/lib$name.$libext"
@@ -6327,8 +6356,13 @@ fi
               done
             fi
           else
-                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
-            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
+              LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+              LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+            else
+              LIBINTL="${LIBINTL}${LIBINTL:+ }-l:lib$name.$libext"
+              LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l:lib$name.$libext"
+            fi
           fi
         fi
       fi
index f749622a5f736233621d00d6119eee246ae15da1..e61700f7ee96cecd52becfe706d60843940aa866 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * configure: Regenerate.
+
 2020-01-28  Nathan Sidwell  <nathan@acm.org>
 
        PR preprocessor/93452
index 7e53cade210675c7784ed8dfe898978092e97c3b..11da199083b0fdf6056ac993914da6aee25d4569 100755 (executable)
@@ -7066,7 +7066,7 @@ fi
               done
             fi
           else
-                                                            if x$lib_type = xauto || x$lib_type = xshared; then
+                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
               LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
               LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
             else
index 966e7dfc3cc6dc0557d2dcf69e889e9bf0093e53..d87520147df7cc2f5b2b9d5cc560f719d061cdc3 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * configure: Regenerate.
+
 2020-01-31  Patrick Palka  <ppalka@redhat.com>
 
        * testsuite/24_iterators/range_operations/distance.cc: Do not assume
index 5e2892121f45e9b520edbb45e9dbd790a48ec5d8..a39c33b055d29aa0e1ca1c4984f4f020776d1e4c 100755 (executable)
@@ -29506,7 +29506,7 @@ fi
               done
             fi
           else
-                                                            if x$lib_type = xauto || x$lib_type = xshared; then
+                                                            if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
               LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
               LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
             else