aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-07-22 13:53:58 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-07-22 13:57:22 +0200
commitc7b4968552c704f1e2e9a046911e1207f5af5fe0 (patch)
treeb56441eca2edb47b59e2792ae3749951c9c589b2 /depends
parent2031aa92a32d0613dcc912ff438521e32cea9977 (diff)
parent2a701a1c42c37e48aae70156692aa08aaae11088 (diff)
Merge #19553: build: pass -fcommon when building genisoimage
2a701a1c42c37e48aae70156692aa08aaae11088 build: pass -fcommon when building genisoimage (fanquake) Pull request description: Starting with the 10.1 release, GCC [defaults to -fno-common](https://gcc.gnu.org/gcc-10/porting_to.html). This causes linking issues when building genisoimage: ```bash [ 98%] Building C object genisoimage/CMakeFiles/genisoimage.dir/checksum.o [100%] Linking C executable genisoimage /usr/bin/ld: CMakeFiles/genisoimage.dir/apple.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here /usr/bin/ld: CMakeFiles/genisoimage.dir/boot.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here /usr/bin/ld: CMakeFiles/genisoimage.dir/desktop.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here /usr/bin/ld: CMakeFiles/genisoimage.dir/dvd_file.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here ``` Rather than patching genisoimage further, just pass -fcommon to preserve the legacy GCC behaviour. Noticed [while testing #19530](https://github.com/bitcoin/bitcoin/pull/19530#issuecomment-659802512). ACKs for top commit: laanwj: ACK 2a701a1c42c37e48aae70156692aa08aaae11088 hebasto: ACK 2a701a1c42c37e48aae70156692aa08aaae11088, tested on Fedora 32 (x86_64, GCC 10.1.1): Tree-SHA512: 0e6dd1b4c7c3f5b6997616da27a7ea54f757c81677766ee6813c776356527787a32b959f834e699fee9798553b13bcb142469f442c5e7a04f810f2c06e3a9505
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/native_cdrkit.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk
index 8243458ec8..14c37a0fc7 100644
--- a/depends/packages/native_cdrkit.mk
+++ b/depends/packages/native_cdrkit.mk
@@ -9,8 +9,10 @@ define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
endef
+# Starting with 10.1, GCC defaults to -fno-common, resulting in linking errors.
+# Pass -fcommon to retain the legacy behaviour.
define $(package)_config_cmds
- cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
+ cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) -DCMAKE_C_FLAGS="-fcommon"
endef
define $(package)_build_cmds