[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool and gcj
From: |
Albert Chin |
Subject: |
Re: libtool and gcj |
Date: |
Fri, 1 Mar 2002 11:52:04 -0600 |
User-agent: |
Mutt/1.2.5i |
On Fri, Mar 01, 2002 at 06:58:08AM -0800, Anthony Green wrote:
> On Fri, 2002-03-01 at 00:19, Per Bothner wrote:
> > Of course the real fix involves fixing ltmain.sh, but that goes
> > beyond my ability to peer into the bowels of libtool.
>
> The other bad thing I should mention is the test to see if gcj can use
> both -c and -o. This test is failing for some unknown reason, causing
> bad problems for my project. I don't think libtool should even perform
> this test. gcj is known to always handle -c and -o.
Try the patch below and let me know if it works. Note this removes
-DPIC completely (even for C, C++).
--
albert chin (address@hidden)
-- snip snip
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.248
diff -u -3 -p -r1.248 libtool.m4
--- libtool.m4 7 Feb 2002 19:54:36 -0000 1.248
+++ libtool.m4 1 Mar 2002 17:31:17 -0000
@@ -832,8 +832,8 @@ AC_CACHE_CHECK([if $compiler supports -c
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
- [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
- GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
+ [$1],[GCJ],[save_CFLAGS="$CFLAGS"
+ CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
@@ -856,7 +856,7 @@ AC_CACHE_CHECK([if $compiler supports -c
fi
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
- [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
+ [$1],[GCJ],[CFLAGS="$save_CFLAGS"])
chmod u+w .
$rm conftest* out/*
rmdir out
@@ -3155,7 +3158,7 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
+lt_simple_compile_test_code="class foo {};"
# Code to be used in simple link tests
lt_simple_link_test_code='public class conftest { public static void
main(String[] argv) {}; }'
@@ -4294,7 +4297,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_co
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag
$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)], [],
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
"" | " "*) ;;
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="
$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
@@ -4302,15 +4305,6 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compi
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
fi
-case "$host_os" in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic,
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
- ;;
-esac
])