This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49461] New: boehm-gc and gcj incompatible with pie
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Jun 2011 02:17:45 +0000
- Subject: [Bug target/49461] New: boehm-gc and gcj incompatible with pie
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49461
Summary: boehm-gc and gcj incompatible with pie
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: howarth@nitro.med.uc.edu
When built with -pie linkage on intel darwin, the boehm-gc test suite fails the
tests...
FAIL: boehm-gc.c/gctest.c -O2 execution test
FAIL: boehm-gc.c/leak_test.c -O2 execution test
FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test
FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test
at both -m32 and -m64. Likewise gcj crashes when ecj1 is built with -pie
linkage. This crash appears as...
[MacPro:~] howarth% gcj-fsf-4.7 --main=testme -O testme.java -pie -v
Using built-in specs.
Reading specs from
/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.0.0/4.7.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
COLLECT_GCC=gcj-fsf-4.7
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.0.0/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11.0.0
Configured with: ../gcc-4.7-20110617/configure --prefix=/sw
--prefix=/sw/lib/gcc4.7 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info
--enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-4.7 --enable-checking=yes --enable-cloog-backend=isl
Thread model: posix
gcc version 4.7.0 20110617 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-mmacosx-version-min=10.7.0' '-O' '-pie'
'-v' '-fbootclasspath=./:/sw/lib/gcc4.7/share/java/libgcj-4.7.0.jar'
'-shared-libgcc' '-mtune=core2'
/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.0.0/4.7.0/ecj1 testme.java
-fbootclasspath=./:/sw/lib/gcc4.7/share/java/libgcj-4.7.0.jar -fsource=1.5
-ftarget=1.5 -fzip-dependency
/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T//ccxj1zOQ.zip -fzip-target
/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T//ccXXudTY.jar
Exception in thread "main" java.lang.ClassFormatError:
org.eclipse.jdt.internal.compiler.Compiler (erroneous exception handler info)
at java.lang.VMClassLoader.defineClass(libgcj.12.dylib)
at java.lang.ClassLoader.defineClass(libgcj.12.dylib)
at java.security.SecureClassLoader.defineClass(libgcj.12.dylib)
at java.net.URLClassLoader.findClass(libgcj.12.dylib)
at java.lang.ClassLoader.loadClass(libgcj.12.dylib)
at java.lang.ClassLoader.loadClass(libgcj.12.dylib)
at
org.eclipse.jdt.internal.compiler.impl.CompilerOptions.resetDefaults(CompilerOptions.java:963)
at
org.eclipse.jdt.internal.compiler.impl.CompilerOptions.<init>(CompilerOptions.java:371)
at
org.eclipse.jdt.internal.compiler.impl.CompilerOptions.<init>(CompilerOptions.java:363)
at org.eclipse.jdt.internal.compiler.batch.Main.initialize(Main.java:3548)
at org.eclipse.jdt.internal.compiler.batch.Main.<init>(Main.java:1435)
at org.eclipse.jdt.internal.compiler.batch.Main.<init>(Main.java:1423)
at org.eclipse.jdt.internal.compiler.batch.GCCMain.<init>(GCCMain.java:62)
at org.eclipse.jdt.internal.compiler.batch.GCCMain.main(GCCMain.java:498)
The problems with gcj can be avoided by passing -no_pie via SYSTEMSPEC in
gcj.spec.in. The test suite results for libjava are reasonable with that
change....
http://gcc.gnu.org/ml/gcc-testresults/2011-06/msg01853.html