head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2026.07.19.11.17.44; author adam; state Exp; branches; next ; commitid FhXjPkGd9j9WSfOG; desc @@ 1.1 log @gcc15: updated to 15.3 15.3 This release is a bug-fix release, containing fixes for regressions in GCC 15.2 relative to previous releases of GCC. PkgSrc: Allow building on Darwin/aarch64. @ text @$NetBSD$ Support Darwin/aarch64. https://github.com/Homebrew/homebrew-core/blob/main/Patches/gcc/gcc-15.3.0.diff --- gcc/exec-tool.in.orig 2026-06-12 06:09:06.444523249 +0000 +++ gcc/exec-tool.in @@@@ -23,6 +23,8 @@@@ ORIGINAL_AS_FOR_TARGET="@@ORIGINAL_AS_FOR ORIGINAL_LD_FOR_TARGET="@@ORIGINAL_LD_FOR_TARGET@@" ORIGINAL_LD_BFD_FOR_TARGET="@@ORIGINAL_LD_BFD_FOR_TARGET@@" ORIGINAL_LD_GOLD_FOR_TARGET="@@ORIGINAL_LD_GOLD_FOR_TARGET@@" +ORIGINAL_LLD_FOR_TARGET="@@ORIGINAL_LLD_FOR_TARGET@@" +ORIGINAL_CLASSIC_LD_FOR_TARGET="@@ORIGINAL_CLASSIC_LD_FOR_TARGET@@" ORIGINAL_PLUGIN_LD_FOR_TARGET="@@ORIGINAL_PLUGIN_LD_FOR_TARGET@@" ORIGINAL_NM_FOR_TARGET="@@ORIGINAL_NM_FOR_TARGET@@" ORIGINAL_DSYMUTIL_FOR_TARGET="@@ORIGINAL_DSYMUTIL_FOR_TARGET@@" @@@@ -39,24 +41,41 @@@@ case "$invoked" in dir=gas ;; collect-ld) - # Check -fuse-ld=bfd and -fuse-ld=gold - case " $* " in - *\ -fuse-ld=bfd\ *) - original=$ORIGINAL_LD_BFD_FOR_TARGET - ;; - *\ -fuse-ld=gold\ *) - original=$ORIGINAL_LD_GOLD_FOR_TARGET - ;; - *) - # when using a linker plugin, gcc will always pass '-plugin' as the - # first or second option to the linker. - if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then - original=$ORIGINAL_PLUGIN_LD_FOR_TARGET - else - original=$ORIGINAL_LD_FOR_TARGET - fi - ;; - esac + # when using a linker plugin, gcc will always pass '-plugin' as the + # first or second option to the linker. + if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then + original=$ORIGINAL_PLUGIN_LD_FOR_TARGET + else + original=$ORIGINAL_LD_FOR_TARGET + fi + # Check -fuse-ld=bfd, -fuse-ld=gold and -fuse-ld=classic + # Remove -fuse-ld=classic from the command line + for arg do + # temporarily, remove the arg. + shift + case $arg in + -fuse-ld=bfd) + original=$ORIGINAL_LD_BFD_FOR_TARGET + ;; + -fuse-ld=gold) + original=$ORIGINAL_LD_GOLD_FOR_TARGET + ;; + -fuse-ld=lld) + original=$ORIGINAL_LLD_FOR_TARGET + # We want to remove this from the command line; by the slightly + # obtuse mechanism of not putting it back. + continue + ;; + -fuse-ld=classic) + original=$ORIGINAL_CLASSIC_LD_FOR_TARGET + # As for lld. + continue + ;; + *) ;; + esac + # if we want to keep the arg, put it back. + set -- "$@@" "$arg" + done prog=ld-new$exeext if test "$original" = ../gold/ld-new$exeext; then dir=gold @