summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-09-24 22:28:41 +0100
committerSergei Trofimovich <slyich@gmail.com>2021-11-28 09:01:40 +0000
commit18f8296fb9d11cbd6f788f5d8576cae54cb00e37 (patch)
tree704d11c7c2ca8dfa26eb29d9d6d315f00d3c6dd5 /pkgs/tools/cd-dvd
parent1561c366ab92246fc7f4e2e6b48b394e944c8703 (diff)
downloadnixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar.gz
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar.bz2
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar.lz
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar.xz
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.tar.zst
nixpkgs-18f8296fb9d11cbd6f788f5d8576cae54cb00e37.zip
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
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r--pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch11
-rw-r--r--pkgs/tools/cd-dvd/cdrkit/default.nix2
2 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch b/pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch
new file mode 100644
index 00000000000..c7db796cfcf
--- /dev/null
+++ b/pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/genisoimage/genisoimage.h
++++ b/genisoimage/genisoimage.h
+@@ -377,7 +377,7 @@ extern int	use_fileversion;
+ extern int	split_SL_component;
+ extern int	split_SL_field;
+ extern char	*trans_tbl;
+-char		*outfile;
++extern char	*outfile;
+ 
+ #define	JMAX		64	/* maximum Joliet file name length (spec) */
+ #define	JLONGMAX	103	/* out of spec Joliet file name length */
diff --git a/pkgs/tools/cd-dvd/cdrkit/default.nix b/pkgs/tools/cd-dvd/cdrkit/default.nix
index 1bc84cf59df..e3d53297193 100644
--- a/pkgs/tools/cd-dvd/cdrkit/default.nix
+++ b/pkgs/tools/cd-dvd/cdrkit/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   hardeningDisable = [ "format" ];
 
   # efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244
-  patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ];
+  patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ];
 
   postInstall = ''
     # file name compatibility with the old cdrecord (growisofs wants this name)