compiler: Fix -fgo-prefix handling.
commit26197037c20ecdb4adfaeb91d3b09479294998a4
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jan 2015 00:35:44 +0000 (30 00:35 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Jan 2015 00:35:44 +0000 (30 00:35 +0000)
tree63c941536dee068ef77d7e77c6f5e54b9f6bc337
parentc15b21abbcea38e3eca71cb59de948253bf93aae
compiler: Fix -fgo-prefix handling.

There was bug in the fix for PR 61880: it only worked fully
correctly for code compiled with -fgo-pkgpath.  For code that
used -fgo-prefix, or that used neither option, the '.'
separating the prefix and the package name was converted to an
underscore, which did not happen before.  This broke SWIG and
any other code that expected specific symbol names.
Fortunately all code compiled in libgo and all code compiled
by the go tool uses -fgo-pkgpath, so this probably did not
affect very many people.

This is an incomplete fix that does not modify the package
file format, for use on both mainline and the GCC 4.9 branch.
A follow on patch will fully fix the problem.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220268 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/export.cc
gcc/go/gofrontend/export.h
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/import.cc
gcc/go/gofrontend/unsafe.cc