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]

Re: <offlist> gcc-go cross Makefile.am issue


Joel Sherrill <joel.sherrill@OARcorp.com> writes:

> There may be a better forum for this but here goes.
>
> libgo/Makefile.am has this:
>
> # How to build a .gox file from a .a file.
> BUILDGOX = \
>         set -e; \
>         rm -f $@.o; \
>         $(CC) -r -nostdlib -o $@.o -Wl,--whole-archive $<; \
>         objcopy -j .go_export $@.o $@.tmp; \
>         mv -f $@.tmp $@; \
>         rm -f $@.o
>
> Notice the use of the native objcopy.  It should use
> the one for the target.
>
> I was building for sparc-rtems4.10 so the native Fedora
> objcopy wasn't happy with sparc object. :)

Thanks for pointing that out.  Fixed like so.  Patch committed to
gccgo branch.

Ian

diff -r 407e15e77f82 libgo/Makefile.am
--- a/libgo/Makefile.am	Wed Apr 07 15:21:34 2010 -0700
+++ b/libgo/Makefile.am	Wed Apr 07 15:41:03 2010 -0700
@@ -1489,7 +1489,7 @@
 	set -e; \
 	rm -f $@.o; \
 	$(CC) -r -nostdlib -o $@.o -Wl,--whole-archive $<; \
-	objcopy -j .go_export $@.o $@.tmp; \
+	$(OBJCOPY) -j .go_export $@.o $@.tmp; \
 	mv -f $@.tmp $@; \
 	rm -f $@.o
 
diff -r 407e15e77f82 libgo/configure.ac
--- a/libgo/configure.ac	Wed Apr 07 15:21:34 2010 -0700
+++ b/libgo/configure.ac	Wed Apr 07 15:41:03 2010 -0700
@@ -35,6 +35,7 @@
 
 AC_PROG_LD
 AC_PROG_RANLIB
+AC_CHECK_TOOL(OBJCOPY, objcopy, missing-objcopy)
 
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL

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