HomePhabricator

build: pass -fcommon when building genisoimage

Description

build: pass -fcommon when building genisoimage

Summary:
Starting with the 10.1 release, GCC defaults to -fno-common. 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, pass -fcommon to preserve the
legacy GCC behaviour.

Backport of core PR19553.
Fixes the OSX depends build on Arch.

Test Plan:

cd depends
make build-osx

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7238

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Aug 24 2020, 06:57
FabienCommitted on Aug 24 2020, 07:01
abc-botPushed on Aug 24 2020, 07:01
Reviewer
Restricted Project
Differential Revision
D7238: build: pass -fcommon when building genisoimage
Parents
rABCcb95b26cb1d2: [CMAKE] Make the split-debug script template executable
Branches
Unknown
Tags
Unknown