HomeFreeBSD

Add kludges for old gcc builds of compiler-rt builtins

Description

Add kludges for old gcc builds of compiler-rt builtins

Only use the libgcc_cmp_return mode attribute for gcc > 4.2, as it
was only introduced in gcc 4.3.0.

Don't use __has_include() for old gcc (actually cpp), as this results in
'missing binary operator before token "("' errors. Also add a forced
<stdbool.h> include, since old gcc refuses to recognize the 'bool' type
in freestanding mode.

Use the inline __builtin_sadd_overflow() implementation (originally
provided for MSVC) for gcc < 5.0, as it was only introduced in gcc 5.0.

NOTE: since the llvm project requires at least gcc >= 5.1, these kludges should not be upstreamed.

Details

Provenance
dimAuthored on Dec 25 2021, 11:48 AM
Parents
rGdd9c06d0a662: lib/msun: Exclude ignored-pragmas from -Werror
Branches
Unknown
Tags
Unknown