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]

[PATCH,libgomp] make libgomp cross-compilable


When building cross configurations, it's nice to be able to build
libgomp.  The patch below enables libgomp to be built in such a fashion,
following what other libraries in the tree do.  Tested with cross to
arm-none-linux-gnueabi, OK to commit?

-Nathan

2009-06-08  Nathan Froyd  <froydnj@codesourcery.com>

	* Makefile.am (LTLDFLAGS): Define.
	(LINK): Define.
	* Makefile.in: Regenerate.

Index: Makefile.am
===================================================================
--- Makefile.am	(revision 148302)
+++ Makefile.am	(working copy)
@@ -41,6 +41,11 @@ if USE_FORTRAN
 nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod
 endif
 
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+
+LINK = $(LIBTOOL) --tag CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LTLDFLAGS) -o $@
+
 omp_lib_kinds.mod: omp_lib.mod
 	:
 omp_lib.mod: omp_lib.f90
Index: Makefile.in
===================================================================


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