]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgo: fix go_export extraction on Darwin
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2019 01:01:46 +0000 (01:01 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Feb 2019 01:01:46 +0000 (01:01 +0000)
    On Darwin, the section name is prefixed with the segment name, __GNU_GO.

    Reviewed-on: https://go-review.googlesource.com/c/151097

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269271 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/MERGE
libgo/Makefile.am
libgo/Makefile.in

index 749e523e7df5754c9f0007677fc882f16f9bc1d0..e997df8f36fd8b0abd19fc59aa273ad82458c262 100644 (file)
@@ -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 aeaa203ce5a3518745c61ab8fa2e1f0e9c58911d..1201cf59633a172e203d684def7af64ec03539e1 100644 (file)
@@ -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 =
index 7f398918c57f7b00fbe9b36781e617b6ef39d2b4..346683b52379588406a22dc67c7a20a72eb0fb30 100644 (file)
@@ -529,6 +529,8 @@ top_srcdir = @top_srcdir@
 # Go support.
 SUFFIXES = .c .go .gox .o .obj .lo .a
 @LIBGO_IS_RTEMS_TRUE@subdirs = testsuite
+@LIBGO_IS_DARWIN_FALSE@GO_EXPORT_SECTION_NAME = .go_export
+@LIBGO_IS_DARWIN_TRUE@GO_EXPORT_SECTION_NAME = __GNU_GO.__go_export
 SUBDIRS = ${subdirs}
 gcc_version := $(shell $(GOC) -dumpversion)
 MAINT_CHARSET = latin1
@@ -1001,7 +1003,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 =