Skip to content
Snippets Groups Projects
  • Rainer Orth's avatar
    593c8b73
    fixincludes: Bypass solaris_math_12 on newer Solaris 11.4 · 593c8b73
    Rainer Orth authored
    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.
    593c8b73
    History
    fixincludes: Bypass solaris_math_12 on newer Solaris 11.4
    Rainer Orth authored
    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.