gcc-12 did a mass rename from .c to .cc c++ files. As a result build fails as:
substitute(): ERROR: file 'gcc/config/darwin-c.c' does not exist
Closes: https://github.com/NixOS/nixpkgs/issues/172877
Programs compiled with gdc (such as tumiki-fighters and torus-trooper)
that depend on c++ libraries were failing with errors such as
/nix/store/3fqi6nigj8dkbvjnw8y4dy59gkq8vsj4-binutils-2.38/bin/ld: /nix/store/36960p41h83cwkcs2vpzg8ni39w4sc5m-bulletml-0.0.6/lib/libbulletml.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
because of the mismatch with the gcc version used to compile the
libraries.
This commit unpins the gcc version gdc is based on, so they are kept in
sync.
gdc9 was removed since no other package depends specifically on that
version
Without the change build fails on upstream gcc-10 as:
ld: x86_print.o:/build/ccl/lisp-kernel/linuxx8664/../area.h:111: multiple definition of
`tcr_area_lock'; pmcl-kernel.o:/build/ccl/lisp-kernel/linuxx8664/../area.h:111: first defined here
Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:
ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_';
libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here
Without the change the build against upstream gcc-10 build fails as:
ld: smScSema.o:/build/source/compiler/smScSema.c:135:
multiple definition of `charset'; options.o:/build/source/compiler/options.c:16: first defined here
Use -fcommon as a workeround until upstream updates the code.
it improves package correctness and keeps cross-compilation in good
health
there aren't many uses of buildCrystalPackage in nixpkgs yet so imo its
safe to turn it on
python builder, rust build, go builder, and others all turn it on