diff options
-rw-r--r-- | config/ChangeLog | 6 | ||||
-rw-r--r-- | config/lib-link.m4 | 22 | ||||
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rwxr-xr-x | libcpp/configure | 29 | ||||
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 47 |
6 files changed, 85 insertions, 27 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 9c8e40a..fb33919 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,9 @@ +2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com> + + * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new + --with-libXXX-type=... option. Use this to guide the selection of + either a shared library or a static library. + 2020-01-24 Maciej W. Rozycki <macro@wdc.com> * toolexeclibdir.m4: New file. diff --git a/config/lib-link.m4 b/config/lib-link.m4 index eeb200d..662192e 100644 --- a/config/lib-link.m4 +++ b/config/lib-link.m4 @@ -150,6 +150,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], fi fi ]) + AC_LIB_ARG_WITH([lib$1-type], +[ --with-lib$1-type=TYPE type of library to search for (auto/static/shared) ], + [ with_lib$1_type=$withval ], [ with_lib$1_type=auto ]) + lib_type=`eval echo \$with_lib$1_type` + dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= @@ -195,13 +200,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 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" @@ -217,13 +222,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 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" @@ -487,8 +492,13 @@ 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.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + if x$lib_type = xauto || x$lib_type = xshared; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + else + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l:lib$name.$libext" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l:lib$name.$libext" + fi fi fi fi diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index e84c0da..ea9d602 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com> + + * configure: Regenerate. + 2020-01-24 Nathan Sidwell <nathan@acm.org> * expr.c (parse_has_include): Remove bogus controlling macro code. diff --git a/libcpp/configure b/libcpp/configure index a7aa35c..7e53cad 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -730,6 +730,7 @@ enable_werror_always with_gnu_ld enable_rpath with_libiconv_prefix +with_libiconv_type enable_maintainer_mode enable_checking enable_canonical_system_headers @@ -1383,6 +1384,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) Some influential environment variables: CC C compiler command @@ -6753,6 +6755,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= @@ -6790,13 +6802,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" @@ -6820,13 +6832,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" @@ -7054,8 +7066,13 @@ fi done fi else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + if x$lib_type = xauto || 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 diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2b877a8..e49950c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com> + + * configure: Regenerate. + 2020-01-27 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/93426 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 3af3dec..60ad38b 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -931,6 +931,7 @@ enable_libstdcxx_time enable_tls enable_rpath with_libiconv_prefix +with_libiconv_type with_system_libunwind enable_linux_futex enable_symvers @@ -1665,6 +1666,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-system-libunwind use installed libunwind --with-default-libstdcxx-abi set the std::string ABI to use by default @@ -12057,7 +12059,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12060 "configure" +#line 12062 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12163,7 +12165,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12166 "configure" +#line 12168 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15855,7 +15857,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15858 "configure" +#line 15860 "configure" int main() { typedef bool atomic_type; @@ -15890,7 +15892,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15893 "configure" +#line 15895 "configure" int main() { typedef short atomic_type; @@ -15925,7 +15927,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15928 "configure" +#line 15930 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15961,7 +15963,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15964 "configure" +#line 15966 "configure" int main() { typedef long long atomic_type; @@ -16114,7 +16116,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16117 "configure" +#line 16119 "configure" int main() { _Decimal32 d1; @@ -16156,7 +16158,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16159 "configure" +#line 16161 "configure" template<typename T1, typename T2> struct same { typedef T2 type; }; @@ -16190,7 +16192,7 @@ $as_echo "$enable_int128" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16193 "configure" +#line 16195 "configure" template<typename T1, typename T2> struct same { typedef T2 type; }; @@ -29156,6 +29158,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= @@ -29193,13 +29205,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" @@ -29223,13 +29235,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" @@ -29457,8 +29469,13 @@ fi done fi else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + if x$lib_type = xauto || 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 |