diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-03-07 00:53:41 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-07 00:53:41 +0000 |
commit | c0017f91c4895e8cc625614454d0e2571c077770 (patch) | |
tree | dc61aea344aa137c09ed7d6281764f2844c0f4a1 /gcc/go/go-gcc.cc | |
parent | 295bae04b2140479029ed5f47a78954cc5995122 (diff) | |
download | gcc-c0017f91c4895e8cc625614454d0e2571c077770.zip gcc-c0017f91c4895e8cc625614454d0e2571c077770.tar.gz gcc-c0017f91c4895e8cc625614454d0e2571c077770.tar.bz2 |
re PR go/89227 (gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC")
PR go/89227
* go-gcc.cc (Gcc_backend::function): Set TREE_PUBLIC for an
only-inline function.
From-SVN: r269449
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index daa1ab2..1a52d9b 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -3101,6 +3101,7 @@ Gcc_backend::function(Btype* fntype, const std::string& name, resolve_unique_section(decl, 0, 1); if ((flags & function_only_inline) != 0) { + TREE_PUBLIC (decl) = 1; DECL_EXTERNAL(decl) = 1; DECL_DECLARED_INLINE_P(decl) = 1; } |