From 9d91a1b6cabecae1ca7e0b0be5b83707182d6eed Mon Sep 17 00:00:00 2001 From: helge Date: Fri, 31 Mar 2006 01:27:13 +0000 Subject: [PATCH] use gcj to link shared libraries when the project contains AOT Java files git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1238 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- gnustep-make/ChangeLog | 3 +++ gnustep-make/Instance/gcj-tool.make | 2 +- gnustep-make/Instance/library.make | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gnustep-make/ChangeLog b/gnustep-make/ChangeLog index a1fa37a4..29645271 100644 --- a/gnustep-make/ChangeLog +++ b/gnustep-make/ChangeLog @@ -1,5 +1,8 @@ 2006-03-31 Helge Hess + * Instance/library.make: added a hack to redefine CC to gcj in case + the shared library build includes AOT_JAVA_FILES. + * gcj-tool.make, Instance/gcj-tool.make, Master/gcj-tool.make, GNUmakefile.in: added special AOT tool makefile diff --git a/gnustep-make/Instance/gcj-tool.make b/gnustep-make/Instance/gcj-tool.make index 17ecff77..8505330f 100644 --- a/gnustep-make/Instance/gcj-tool.make +++ b/gnustep-make/Instance/gcj-tool.make @@ -1,7 +1,7 @@ # # Instance/gcj-java-tool.make # -# Instance Makefile rules to build GNUstep-based command line ctools. +# Instance Makefile rules to build GNUstep-based command line gcj tools. # # Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc. # diff --git a/gnustep-make/Instance/library.make b/gnustep-make/Instance/library.make index e26d7a2b..9997a747 100644 --- a/gnustep-make/Instance/library.make +++ b/gnustep-make/Instance/library.make @@ -127,6 +127,23 @@ INTERNAL_LIBRARIES_DEPEND_UPON = \ debug=$(debug) profile=$(profile) shared=$(shared) \ libext=$(LIBEXT) shared_libext=$(SHARED_LIBEXT)) + +# +# This is a hack to properly compile GCJ libraries. Part of the problem is +# that target.make often uses $(CC) instead of $(LD) to define the +# SHARED_LIB_LINK_CMD command. +# +# Well, and Java libraries apparently need to be compiled with 'gcj', otherwise +# the result doesn't work (gives runtime class linking errors). +# +# Note that GCJ seems to link regular libraries just fine, so this doesn't +# seem to conflict with C_FILES, OBJC_FILES etc. +# +ifneq ($($(GNUSTEP_INSTANCE)_AOT_JAVA_FILES),) +CC:=gcj # force gstep-make to use GCJ to link the shared library +endif + + ifeq ($(shared), yes) ifneq ($(BUILD_DLL),yes) -- 2.39.5