Skip to content

Commit

Permalink
macOS related patches for 10.45 (#668)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
carenas authored Jan 13, 2025
1 parent c99e809 commit 95181ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion maint/ManyConfigTests
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/pcre2_jit_neon_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 95181ff

Please sign in to comment.