]> gcc.gnu.org Git - gcc.git/commit
c++: Emit DFP typeinfos even when DFP is disabled [PR92906]
authorJakub Jelinek <jakub@redhat.com>
Thu, 13 Feb 2020 23:11:24 +0000 (00:11 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 13 Feb 2020 23:11:24 +0000 (00:11 +0100)
commit994e0ad41529f5518fd013474a657968807d9ca5
treeba765517b05fcbdb0e04132ad7532961e9fc8760
parent9a0c4f5b373e236cb4af5491f50862d41fd8775a
c++: Emit DFP typeinfos even when DFP is disabled [PR92906]

Before Joseph's changes when compiling
libstdc++-v3/libsupc++/fundamental_type_info.cc
we were emitting
_ZTIPDd, _ZTIPDe, _ZTIPDf, _ZTIPKDd, _ZTIPKDe, _ZTIPKDf, _ZTIDd, _ZTIDe, _ZTIDf
symbols even when DFP wasn't usable, but now we don't and thus those 9
symbols @@CXXABI_1.3.4 are gone from libstdc++.  While nothing could
probably use it (except perhaps dlsym etc.), various tools don't really like
symbols disappearing from symbol versioned shared libraries with stable ABI.
Adding those in assembly would be possible, but would be a portability
nightmare (the PR has something Red Hat uses in libstdc++_nonshared.a, but that
can handle only a handful of linux ELF targets we care about).
So, instead this patch hacks up the FE, so that it emits those, but in a way
that won't make the DFP types available again on targets that don't support
them.

2020-02-14  Jakub Jelinek  <jakub@redhat.com>

PR libstdc++/92906
* cp-tree.h (enum cp_tree_index): Add CPTI_FALLBACK_DFLOAT32_TYPE,
CPTI_FALLBACK_DFLOAT64_TYPE and CPTI_FALLBACK_DFLOAT128_TYPE.
(fallback_dfloat32_type, fallback_dfloat64_type,
fallback_dfloat128_type): Define.
* mangle.c (write_builtin_type): Handle fallback_dfloat*_type like
dfloat*_type_node.
* rtti.c (emit_support_tinfos): Emit DFP typeinfos even when dfp
is disabled for compatibility.
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/mangle.c
gcc/cp/rtti.c
This page took 0.063613 seconds and 6 git commands to generate.