head 1.3; access; symbols pkgsrc-2026Q1:1.3.0.4 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.2 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.2.0.4 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.2 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.1.0.2 pkgsrc-2025Q1-base:1.1; locks; strict; comment @# @; 1.3 date 2025.10.12.21.44.57; author mrg; state Exp; branches; next 1.2; commitid tIWgIYeBMkvdmkeG; 1.2 date 2025.06.08.07.37.45; author wiz; state Exp; branches; next 1.1; commitid I3jr5qsuFSfII3YF; 1.1 date 2025.02.05.16.30.35; author adam; state Exp; branches; next ; commitid hLANQ79vzS0ICiIF; desc @@ 1.3 log @add arm64eb support: a config snippet, and a gcc14 specific fix. @ text @$NetBSD: patch-gcc_config.gcc,v 1.2 2025/06/08 07:37:45 wiz Exp $ Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches. Support NetBSD/aarch64eb. --- gcc/config.gcc.orig 2025-05-23 04:02:04.272197204 -0700 +++ gcc/config.gcc 2025-10-12 14:28:13.767650187 -0700 @@@@ -1177,13 +1177,22 @@@@ case ${target} in ;; esac -# Figure out if we need to enable heap trampolines by default +# Figure out if we need to enable heap trampolines +# and variadic functions handling. case ${target} in +aarch64*-*-darwin2*) + # This applies to arm64 Darwin variadic funtions. + tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=1" + # Executable stack is forbidden. + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" + ;; *-*-darwin2*) + tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" # Currently, we do this for macOS 11 and above. tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ;; *) + tm_defines="$tm_defines STACK_USE_CUMULATIVE_ARGS_INIT=0" tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" ;; esac @@@@ -1227,6 +1236,14 @@@@ aarch64*-*-elf | aarch64*-*-fuchsia* | a done TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` ;; +aarch64-*-darwin* ) + tm_file="${tm_file} aarch64/aarch64-errata.h" + tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-darwin" + tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1" + tm_defines="${tm_defines} DISABLE_AARCH64_AS_CRC_BUGFIX=1" + # Choose a default CPU version that will work for all current releases. + with_cpu=${with_cpu:-apple-m1} + ;; aarch64*-*-freebsd*) tm_file="${tm_file} elfos.h ${fbsd_tm_file}" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h" @@@@ -1238,6 +1255,11 @@@@ aarch64*-*-netbsd*) tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-netbsd.h" tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" + case $target in + aarch64_be-*) + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" + ;; + esac ;; aarch64*-*-linux*) tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h" @ 1.2 log @*gcc14*: update to 14.3 bugfix release. @ text @d1 1 a1 1 $NetBSD: patch-gcc_config.gcc,v 1.1 2025/02/05 16:30:35 adam Exp $ d4 1 d6 2 a7 2 --- gcc/config.gcc.orig 2025-05-23 11:02:04.272197204 +0000 +++ gcc/config.gcc d47 12 @ 1.1 log @gcc14: incorporate Homebrew patches to let GCC 14 build on macOS and other platforms @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- gcc/config.gcc d10 1 a10 1 d31 1 a31 1 @@@@ -1227,6 +1236,14 @@@@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) @