build failure on runtime/cgo on latest gcc 5.0.0

181 views
Skip to first unread message

Vincent Batts

unread,
Mar 19, 2015, 2:49:17 PM3/19/15
to golang-dev
Hey all,

While rebuilding go1.4.2 for fedora rawhide/f23, it is failing on
flags to /usr/bin/ld

The full build log is here:
https://kojipkgs.fedoraproject.org//work/tasks/4213/9274213/build.log
Actual fail snippet: http://pastebin.com/FFQ6R0WK

the gcc used is presently: gcc (GCC) 5.0.0 20150316 (Red Hat 5.0.0-0.20)

Interestingly fedora22, which is presently alpha is using gcc (GCC)
5.0.0 20150226 (Red Hat 5.0.0-0.17), and does not fail.

Anyone else hitting this?

vb

Ian Lance Taylor

unread,
Mar 19, 2015, 5:35:02 PM3/19/15
to Vincent Batts, golang-dev
The linker is saying that -r and -shared may not be used together,
which makes sense, but nothing is passing -shared. Where is it coming
from? My first guess would be that it has something to do with
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc , but I don't know what
that file contains.

Ian

Vincent Batts

unread,
Mar 19, 2015, 9:54:22 PM3/19/15
to Ian Lance Taylor, golang-dev
Right. -shared isn't in the arguments. The contents of the two
referenced -specs is as follows:
```
[root@02bb5d38805e /]# cat /usr/lib/rpm/redhat/redhat-hardened-cc1
*cc1_options:
+ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}
[root@02bb5d38805e /]# cat /usr/lib/rpm/redhat/redhat-hardened-ld
*self_spec:
+ %{!shared:-pie}

*link:
+ -z now
```
Which is the same content as is for fedora 22, which does compile fine.

More research and education needed on my side.

vb
Reply all
Reply to author
Forward
0 new messages