Re: Mixing BC and CNI in the same executable

Stephen Kell <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
> You should be OK.  Tell us how you linked it all.

Here's the command that builds my executable (somewhat wrapped).

gcj -fno-eliminate-unused-debug-symbols
-fno-eliminate-unused-debug-types -findirect-dispatch
-fno-indirect-classes -fpic -g3
--classpath=./java:/home/stephen/work/devel/cake/src/antlr-runtime-3.1.3.jar:/home/stephen/opt/lib/java/antlr-3.1.3.jar:
-Wall  -L../../dwarf/libdwarfpp/src -L/home/stephen/opt/lib
-L../../c++-fileno/lib -L../../libsrk31c++ -Wl,-R.
java/cake/CloneableTree.o java/cake/InternalError.o
java/cake/SemanticError.o java/cake/TreewalkError.o  alias.o cake.o
cppcatch.o derive.o dwarf.o exists.o javacatch.o link.o main.o module.o
pred.o supplementary.o util.o  parser/parser.a  antlr-runtime.jar.so
stringtemplate.jar.so -lsrk31c++ -Wl,--whole-archive -ldwarf
-Wl,--no-whole-archive -ldwarfpp -lfileno -lelf -lstdc++ -o "cake" 

I had been compiling with -fPIC. I tried changing it to -fpic just in
case, but no change. I've pasted a larger tail-end chunk of my build
log below, showing gcj and g++ compiler invocations.

Stephen

g++ -c -o "util.o" -fno-eliminate-unused-debug-symbols
-fno-eliminate-unused-debug-types -fpic -g3 -Iparser/include -Iinclude
-Ijava/include -I../../dwarf/libdwarfpp/include -I../../libsrk31c++
-I../../c++-fileno/include -I/home/stephen/opt/include  -Wall
-DCAKE_VERSION=\"0.0201001231743\" "util.cpp"
gcj -shared -fno-eliminate-unused-debug-symbols -fno-eliminate-unused-debug-types -findirect-dispatch -fno-indirect-classes -fpic -g3 --classpath=./java:/home/stephen/work/devel/cake/src/antlr-runtime-3.1.3.jar:/home/stephen/opt/lib/java/antlr-3.1.3.jar:  -Wall  -o "antlr-runtime.jar.so" "antlr-runtime-3.1.3.jar"
gcj -shared -fno-eliminate-unused-debug-symbols -fno-eliminate-unused-debug-types -findirect-dispatch -fno-indirect-classes -fpic -g3 --classpath=./java:/home/stephen/work/devel/cake/src/antlr-runtime-3.1.3.jar:/home/stephen/opt/lib/java/antlr-3.1.3.jar:  -Wall  -o "stringtemplate.jar.so" "stringtemplate-3.2.1.jar"
gcj -fno-eliminate-unused-debug-symbols
-fno-eliminate-unused-debug-types -findirect-dispatch
-fno-indirect-classes -fpic -g3
--classpath=./java:/home/stephen/work/devel/cake/src/antlr-runtime-3.1.3.jar:/home/stephen/opt/lib/java/antlr-3.1.3.jar:
-Wall  -L../../dwarf/libdwarfpp/src -L/home/stephen/opt/lib
-L../../c++-fileno/lib -L../../libsrk31c++ -Wl,-R.
java/cake/CloneableTree.o java/cake/InternalError.o
java/cake/SemanticError.o java/cake/TreewalkError.o  alias.o cake.o
cppcatch.o derive.o dwarf.o exists.o javacatch.o link.o main.o module.o
pred.o supplementary.o util.o  parser/parser.a  antlr-runtime.jar.so
stringtemplate.jar.so -lsrk31c++ -Wl,--whole-archive -ldwarf
-Wl,--no-whole-archive -ldwarfpp -lfileno -lelf -lstdc++ -o "cake"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.