Patch: runtime part of gcj -D
Anthony Green
green@cygnus.com
Fri Oct 15 22:07:00 GMT 1999
Tom wrote:
> I recently changed the compiler to handle `-D' options. These are
> compiled into the executable as a list of strings. This patch changes
> the runtime to put these strings into the system properties.
Very very cool. We'll also need this patch in order to build libgcj.
When building shared libraries, libtool will often compile files using
-DPIC. Gcj used to ignore this, but it can't anymore.
Tom - I suppose we should pass this on the the libtool maintainers.
What do you think?
1999-10-15 Anthony Green <green@cygnus.com>
* ltmain.sh: Don't use -DPIC for Java code.
Index: ltmain.sh
===================================================================
RCS file: /cvs/java/libgcj/ltmain.sh,v
retrieving revision 1.4
diff -u -r1.4 ltmain.sh
--- ltmain.sh 1999/08/03 03:16:02 1.4
+++ ltmain.sh 1999/10/16 04:56:51
@@ -435,7 +435,12 @@
fbsd_hideous_sh_bug=$base_compile
# All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $pic_flag -DPIC $srcfile"
+ # However, make sure we only set it for non-Java code.
+ if test "`basename $srcfile .java`" != "`basename $srcfile`" && test "`basename $srcfile .class`" != "`basename $srcfile`"; then
+ command="$base_compile $pic_flag $srcfile"
+ else
+ command="$base_compile $pic_flag -DPIC $srcfile"
+ fi
if test "$build_old_libs" = yes; then
lo_libobj="$libobj"
dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
--
Anthony Green Cygnus Solutions
Sunnyvale, California
More information about the Java-patches
mailing list