Files
John Ericson 0fdf5b63f9 gccNGPackages.libatomic: fix the two ways GCC 16 assumes a monorepo build
Both are new in 16 and both come from `libatomic` no longer being buildable
on its own without help.

`configure.ac` now refuses to run with an empty `CFLAGS`: it appends
`-fno-link-libatomic` and needs `AC_PROG_CC`'s conftests to see it, so it
will not let `AC_PROG_CC` supply the default instead.

    configure: error: CFLAGS must be set.

The top level passes them down in a monorepo build; here each library is
configured on its own, so pass what `AC_PROG_CC` would have chosen anyway.

`Makefile.am` then grew an `all-local` hook copying `libatomic.la` into
`../../gcc/`, so a compiler built in the same object tree can link
`-latomic`. There is no such tree here -- the compiler is a finished package
and gets the library through its wrapper -- so the rule just fails:

    install: cannot create regular file '/build/build/../../gcc/libatomic.so.1.2.0'

Drop the hook rather than the rule, to keep the difference from upstream
small.

Neither is caught by checking that patches apply: both are build failures on
a tree that patched cleanly.

Co-authored-by: Ben Siraphob <bensiraphob@gmail.com>
Assisted-by: Claude Code (Claude Opus 5)
2026-09-03 13:19:36 -04:00
..