[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Libtool should not use gcj -DDLL_EXPORT (was: [Mingw-users] ANNOUNCEMENT
From: |
Ralf Wildenhues |
Subject: |
Libtool should not use gcj -DDLL_EXPORT (was: [Mingw-users] ANNOUNCEMENT: GCC-4.2.1-dw2-2 release available) |
Date: |
Thu, 16 Aug 2007 20:23:15 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello MinGW users, Libtool patches,
[ http://thread.gmane.org/gmane.comp.gnu.mingw.user/23431/focus=23450 ]
[ Please note that mingw-users needs subscription to post ]
* Ross Ridge wrote on Wed, Aug 15, 2007 at 07:06:53PM CEST:
>
> Hmm... I dunno if you're still interested in hearing feedback on building
> the Java compiler and its libraries, but here are my latest results on
> HEAD as of a couple of days ago:
>
> /bin/bash ./libtool --tag=GCJ --mode=compile /src/gcc/obj/gcc/gcj
> -B/src/gcc/obj/mingw32/libjava/ -B/src/gcc/obj/gcc/ -ffloat-store
> -fomit-frame-pointer -Usun -fno-omit-frame-pointer -fclasspath=
> -fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8
> -Wno-deprecated -fbootstrap-classes -g -O2 -c -o java/lang/Object.lo
> -fsource-filename=../../../gcc/libjava/java/lang/Object.java
> ../../../gcc/libjava/classpath/lib/java/lang/Object.class
> libtool: compile: /src/gcc/obj/gcc/gcj -B/src/gcc/obj/mingw32/libjava/
> -B/src/gcc/obj/gcc/ -ffloat-store -fomit-frame-pointer -Usun
> -fno-omit-frame-pointer -fclasspath=
> -fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8
> -Wno-deprecated -fbootstrap-classes -g -O2 -c
> -fsource-filename=../../../gcc/libjava/java/lang/Object.java
> ../../../gcc/libjava/classpath/lib/java/lang/Object.class -DDLL_EXPORT -o
> java/lang/.libs/Object.o
> gcj.exe: can't specify '-D' without '--main'
>
> make[3]: *** [java/lang/Object.lo] Error 1
> make[3]: Leaving directory `/src/gcc/obj/mingw32/libjava'
[...]
> It seems that libtool is passing "-DDLL_EXPORT" to gcj where it seems
> to mean something different.
Thanks for the report. I've applied the following patches to Libtool's
HEAD and branch-1-5, respectively.
Cheers,
Ralf
2007-08-16 Ralf Wildenhues <address@hidden>
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [ mingw, cygwin ]
<GCJ>: Do not use -DDLL_EXPORT.
Report by Ross Ridge <rridge...>.
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.114
diff -u -r1.114 libtool.m4
--- libltdl/m4/libtool.m4 5 Aug 2007 11:44:44 -0000 1.114
+++ libltdl/m4/libtool.m4 16 Aug 2007 18:20:29 -0000
@@ -3426,7 +3426,8 @@
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -3722,7 +3723,8 @@
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
@@ -3798,7 +3800,8 @@
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
hpux9* | hpux10* | hpux11*)
2007-08-16 Ralf Wildenhues <address@hidden>
* libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC): [ mingw, cygwin ]
<GCJ>: Do not use -DDLL_EXPORT.
Report by Ross Ridge <rridge...>.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.186
diff -u -r1.314.2.186 libtool.m4
--- libtool.m4 5 Aug 2007 11:45:25 -0000 1.314.2.186
+++ libtool.m4 16 Aug 2007 18:20:49 -0000
@@ -4967,7 +4967,8 @@
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -5251,7 +5252,8 @@
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
darwin* | rhapsody*)
@@ -5321,7 +5323,8 @@
mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ m4_if([$1], [GCJ], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
;;
hpux9* | hpux10* | hpux11*)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Libtool should not use gcj -DDLL_EXPORT (was: [Mingw-users] ANNOUNCEMENT: GCC-4.2.1-dw2-2 release available),
Ralf Wildenhues <=