]> err.no Git - sope/commitdiff
use gcj to link shared libraries when the project
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 31 Mar 2006 01:27:13 +0000 (01:27 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 31 Mar 2006 01:27:13 +0000 (01:27 +0000)
contains AOT Java files

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1238 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

gnustep-make/ChangeLog
gnustep-make/Instance/gcj-tool.make
gnustep-make/Instance/library.make

index a1fa37a4c646c3fd500dd8f3f8c0f5ee4fb30970..2964527149d7b08bcc332b2c02b40736032a628d 100644 (file)
@@ -1,5 +1,8 @@
 2006-03-31  Helge Hess  <helge.hess@opengroupware.org>
 
+       * 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
 
index 17ecff7766ed73eb2512d6dbece3a90349846746..8505330f19c993b884999d2d5c8c8db5e3990f46 100644 (file)
@@ -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.
 #
index e26d7a2b10adb7151e157026d0404942badd6802..9997a74701d7dc18fd164db215ebe14dba3623d5 100644 (file)
@@ -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)