https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92906
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #4) > (In reply to Jakub Jelinek from comment #3) > > Yet another possibility is to create these in libsupc++ in assembly, but > > that would need to be macroized. > > I was assuming we'd do that. It would be ugly, but no worse than some of the > other compat hacks we aready have. That is something we already have in the Red Hat Developer Toolset libstdc++_nonshared.a, like below. Just note that this isn't ifdefed completely out if DFP is enabled (could use e.g. configure test or something for that, compile: namespace __cxxabiv1 { class __class_type_info; } namespace std { struct type_info { virtual ~type_info(); virtual bool __is_pointer_p() const; virtual bool __is_function_p() const; virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; const char *__name; explicit type_info(const char *__n): __name(__n) { } type_info& operator=(const type_info&); type_info(const type_info&); }; } namespace __cxxabiv1 { struct __fundamental_type_info : public std::type_info { explicit __fundamental_type_info(const char* __n) : std::type_info(__n) { } virtual ~__fundamental_type_info(); }; __fundamental_type_info::~__fundamental_type_info () {} } and check for those DFP symbols in there) and supports only the architectures RHEL cares about (plus ia64), the abi-tag note also would need to be specific. Or perhaps instead a script that would parse assembly emitted for the above source code and adjust it to contain the DFP symbols instead of all the others. Though, the FE hack seems to be easiest to me. /* Copyright (C) 2012-2017 Free Software Foundation, Inc. This file is part of the GNU ISO C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #if defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __ia64__ || defined __aarch64__ \ || defined __i386__ || defined __powerpc__ || defined __s390__ #ifdef __i386__ #define ALIGN1 .align 4 #elif defined __x86_64__ #define ALIGN1 .align 32 #define ALIGN2 .align 16 #elif defined __ia64__ #define ALIGN1 .align 8 #define ALIGN3 .align 8 #define SECTION3(x).section .gnu.linkonce.s.x,"aws",@progbits #define POINTER data8 #define FLAGS data4 #define PAD .skip 4 #define STRING stringz #elif defined __powerpc64__ #define ALIGN1 .align 3 #define ALIGN3 .align 3 #elif defined __powerpc__ #define ALIGN1 .align 2 #define ALIGN3 .align 2 #define SECTION2(x).section .gnu.linkonce.s.x,"aw",@progbits #define SECTION3(x)SECTION2(x) #elif defined __aarch64__ #define ALIGN1 .align 3 #define ALIGN3 .align 3 #define POINTER .xword #define FLAGS .word #define OBJECT %object #elif defined __s390x__ #define ALIGN1 .align 8 #define ALIGN3 .align 2 #elif defined __s390__ #define ALIGN1 .align 4 #define ALIGN3 .align 2 #endif #if defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __ia64__ || defined __aarch64__ #define SIZE1 32 #define SIZE2 16 #define OFF 16 #ifndef POINTER #define POINTER .quad #endif #ifndef FLAGS #define FLAGS .long #endif #ifndef PAD #define PAD .zero 4 #endif #else #define SIZE1 16 #define SIZE2 8 #define OFF 8 #ifndef POINTER #define POINTER .long #endif #ifndef FLAGS #define FLAGS .long #endif #ifndef PAD #define PAD #endif #endif #ifndef SYM #define SYM(x)x #endif #ifndef ALIGN2 #define ALIGN2 ALIGN1 #endif #ifndef ALIGN3 #define ALIGN3 #endif #ifndef OBJECT #define OBJECT @object #endif #ifndef SECTION1 #define SECTION1(x).section .gnu.linkonce.d.rel.ro.x,"aw",@progbits #endif #ifndef SECTION2 #define SECTION2(x)SECTION1(x) #endif #ifndef SECTION3 #define SECTION3(x).section .gnu.linkonce.r.x,"a",@progbits #endif #ifndef STRING #define STRING .string #endif .weak SYM(_ZTIPKDd) SECTION1(_ZTIPKDd) ALIGN1 .type SYM(_ZTIPKDd), OBJECT .size SYM(_ZTIPKDd), SIZE1 _ZTIPKDd: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPKDd) FLAGS 1 PAD POINTER SYM(_ZTIDd) .weak SYM(_ZTIPDd) SECTION1(_ZTIPDd) ALIGN1 .type SYM(_ZTIPDd), OBJECT .size SYM(_ZTIPDd), SIZE1 _ZTIPDd: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPDd) FLAGS 0 PAD POINTER SYM(_ZTIDd) .weak SYM(_ZTIDd) SECTION2(_ZTIDd) ALIGN2 .type SYM(_ZTIDd), OBJECT .size SYM(_ZTIDd), SIZE2 _ZTIDd: POINTER SYM(_ZTVN10__cxxabiv123__fundamental_type_infoE)+OFF POINTER SYM(_ZTSDd) .weak SYM(_ZTIPKDe) SECTION1(_ZTIPKDe) ALIGN1 .type SYM(_ZTIPKDe), OBJECT .size SYM(_ZTIPKDe), SIZE1 _ZTIPKDe: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPKDe) FLAGS 1 PAD POINTER SYM(_ZTIDe) .weak SYM(_ZTIPDe) SECTION1(_ZTIPDe) ALIGN1 .type SYM(_ZTIPDe), OBJECT .size SYM(_ZTIPDe), SIZE1 _ZTIPDe: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPDe) FLAGS 0 PAD POINTER SYM(_ZTIDe) .weak SYM(_ZTIDe) SECTION2(_ZTIDe) ALIGN2 .type SYM(_ZTIDe), OBJECT .size SYM(_ZTIDe), SIZE2 _ZTIDe: POINTER SYM(_ZTVN10__cxxabiv123__fundamental_type_infoE)+OFF POINTER SYM(_ZTSDe) .weak SYM(_ZTIPKDf) SECTION1(_ZTIPKDf) ALIGN1 .type SYM(_ZTIPKDf), OBJECT .size SYM(_ZTIPKDf), SIZE1 _ZTIPKDf: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPKDf) FLAGS 1 PAD POINTER SYM(_ZTIDf) .weak SYM(_ZTIPDf) SECTION1(_ZTIPDf) ALIGN1 .type SYM(_ZTIPDf), OBJECT .size SYM(_ZTIPDf), SIZE1 _ZTIPDf: POINTER SYM(_ZTVN10__cxxabiv119__pointer_type_infoE)+OFF POINTER SYM(_ZTSPDf) FLAGS 0 PAD POINTER SYM(_ZTIDf) .weak SYM(_ZTIDf) SECTION2(_ZTIDf) ALIGN2 .type SYM(_ZTIDf), OBJECT .size SYM(_ZTIDf), SIZE2 _ZTIDf: POINTER SYM(_ZTVN10__cxxabiv123__fundamental_type_infoE)+OFF POINTER SYM(_ZTSDf) .weak SYM(_ZTSPKDd) .hidden SYM(_ZTSPKDd) SECTION3(_ZTSPKDd) ALIGN3 .type SYM(_ZTSPKDd), OBJECT .size SYM(_ZTSPKDd), 5 _ZTSPKDd: STRING "PKDd" .weak SYM(_ZTSPDd) .hidden SYM(_ZTSPDd) SECTION3(_ZTSPDd) ALIGN3 .type SYM(_ZTSPDd), OBJECT .size SYM(_ZTSPDd), 4 _ZTSPDd: STRING "PDd" .weak SYM(_ZTSDd) .hidden SYM(_ZTSDd) SECTION3(_ZTSDd) ALIGN3 .type SYM(_ZTSDd), OBJECT .size SYM(_ZTSDd), 3 _ZTSDd: STRING "Dd" .weak SYM(_ZTSPKDe) .hidden SYM(_ZTSPKDe) SECTION3(_ZTSPKDe) ALIGN3 .type SYM(_ZTSPKDe), OBJECT .size SYM(_ZTSPKDe), 5 _ZTSPKDe: STRING "PKDe" .weak SYM(_ZTSPDe) .hidden SYM(_ZTSPDe) SECTION3(_ZTSPDe) ALIGN3 .type SYM(_ZTSPDe), OBJECT .size SYM(_ZTSPDe), 4 _ZTSPDe: STRING "PDe" .weak SYM(_ZTSDe) .hidden SYM(_ZTSDe) SECTION3(_ZTSDe) ALIGN3 .type SYM(_ZTSDe), OBJECT .size SYM(_ZTSDe), 3 _ZTSDe: STRING "De" .weak SYM(_ZTSPKDf) .hidden SYM(_ZTSPKDf) SECTION3(_ZTSPKDf) ALIGN3 .type SYM(_ZTSPKDf), OBJECT .size SYM(_ZTSPKDf), 5 _ZTSPKDf: STRING "PKDf" .weak SYM(_ZTSPDf) .hidden SYM(_ZTSPDf) SECTION3(_ZTSPDf) ALIGN3 .type SYM(_ZTSPDf), OBJECT .size SYM(_ZTSPDf), 4 _ZTSPDf: STRING "PDf" .weak SYM(_ZTSDf) .hidden SYM(_ZTSDf) SECTION3(_ZTSDf) ALIGN3 .type SYM(_ZTSDf), OBJECT .size SYM(_ZTSDf), 3 _ZTSDf: STRING "Df" #endif .section .note.GNU-stack,"",@progbits