diff mbox series

libgo patch committed: Use correct go_export name on Darwin

Message ID CAOyqgcXzxTb4=1xaw=HX_7mk02y-HzsFhKi1p-S9+WNB5nUWgQ@mail.gmail.com
State New
Headers show
Series libgo patch committed: Use correct go_export name on Darwin | expand

Commit Message

Ian Lance Taylor Feb. 28, 2019, 1:01 a.m. UTC
This patch by Nikhil Benesch uses the correct go_export section name
when building on Darwin.  The Darwin build doesn't actually work, but
this should make it a tiny bit better.  Bootstrapped on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 269266)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-74533ed435a1a77e6f9ec8f6cf5db1695c2568e8
+08f1c400ec95d70a5cf5a08b1600fa5445e42361
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am	(revision 269266)
+++ libgo/Makefile.am	(working copy)
@@ -13,6 +13,12 @@  if LIBGO_IS_RTEMS
 subdirs = testsuite
 endif
 
+if LIBGO_IS_DARWIN
+GO_EXPORT_SECTION_NAME = __GNU_GO.__go_export
+else
+GO_EXPORT_SECTION_NAME = .go_export
+endif
+
 SUBDIRS = ${subdirs}
 
 gcc_version := $(shell $(GOC) -dumpversion)
@@ -818,7 +824,7 @@  BUILDGOX = \
 	if test ! -f $$f; then \
 	  f="$(basename $(<D)/.libs/$(<F)).o"; \
 	fi; \
-	$(OBJCOPY) -j .go_export $$f $@.tmp; \
+	$(OBJCOPY) -j $(GO_EXPORT_SECTION_NAME) $$f $@.tmp; \
 	$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
 
 GOTESTFLAGS =