Summary: | devel/binutils: Fails to link: ld: error: duplicate symbol: program_name | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | O. Hartmann <ohartmann> | ||||
Component: | Individual Port(s) | Assignee: | Baptiste Daroussin <bapt> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | dim, kbowling, zeising | ||||
Priority: | --- | Keywords: | needs-qa | ||||
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(bapt) koobs: merge-quarterly? |
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 248756 | ||||||
Attachments: |
|
Created attachment 217313 [details]
fix binutils build with -fno-common
O. Hartmann, can you try this patch for binutils? It works for me.
bapt, does this look OK to commit?
*** Bug 248735 has been marked as a duplicate of this bug. *** A commit references this bug: Author: zeising Date: Wed Aug 19 17:11:00 UTC 2020 New revision: 545440 URL: https://svnweb.freebsd.org/changeset/ports/545440 Log: devel/binutils: fix build with -fno-common Add a patch from upstream to fix the build of devel/binutils when compiled with -fno-common, which is the default with llvm 11. PR: 248701 MFH: 2020Q3 Changes: head/devel/binutils/files/patch-0b398d6.diff Committed. Without fixing binutils, a lot of the ports tree was failing. A commit references this bug: Author: zeising Date: Thu Aug 20 19:23:31 UTC 2020 New revision: 545552 URL: https://svnweb.freebsd.org/changeset/ports/545552 Log: MFH: r545440 devel/binutils: fix build with -fno-common Add a patch from upstream to fix the build of devel/binutils when compiled with -fno-common, which is the default with llvm 11. PR: 248701 Approved by: ports-secteam (joenum) Changes: _U branches/2020Q3/ branches/2020Q3/devel/binutils/files/patch-0b398d6.diff All done and merged. |
On recent CURRENT (FreeBSD 13.0-CURRENT #15 r364297: Mon Aug 17 14:39:06 CEST 2020 amd64), rebuilding of port devel/binutils fails to build with a linker error shown below: [...] /bin/sh ./libtool --tag=CC --mode=link cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong -o coffdump coffdump.o coffgrok.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib libtool: link: cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong -o coffdump coffdump.o coffgrok.o bucomm.o version.o filemode.o /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib ../bfd/.libs/libbfd.a -L/usr/local/lib -lz ../libiberty/libiberty.a ld: error: duplicate symbol: program_name >>> defined at coffdump.c >>> coffdump.o:(program_name) >>> defined at bucomm.c >>> bucomm.o:(.bss+0x0) cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[6]: *** [Makefile:891: coffdump] Error 1