summaryrefslogtreecommitdiff
path: root/src/cmd/cgo
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-10-28 22:21:26 -0400
committerRuss Cox <rsc@golang.org>2013-10-28 22:21:26 -0400
commita3816dbedfafbbca3809e8b2fb9efd1c0c42242f (patch)
treed08447cead6d089c71482575877db23e176a5c22 /src/cmd/cgo
parent56edae3f7419401cea6c9a1c7d4e0b0462bcb82e (diff)
downloadgo-a3816dbedfafbbca3809e8b2fb9efd1c0c42242f.tar.gz
cmd/cgo: stop using -fno-eliminate-unused-debug-types
This flag was added in January 2010, in CL 181102, to fix issue 497. (Numbers were just shorter back then.) The fix was for OS X machines and the llvm-gcc frontend. In July 2011 we had to change the way we get enum values, because there were no flags available to force Xcode's llvm-gcc to include the enum names and values in DWARF debug output. We now use clang, not llvm-gcc, on OS X machines. Earlier versions of clang printed a warning about not knowing the flag. Newer versions of clang now make that an error. That is: - The flag was added for OS X machines. - The flag is no longer necessary on OS X machines. - The flag now breaks some OS X machines. Remove it. I have run the original program from issue 497 successfully without the flag on both OS X and Linux machines. Fixes issue 6678. R=golang-dev, minux.ma CC=golang-dev https://codereview.appspot.com/18850043
Diffstat (limited to 'src/cmd/cgo')
-rw-r--r--src/cmd/cgo/gcc.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index d31fc47f1..60d420b21 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -742,13 +742,12 @@ func gccTmp() string {
// the input.
func (p *Package) gccCmd() []string {
c := append(p.gccBaseCmd(),
- "-w", // no warnings
- "-Wno-error", // warnings are not errors
- "-o"+gccTmp(), // write object to tmp
- "-gdwarf-2", // generate DWARF v2 debugging symbols
- "-fno-eliminate-unused-debug-types", // gets rid of e.g. untyped enum otherwise
- "-c", // do not link
- "-xc", // input language is C
+ "-w", // no warnings
+ "-Wno-error", // warnings are not errors
+ "-o"+gccTmp(), // write object to tmp
+ "-gdwarf-2", // generate DWARF v2 debugging symbols
+ "-c", // do not link
+ "-xc", // input language is C
)
if strings.Contains(c[0], "clang") {
c = append(c,