cdrkit: fix -fno-common build
Without the change build on toolchain with `-fno-common` default fails as:
$ nix build --impure --expr 'with import ./. {}; cdrkit.override { stdenv = clang12Stdenv; }' -L
...
cdrkit> ld: CMakeFiles/genisoimage.dir/apple.o:(.bss+0x2040):
multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x280): first defined here
commit18f8296fb9d11cbd6f788f5d8576cae54cb00e37
authorSergei Trofimovich <slyich@gmail.com>
dateFri 24 Sep 2021, 22:28 (5 years ago)
parent1561c36
pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patchnew file+11
@@ -0,0 +1,11 @@
1+--- a/genisoimage/genisoimage.h
2++++ b/genisoimage/genisoimage.h
3+@@ -377,7 +377,7 @@ extern int use_fileversion;
4+ extern int split_SL_component;
5+ extern int split_SL_field;
6+ extern char *trans_tbl;
7+-char *outfile;
8++extern char *outfile;
9+
10+ #define JMAX 64 /* maximum Joliet file name length (spec) */
11+ #define JLONGMAX 103 /* out of spec Joliet file name length */
pkgs/tools/cd-dvd/cdrkit/default.nix+1−1
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
1515 hardeningDisable = [ "format" ];
1616
1717 # efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244
18− patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ];
18+ patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ];
1919
2020 postInstall = ''
2121 # file name compatibility with the old cdrecord (growisofs wants this name)