This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: 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.

A complete fix for this requires modifying the package file format to
record the right symbol to use for a package that is mentioned but not
imported.  Fortunately that too is a rare case.  This patch fixes the
problem for all other cases while keeping the package file format the
same.  This patch will go on the 4.9 branch as well as mainline.  I
will follow up with another patch for mainline only that changes the
package file format and fully fixes the problem.

Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline and 4.9 branch.

Ian

Attachment: foo.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]