macOS related patches for 10.45 (#668)

* autotools: retire conditional for debug build

likely added by mistake, the functionality works through `--enable-debug`
instead.

* maint: allow selecting compiler for ManyConfigTests

Instead of hardcoding the compiler as `cc`, let a CC environment
variable dictate which compiler to use.

For example, in macOS/arm64 where the GNU compiler is provided by
brew the following will allow using it instead of the system compiler
(which ALSO answers to `gcc` even though is `clang`)

  % CC=gcc-13 maint/ManyConfigTests
This commit is contained in:
Carlo Marcelo Arenas Belón
2025-01-13 07:42:07 -08:00
committed by GitHub
parent c99e809565
commit 95181ffc05
3 changed files with 3 additions and 3 deletions

View File

@@ -569,7 +569,6 @@ AC_CHECK_HEADERS([sys/wait.h], [HAVE_SYS_WAIT_H=1])
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
AM_CONDITIONAL(WITH_DEBUG, test "x$enable_debug" = "xyes")
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")

View File

@@ -110,11 +110,12 @@ tmp=/tmp/pcre2testing
CFLAGS="-g"
OFLAGS="-O0"
CC="${CC:=cc}"
ISGCC=0
# If the compiler is gcc, add a lot of warning switches.
cc --version >/tmp/pcre2ccversion 2>/dev/null
$CC --version >/tmp/pcre2ccversion 2>/dev/null
if [ $? -eq 0 ] && grep GCC /tmp/pcre2ccversion >/dev/null; then
ISGCC=1
CFLAGS="$CFLAGS -Wall"

View File

@@ -87,7 +87,7 @@ POSSIBILITY OF SUCH DAMAGE.
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#endif
#if (defined(__GNUC__) && __SANITIZE_ADDRESS__) \
#if (defined(__GNUC__) && defined(__SANITIZE_ADDRESS__) && __SANITIZE_ADDRESS__ ) \
|| (defined(__clang__) \
&& ((__clang_major__ == 3 && __clang_minor__ >= 3) || (__clang_major__ > 3)))
__attribute__((no_sanitize_address))