Module Name: src Committed By: mrg Date: Sun Feb 25 06:07:28 UTC 2024
Modified Files: src/external/gpl3/gcc/lib: Makefile.sanitizer Log Message: sanitizer needs at least i586 on x86 and at least v8 on sparc, unfortunately. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/Makefile.sanitizer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/lib/Makefile.sanitizer diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.17 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.18 --- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.17 Thu Aug 3 01:36:54 2023 +++ src/external/gpl3/gcc/lib/Makefile.sanitizer Sun Feb 25 06:07:28 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sanitizer,v 1.17 2023/08/03 01:36:54 mrg Exp $ +# $NetBSD: Makefile.sanitizer,v 1.18 2024/02/25 06:07:28 mrg Exp $ SANITIZER=${GCCDIST}/libsanitizer .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common @@ -123,3 +123,13 @@ COPTS.sanitizer_symbolizer_report.cc += COPTS.ubsan_diag.cc += -O1 COPTS.ubsan_init.cc += -O1 .endif + +# XXX GCC 12 sanitizers has higher minimal requirements upon some CPUs. +# - 32-bit SPARC needs v8 to supply eg __sync_add_and_fetch_4 +# - i386 needs i586 for __sync_val_compare_and_swap_8. +.if ${MACHINE_ARCH} == "sparc" +COPTS+= -mcpu=v8 +.endif +.if ${MACHINE_ARCH} == "i386" +COPTS+= -march=i586 +.endif