public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcj/33085] New: liblt_prog_compiler_pic_GCJ='-DDLL_EXPORT' is wrong Date: Thu, 16 Aug 2007 10:30:00 -0000 [thread overview] Message-ID: <bug-33085-4066@http.gcc.gnu.org/bugzilla/> (raw) Bug reported by Ross Ridge to mingw users list When building libgcj for windows targets, libtool puts -DDLL_EXPORT in compiler flag: 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; However that -D is a preprocessor flag (not a proper compiler switch) gcj gives -D a different meaning: from jvspec.c:lang_specific_driver if (saw_D && ! main_class_name) fatal ("can't specify '-D' without '--main'\n"); As a result, libtool build of shared libgcj fails with: 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' -- Summary: liblt_prog_compiler_pic_GCJ='-DDLL_EXPORT' is wrong Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dannysmith at users dot sourceforge dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33085
next reply other threads:[~2007-08-16 10:30 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-08-16 10:30 dannysmith at users dot sourceforge dot net [this message] 2008-02-07 17:16 ` [Bug libgcj/33085] " rondesot at yahoo dot com 2008-02-07 17:26 ` Ralf dot Wildenhues at gmx dot de 2008-02-15 6:14 ` rwild at gcc dot gnu dot org 2008-02-16 3:59 ` rwild at gcc dot gnu dot org 2008-02-16 4:01 ` rwild at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-33085-4066@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).