From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 915583858C31 for ; Fri, 17 Feb 2023 12:49:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 915583858C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 335B2B924B; Fri, 17 Feb 2023 13:49:44 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7gF9kSelPQ4u; Fri, 17 Feb 2023 13:49:43 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5085574e.dip0.t-ipconnect.de [80.133.87.78]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 9B5B2B9803; Fri, 17 Feb 2023 13:49:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1676638183; bh=6+DP1M2yXFQomqX9MOeTXkpN4a3r1MHriqtZQXZv/Go=; h=From:To:Cc:Subject:Date:From; b=Q2SdmVMoPxX41+2ZiPnWrp5BNLVvaGyPVNzwDkU6pr8/000iX9+LVagYSzDbXwH7K RYqCluyZhDJScKH+pni5FpadTVrP6T1H/wSu82nY6F3ZpRraJVmNknKcgoi1G6x9Ji ldLWgUaR/QOMSdyreZyPA3K6h0ljXApTWlN8j/K/yJu2EHsrCaynp5/YZUJQADkvC+ Flbf2pOxRIjb+fmSEEskWtRLXo0UPATvqB523f5ELehUyySVR9dpnYgx8SQ06zKHPE TLzhIVMMdyLxU8ZcbNZ43IHr3Fbq739HjjliquSnuXFS8NY20QSYnwoEOun0jDpPCB Ye7OJ1Ui5lz2A== From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Bruce Korb Subject: [COMMITTED] fixincludes: Bypass solaris_math_12 on newer Solaris 11.4 Date: Fri, 17 Feb 2023 13:49:42 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3795.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain Solaris 11 long had this snippet #if __cplusplus >= 201103L #undef _GLIBCXX_USE_C99_MATH #undef _GLIBCXX_USE_C99_MATH_TR1 #endif which badly broke libstdc++. This has long been undone using fixincludes in [fixincludes, v3] Don't define libstdc++-internal macros in Solaris 10+ 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 now looks like /* Accommodate historical C++11 -std=c++03 behavior of Studio 12.4 and 12.5 */ #if (__cplusplus >= 201103L) && \ ((__SUNPRO_CC == 0x5130) || (__SUNPRO_CC == 0x5140) || \ defined(__MATH_PREEMPTS_GLIBCXX_C99_MATH)) #ifdef _GLIBCXX_USE_C99_MATH #undef _GLIBCXX_USE_C99_MATH #endif #ifdef _GLIBCXX_USE_C99_MATH_TR1 #undef _GLIBCXX_USE_C99_MATH_TR1 #endif #endif 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). Committed to trunk. I may backport to the gcc-11 and gcc-12 branches, too. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2022-11-01 Rainer Orth fixincludes: * inclhack.def (solaris_math_12): Add bypass. * fixincl.x: Regenerate. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-fixincludes-math_12-bypass.patch # HG changeset patch # Parent 76f1a1965f9296be97f6edc2b9610d6600036de1 fixincludes: Bypass solaris_math_12 on newer Solaris 11.4 diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def --- 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 --=-=-=--