From: Alan Modra <amodra@gmail.com>
To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o
Date: Wed, 28 Sep 2016 01:26:00 -0000 [thread overview]
Message-ID: <20160928011338.GG3336@bubble.grove.modra.org> (raw)
In-Reply-To: <20160928011145.GF3336@bubble.grove.modra.org>
compatibility-ldbl.o is compiled with -mlong-double-64. When
long double .gnu_attribute tags are checked by the linker, it
complains about the mismatch between this file and others in
libstdc++.
Bootstrapped and regression tested powerpc64le-linux and
powerpc64-linux biarch. OK to apply?
* 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.
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index baf605c..4a5de8c 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-attr" ;;
+ 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/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 00a6168..d9830c2 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.
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2016-09-28 1:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 1:20 [PATCH 1/2][RS6000] .gnu.attribute Tag_GNU_Power_ABI_FP Alan Modra
2016-09-28 1:26 ` Alan Modra [this message]
2016-09-28 2:49 ` [PATCH 2/2] Disable .gnu_attribute tags in compatibility-ldbl.o Joseph Myers
2016-09-28 4:41 ` Alan Modra
2016-09-28 17:34 ` Joseph Myers
2016-09-28 9:04 ` Segher Boessenkool
2016-09-28 2:00 ` [PATCH 1/2][RS6000] .gnu.attribute Tag_GNU_Power_ABI_FP Joseph Myers
2016-09-28 4:38 ` Alan Modra
2016-09-28 8:48 ` Segher Boessenkool
2016-09-29 0:57 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160928011338.GG3336@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).