From 6d49b790fd00f004b9580d85788b8e6b9475e4aa Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 29 Sep 2016 07:33:17 +0930 Subject: [PATCH] Disable .gnu.attributes tags in compatibility-ldbl.o compatibility-ldbl.o is compiled with -mlong-double-64. When long double .gnu.attributes tags are checked by the linker, it complains about the mismatch between this file and others in libstdc++. * configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST. * src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo): Use LONG_DOUBLE_COMPAT_FLAGS. * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r240602 --- libstdc++-v3/ChangeLog | 18 ++++++++++++++++++ libstdc++-v3/Makefile.in | 1 + libstdc++-v3/configure | 25 ++++++++++++++++--------- libstdc++-v3/configure.ac | 6 ++++++ libstdc++-v3/doc/Makefile.in | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/libsupc++/Makefile.in | 1 + libstdc++-v3/po/Makefile.in | 1 + libstdc++-v3/python/Makefile.in | 1 + libstdc++-v3/src/Makefile.am | 4 ++-- libstdc++-v3/src/Makefile.in | 5 +++-- libstdc++-v3/src/c++11/Makefile.in | 1 + libstdc++-v3/src/c++98/Makefile.in | 1 + libstdc++-v3/src/filesystem/Makefile.in | 1 + libstdc++-v3/testsuite/Makefile.in | 1 + 15 files changed, 55 insertions(+), 13 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ee5a63fc45c..d0e2980462c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,21 @@ +2016-09-29 Alan Modra + + * configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST. + * src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo): + Use LONG_DOUBLE_COMPAT_FLAGS. + * Makefile.in: Regenerate. + * configure: Regenerate. + * doc/Makefile.in: Regenerate. + * include/Makefile.in: Regenerate. + * libsupc++/Makefile.in: Regenerate. + * po/Makefile.in: Regenerate. + * python/Makefile.in: Regenerate. + * src/Makefile.in: Regenerate. + * src/c++11/Makefile.in: Regenerate. + * src/c++98/Makefile.in: Regenerate. + * src/filesystem/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + 2016-09-28 Jonathan Wakely * include/std/chrono (system_clock): Fix typo in comment. diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index 3159b714a1a..c29c09c126f 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -191,6 +191,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 04612bde76e..f7b424b9e63 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -645,6 +645,7 @@ baseline_dir HWCAP_FLAGS GLIBCXX_LDBL_COMPAT_FALSE GLIBCXX_LDBL_COMPAT_TRUE +LONG_DOUBLE_COMPAT_FLAGS ENABLE_CXX11_ABI_FALSE ENABLE_CXX11_ABI_TRUE glibcxx_cxx98_abi @@ -11596,7 +11597,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11599 "configure" +#line 11600 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11702,7 +11703,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11705 "configure" +#line 11706 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15388,7 +15389,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15391 "configure" +#line 15392 "configure" int main() { typedef bool atomic_type; @@ -15423,7 +15424,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15426 "configure" +#line 15427 "configure" int main() { typedef short atomic_type; @@ -15458,7 +15459,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15461 "configure" +#line 15462 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15494,7 +15495,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15497 "configure" +#line 15498 "configure" int main() { typedef long long atomic_type; @@ -15575,7 +15576,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15578 "configure" +#line 15579 "configure" int main() { _Decimal32 d1; @@ -15617,7 +15618,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15620 "configure" +#line 15621 "configure" template struct same { typedef T2 type; }; @@ -15651,7 +15652,7 @@ $as_echo "$enable_int128" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15654 "configure" +#line 15655 "configure" template struct same { typedef T2 type; }; @@ -79344,6 +79345,7 @@ $as_echo "${default_libstdcxx_abi}" >&6; } ac_ldbl_compat=no +LONG_DOUBLE_COMPAT_FLAGS="-mlong-double-64" case "$target" in powerpc*-*-linux* | \ sparc*-*-linux* | \ @@ -79375,10 +79377,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "#define _GLIBCXX_LONG_DOUBLE_COMPAT 1" >>confdefs.h port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver" + case "$target" in + powerpc*-*-linux*) + LONG_DOUBLE_COMPAT_FLAGS="$LONG_DOUBLE_COMPAT_FLAGS -mno-gnu-attribute" ;; + esac fi esac + # Check if assembler supports disabling hardware capability support. test -z "$HWCAP_FLAGS" && HWCAP_FLAGS='' diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index baf605cfea6..7d0fafab514 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -375,6 +375,7 @@ GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI([yes]) GLIBCXX_DEFAULT_ABI ac_ldbl_compat=no +LONG_DOUBLE_COMPAT_FLAGS="-mlong-double-64" case "$target" in powerpc*-*-linux* | \ sparc*-*-linux* | \ @@ -389,8 +390,13 @@ case "$target" in AC_DEFINE([_GLIBCXX_LONG_DOUBLE_COMPAT],1, [Define if compatibility should be provided for -mlong-double-64.]) port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver" + case "$target" in + powerpc*-*-linux*) + LONG_DOUBLE_COMPAT_FLAGS="$LONG_DOUBLE_COMPAT_FLAGS -mno-gnu-attribute" ;; + esac fi esac +AC_SUBST(LONG_DOUBLE_COMPAT_FLAGS) GLIBCXX_CONDITIONAL(GLIBCXX_LDBL_COMPAT, test $ac_ldbl_compat = yes) # Check if assembler supports disabling hardware capability support. diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in index 3e729c130e7..c3874f757a4 100644 --- a/libstdc++-v3/doc/Makefile.in +++ b/libstdc++-v3/doc/Makefile.in @@ -163,6 +163,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 502a89e1fb0..4e2b9e4f676 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -163,6 +163,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index e828ed909ca..3e663e0026a 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -236,6 +236,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index 13993c85819..83f13d08a95 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -163,6 +163,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in index 25b2ed487b2..dcc9e06be43 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -193,6 +193,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 00a6168508d..d9830c2a8db 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -109,9 +109,9 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) # pass -mlong-double-64. if GLIBCXX_LDBL_COMPAT compatibility-ldbl.lo: compatibility-ldbl.cc - $(LTCXXCOMPILE) -mlong-double-64 -c $< + $(LTCXXCOMPILE) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< compatibility-ldbl.o: compatibility-ldbl.cc - $(CXXCOMPILE) -mlong-double-64 -c $< + $(CXXCOMPILE) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< endif # Use special rules for C++11 files/objects. diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 09fe24eab67..ed532699fe7 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -226,6 +226,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ @@ -902,9 +903,9 @@ vpath % $(top_srcdir)/src/c++11 # Use special rules for compatibility-ldbl.cc compilation, as we need to # pass -mlong-double-64. @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc -@GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) -mlong-double-64 -c $< +@GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc -@GLIBCXX_LDBL_COMPAT_TRUE@ $(CXXCOMPILE) -mlong-double-64 -c $< +@GLIBCXX_LDBL_COMPAT_TRUE@ $(CXXCOMPILE) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< # Use special rules for C++11 files/objects. compatibility-c++0x.lo: compatibility-c++0x.cc diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index 30c4a23b87a..465ec3a4fb8 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -196,6 +196,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index 931f8793216..591fe709476 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -197,6 +197,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in index 7e77aa55b8b..a620c68f017 100644 --- a/libstdc++-v3/src/filesystem/Makefile.in +++ b/libstdc++-v3/src/filesystem/Makefile.in @@ -205,6 +205,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 31fa94c42cb..b37758b2ccb 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -163,6 +163,7 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -- 2.30.2