[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 --- Comment #6 from boger at gcc dot gnu.org --- Works now, thanks.
[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 Ian Lance Taylor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Ian Lance Taylor --- Should be fixed.
[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 --- Comment #4 from ian at gcc dot gnu.org --- Author: ian Date: Thu Mar 7 00:53:41 2019 New Revision: 269449 URL: https://gcc.gnu.org/viewcvs?rev=269449=gcc=rev Log: PR go/89227 * go-gcc.cc (Gcc_backend::function): Set TREE_PUBLIC for an only-inline function. Modified: trunk/gcc/go/ChangeLog trunk/gcc/go/go-gcc.cc
[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 --- Comment #3 from boger at gcc dot gnu.org --- (In reply to Ian Lance Taylor from comment #1) > Same as https://golang.org/issue/29046? Yes same as the issue. Since we weren't sure if this was a FE or BE bug I decided to open a bugzilla. > > I would bet that this has something to do with the fact that testenv.HasLink > is inlinable. Something is wrong with the way that the frontend is passing > the inlinable function to the backend. The specific code in > gcc/go/go-gcc.cc is in Gcc_backend::function: > > if ((flags & function_only_inline) != 0) > { > DECL_EXTERNAL(decl) = 1; > DECL_DECLARED_INLINE_P(decl) = 1; > } > > This is intended to tell the backend to treat the function the way it treats > a C gnu89 extern inline function. This seems to work fine on x86 but > perhaps I am missing something on ppc64le.
[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 boger at gcc dot gnu.org changed: What|Removed |Added CC||seurer at gcc dot gnu.org --- Comment #2 from boger at gcc dot gnu.org --- I configured without lto and I still see the error. I don't understand why the gcc-testresults show this failure intermittently, I see it consistently in my builds. This failure is in gotools cmd/go.
[Bug go/89227] gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89227 --- Comment #1 from Ian Lance Taylor --- Same as https://golang.org/issue/29046? I would bet that this has something to do with the fact that testenv.HasLink is inlinable. Something is wrong with the way that the frontend is passing the inlinable function to the backend. The specific code in gcc/go/go-gcc.cc is in Gcc_backend::function: if ((flags & function_only_inline) != 0) { DECL_EXTERNAL(decl) = 1; DECL_DECLARED_INLINE_P(decl) = 1; } This is intended to tell the backend to treat the function the way it treats a C gnu89 extern inline function. This seems to work fine on x86 but perhaps I am missing something on ppc64le.