Hello! The bug actually shows when it's tried to build GCC 15 on old Mac OS X version 10.4 (Tiger) and 10.5 (Leopard), see here: https://trac.macports.org/ticket/73167, https://github.com/iains/gcc-15-branch/issues/3.
I am also reporting this on the GCC bugs mailing list: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123976. The case is that a Makefile is created that has first 361 # Create links to files specified in config.host. 362 LIBGCC_LINKS = enable-execute-stack.c \ 363 unwind.h md-unwind-def.h md-unwind-support.h \ 364 sfp-machine.h gthr-default.h 365 366 enable-execute-stack.c: $(srcdir)/$(enable_execute_stack) 367 -$(LN_S) $< $@ 368 unwind.h: $(srcdir)/$(unwind_header) 369 -$(LN_S) $< $@ 370 md-unwind-def.h: $(srcdir)/config/$(md_unwind_def_header) 371 -$(LN_S) $< $@ 372 md-unwind-support.h: $(srcdir)/config/$(md_unwind_header) 373 -$(LN_S) $< $@ 374 sfp-machine.h: $(srcdir)/config/$(sfp_machine_header) 375 -$(LN_S) $< $@ 376 gthr-default.h: $(srcdir)/$(thread_header) 377 -$(LN_S) $< $@ and then: 1120 all: $(extra-parts) 1121 1122 $(libgcc-objects) $(libgcc-s-objects) $(libgcc-eh-objects) \ 1123 $(libgcov-objects) \ 1124 $(libunwind-objects) $(libunwind-s-objects) \ 1125 $(EXTRA_PARTS): $(LIBGCC_LINKS) libgcc_tm.h When the latter macro is executed only three symlinks are created: lrwxr-xr-x 1 macports admin 80 4. Feb 21:49 gthr-default.h -> /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/gthr-posix.h lrwxr-xr-x 1 macports admin 86 4. Feb 21:49 md-unwind-support.h -> /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/no-unwind.h lrwxr-xr-x 1 macports admin 84 4. Feb 21:49 unwind.h -> /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-generic.h Upon re-invocation no missing symlink is created. When I create manually the two missing symlinks to the C header files then, after compiling the C source files which depend on these C header files, the last symlink is created: /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-dw2.c /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/unwind-dw2-fde-darwin.c /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-c.c ln -s /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/enable-execute-stack-mprotect.c enable-execute-stack.c sleep 2 /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... ... many, many xgcc invocations later this symlink gets compiled: ... /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c -xassembler-with-cpp /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/rs6000/darwin-tramp.S /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/darwin-64.c /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c /opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/rs6000/ibm-ldouble.c /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... -c enable-execute-stack.c enable-execute-stack.c:33:13: warning: 'check_enabling' declared 'static' but never defined [-Wunused-function] 33 | static void check_enabling (void) __attribute__ ((unused)); | ^~~~~~~~~~~~~~ /opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc -B... I made experiments with writing in Makefile.in all six symlinks on one line or using one line for each of them, and finally separating the ln commands with 'sleep 2' commands (2 seconds is the minimal time duration between two time stamps of files in the file system), and also with a larger time value, with no deviation from the original setup, i.e. symlinks were gone missing. This happens for me on PPC Mac OS X 10.5.8, Leopard, with both old and system GNU Make 3.81 and GNU Make 4.4.1, maintained with the MacPorts package manager. What can be the cause of this behaviour on these old Macs? On my recent Mac, intel x86_64-apple-darwin23, the system's GNU Make 3.81 and GNU Make 4.4.1, maintained with the MacPorts package manager, both produce all six symlinks at once: # If this is the top-level multilib, build all the other ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/enable-execute-stack-mprotect.c enable-execute-stack.c ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/unwind-generic.h unwind.h ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/config/no-unwind.h md-unwind-def.h ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/config/no-unwind.h md-unwind-support.h ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/config/i386/sfp-machine.h sfp-machine.h ln -s /opt/local/var/macports/build/gcc15-0040f76a/work/gcc-15.2.0/libgcc/gthr-posix.h gthr-default.h What can be done to make the Makefile do its jobs? How can I examine make and gmake? -- Greetings Pete Spam will be a thing of the past in two years' time. – Bill Gates, Jan 2004
