Without this patch, the following build error occurs for me on NixOS:
```
$ nix-build -A clisp --check
<snipped>
Running phase: buildPhase
build flags: SHELL=/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash
ln -s ../src/.gdbinit .gdbinit
rm -f build-aux
ln -s ../src/build-aux build-aux
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib && make CFLAGS="-g -O2 -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -pthread -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -DDYNAMIC_MODULES -fPIC -DPIC " top_srcdir="/build/source/src"
make[1]: Entering directory '/build/source/builddir/gllib'
cd /build/source/src && /nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash /build/source/src/build-aux/missing automake-1.16 --gnits gllib/Makefile
/build/source/src/build-aux/missing: line 81: automake-1.16: command not found
WARNING: 'automake-1.16' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<https://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<https://www.gnu.org/software/autoconf>
<https://www.gnu.org/software/m4/>
<https://www.perl.org/>
make[1]: *** [Makefile:1333: ../../src/gllib/Makefile.in] Error 127
make[1]: Leaving directory '/build/source/builddir/gllib'
make: *** [Makefile:648: gllib/libgnu.a] Error 2
```
This message was also reproduced by @2xsaiko on their NAS machine.
I don't know why this error sometimes occurs and sometimes does not.
On my Ubuntu machines, this error does not occur, and instead it does this:
```
Running phase: buildPhase
build flags: SHELL=/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin/bash
ln -s ../src/.gdbinit .gdbinit
rm -f build-aux
ln -s ../src/build-aux build-aux
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib && make CFLAGS="-g -O2 -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -pthread -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -DDYNAMIC_MODULES -fPIC -DPIC " top_srcdir="/build/source/src"
make[1]: Entering directory '/build/source/builddir/gllib'
make[2]: Entering directory '/build/source/builddir'
make[2]: Nothing to be done for 'am--refresh'.
make[2]: Leaving directory '/build/source/builddir'
cd .. && make am--refresh
make[2]: Entering directory '/build/source/builddir'
make[2]: Nothing to be done for 'am--refresh'.
make[2]: Leaving directory '/build/source/builddir'
<snipped>
```
In any case, these changes work successfully on all platforms I've tested them on:
1. NixOS
2. Ubuntu 22.04
3. MacOS x86_64
4. MacOS aarch64
Modules enabled only on "x86_64" systems were actually implicitly
linux-only. Disable them entirely on Darwin, regardless of architecture.
Fixes#258050
One of the module names has a `/` in it so the hard-coded technique to "jump
back to the previous directory" by using `../..` doesn't work.
N.B.: build is still broken. This only fixes the preconfigure phase.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
Fixes the build failure after the upgrade to glibc 2.26 in
9bb67d5c1e.
From the cfree(3) manpage:
This function should never be used. Use free(3) instead. Starting with
version 2.26, it has been removed from glibc.
From the glibc 2.26 release notes[1]:
* The obsolete function cfree has been removed. Applications should use
free instead.
[1]: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @7c6f434c, @tohl
Clisp depended on libffcall, which does not compile on Darwin. The
dependency is optional though, so omit it on Darwin. Also, make
conditional transitive dependencies on libffcall.
The following parameters are now available:
* hardeningDisable
To disable specific hardening flags
* hardeningEnable
To enable specific hardening flags
Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.
cc-wrapper supports the following flags:
* fortify
* stackprotector
* pie (disabled by default)
* pic
* strictoverflow
* format
* relro
* bindnow