public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Rainer Orth <ro@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6116] fixincludes: Bypass solaris_math_12 on newer Solaris 11.4 Date: Fri, 17 Feb 2023 12:49:24 +0000 (GMT) [thread overview] Message-ID: <20230217124924.C0C743858C31@sourceware.org> (raw) https://gcc.gnu.org/g:593c8b73fb15683fdd1a9d85fe7e7e99540de3c8 commit r13-6116-g593c8b73fb15683fdd1a9d85fe7e7e99540de3c8 Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Fri Feb 17 13:48:45 2023 +0100 fixincludes: Bypass solaris_math_12 on newer Solaris 11.4 Solaris 11 <math.h> long had this snippet which badly broke libstdc++. This has long been undone using fixincludes in [fixincludes, v3] Don't define libstdc++-internal macros in Solaris 10+ <math.h> https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00330.html However, the issue came up again recently when that code broke the LLVM build, too, which unfortunately doesn't know about GCC's include-fixed directory. The issue was reinvestigated and it turned out that the workaround/hack is only needed for specific old versions of the Sun/Oracle Studio compilers. So <math.h> now looks like /* Accommodate historical C++11 -std=c++03 behavior of Studio 12.4 and 12.5 */ ((__SUNPRO_CC == 0x5130) || (__SUNPRO_CC == 0x5140) || \ defined(__MATH_PREEMPTS_GLIBCXX_C99_MATH)) If this change is in place, there's no longer a need for the fixincludes fix, so this patch bypasses it as appropriate. Tested on Solaris 11.3 (without the fixed header) and recent 11.4 (with the fixed header). 2022-11-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> fixincludes: * inclhack.def (solaris_math_12): Add bypass. * fixincl.x: Regenerate. Diff: --- fixincludes/fixincl.x | 15 +++++++++++---- fixincludes/inclhack.def | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index acb906eea29..416d2c2e3a4 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed January 18, 2023 at 09:06:47 PM by AutoGen 5.18.7 + * It has been AutoGen-ed January 22, 2023 at 09:03:29 PM by AutoGen 5.18.12 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Jan 18 21:06:47 GMT 2023 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jan 22 21:03:29 CET 2023 * * You must regenerate it. Use the ./genfixes script. * @@ -8549,8 +8549,15 @@ tSCC* apzSolaris_Math_12Machs[] = { tSCC zSolaris_Math_12Select0[] = "#undef.*_GLIBCXX_USE_C99_MATH"; -#define SOLARIS_MATH_12_TEST_CT 1 +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zSolaris_Math_12Bypass0[] = + "__MATH_PREEMPTS_GLIBCXX_C99_MATH"; + +#define SOLARIS_MATH_12_TEST_CT 2 static tTestDesc aSolaris_Math_12Tests[] = { + { TT_NEGREP, zSolaris_Math_12Bypass0, (regex_t*)NULL }, { TT_EGREP, zSolaris_Math_12Select0, (regex_t*)NULL }, }; /* @@ -11162,7 +11169,7 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 312 +#define REGEX_COUNT 313 #define MACH_LIST_SIZE_LIMIT 187 #define FIX_COUNT 274 diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index b02dd8e0575..45e0cbc0c10 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -4306,6 +4306,7 @@ fix = { files = math.h; mach = '*-*-solaris2*'; select = '#undef.*_GLIBCXX_USE_C99_MATH'; + bypass = '__MATH_PREEMPTS_GLIBCXX_C99_MATH'; sed = "/#undef[ \t]*_GLIBCXX_USE_C99_MATH/d"; test_text = << _EOText_ #if __cplusplus >= 201103L
reply other threads:[~2023-02-17 12:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230217124924.C0C743858C31@sourceware.org \ --to=ro@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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: linkBe 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).