LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 9758 - r129518 breaks bootstrap on FreeBSD with binutils 2.15
Summary: r129518 breaks bootstrap on FreeBSD with binutils 2.15
Status: RESOLVED WONTFIX
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: trunk
Hardware: PC FreeBSD
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 12:43 PDT by Pawel Worach
Modified: 2011-04-25 15:02 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Worach 2011-04-20 12:43:27 PDT
Hi,

On FreeBSD 8.2 the binutils version is 2.15 [FreeBSD] 2004-05-23.

Since r129518 and r129571 (when the change was re-introduced after a backout in r129557) boostrapping llvm/clang on FreeBSD has been broken.

The second stage build dies with:
llvm[2]: Linking Release+Asserts executable tblgen (without symbols)
local symbol 0: discarded in section `.text._ZN4llvm15TableGenBackendD1Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmMatcherEmitter.o
local symbol 1: discarded in section `.text._ZN4llvm15TableGenBackendD0Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmMatcherEmitter.o
local symbol 2: discarded in section `.text._ZN4llvm13CodeGenTargetD2Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmMatcherEmitter.o
local symbol 3: discarded in section `.text._ZN4llvm20CodeGenRegisterClassD2Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmMatcherEmitter.o
local symbol 4: discarded in section `.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 5: discarded in section `.text._ZNSt6vectorIPKN4llvm18CodeGenInstructionESaIS3_EEaSERKS5_' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 6: discarded in section `.text._ZNSt6vectorIjSaIjEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPjS1_EERKj' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 7: discarded in section `.text._ZN4llvm15TableGenBackendD1Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 8: discarded in section `.text._ZN4llvm15TableGenBackendD0Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 9: discarded in section `.text._ZN4llvm11raw_ostream11changeColorENS0_6ColorsEbb' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 10: discarded in section `.text._ZN4llvm11raw_ostream10resetColorEv' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 11: discarded in section `.text._ZNK4llvm11raw_ostream12is_displayedEv' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 12: discarded in section `.text._ZNK4llvm18raw_string_ostream11current_posEv' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 13: discarded in section `.text._ZN4llvm7TGErrorD1Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
local symbol 14: discarded in section `.text._ZN4llvm13CodeGenTargetD2Ev' from /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/utils/TableGen/Release+Asserts/AsmWriterEmitter.o
...
<plenty more messages like these>
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can this be fixed in a way that does not require binutils to be upgraded ?
Comment 1 Rafael Ávila de Espíndola 2011-04-20 13:17:42 PDT
Can you try 129635?
Comment 2 Pawel Worach 2011-04-20 13:30:28 PDT
r129635 was included in this build which failed too.
http://llvm-amd64.freebsd.your.org:8010/builders/freebsd-clang-amd64/builds/884
Comment 3 Rafael Ávila de Espíndola 2011-04-20 20:54:08 PDT
This was fixed with:

http://sourceware.org/ml/binutils-cvs/2004-06/msg00130.html

Can you just include that patch in your copy?

You might also want to consider including

http://sourceware.org/ml/binutils-cvs/2004-07/msg00002.html

which looks to be the logic that gnu ld uses to this day.
Comment 4 Chris Lattner 2011-04-25 14:54:46 PDT
Should this be closed?
Comment 5 Rafael Ávila de Espíndola 2011-04-25 15:02:08 PDT
Since this was a problem in the bfd ld and there is a fix for it that is GPL2, lets close this as wontfix.