This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/61880] Linking with external functions in C does not work in GO when using gccgo, while it works in gc
- From: "ian at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Jan 2015 00:36:45 +0000
- Subject: [Bug go/61880] Linking with external functions in C does not work in GO when using gccgo, while it works in gc
- Auto-submitted: auto-generated
- References: <bug-61880-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61880
--- Comment #7 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Fri Jan 30 00:36:14 2015
New Revision: 220269
URL: https://gcc.gnu.org/viewcvs?rev=220269&root=gcc&view=rev
Log:
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.
Modified:
branches/gcc-4_9-branch/gcc/go/gofrontend/export.cc
branches/gcc-4_9-branch/gcc/go/gofrontend/export.h
branches/gcc-4_9-branch/gcc/go/gofrontend/gogo.cc
branches/gcc-4_9-branch/gcc/go/gofrontend/gogo.h
branches/gcc-4_9-branch/gcc/go/gofrontend/import.cc
branches/gcc-4_9-branch/gcc/go/gofrontend/unsafe.cc