Bug 20561 - Error compiling jdtcore.jar on powerpc
Summary: Error compiling jdtcore.jar on powerpc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2005-03-19 22:41 UTC by Ka-Hing Cheung
Modified: 2005-03-22 16:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-03-21 16:57:03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ka-Hing Cheung 2005-03-19 22:41:35 UTC
I followed the instruction on
http://developer.classpath.org/mediation/ClasspathShowcase to compile eclipse.
Here's the error:

Compiling ./plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar to native
/tmp/cccNhHCN.s: Assembler messages:
/tmp/cccNhHCN.s:1952484: Error: operand out of range (ffffffffffff7ee4 not
between -32768 and 32767)
/tmp/cccNhHCN.s:3406968: Error: operand out of range (ffffffffffff7ee4 not
between -32768 and 32767)

The command used is:
gcj-4.0 -shared -findirect-dispatch -fjni -fPIC -o jdtcore.jar.so jdtcore.jar
Comment 1 Andrew Pinski 2005-03-19 22:44:49 UTC
try compiling with -mlong-branch.
Comment 2 Ka-Hing Cheung 2005-03-20 00:43:39 UTC
$ gcj-4.0 -mlong-branch -shared -findirect-dispatch -fjni -fPIC -o
./plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar.so
./plugins/org.eclipse.jdt.core_3.0.1/jdtcore.jar
jc1: error: invalid option ‘long-branch’

$ gcj-4.0 -v
Using built-in specs.
Reading specs from /usr/lib/gcc/powerpc-linux/4.0.0/../../../libgcj.spec
rename spec lib to liborig
Target: powerpc-linux
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada
--prefix=/usr --libexecdir=/usr/lib --enable-shared --with-system-zlib
--enable-nls --enable-threads=posix --without-included-gettext
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo --enable-mpfr --disable-multilib
--enable-checking=release powerpc-linux
Thread model: posix
gcc version 4.0.0 20050301 (prerelease) (Debian 4.0-0pre6ubuntu6)
Comment 3 Andrew Pinski 2005-03-20 00:46:57 UTC
Subject: Re:  Error compiling jdtcore.jar on powerpc

I had meant -mlongcall.

-- Pinski

Comment 4 Ka-Hing Cheung 2005-03-20 01:16:26 UTC
That works. Thanks.
Comment 5 Andrew Pinski 2005-03-21 16:57:01 UTC
This is also:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=151466

And patch was posted here: 
<http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02001.html>.
Comment 6 CVS Commits 2005-03-22 13:29:49 UTC
Subject: Bug 20561

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-03-22 13:29:30

Modified files:
	gcc            : ChangeLog cfglayout.c final.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20050321-2.c 

Log message:
	PR target/20561
	* cfglayout.c (reemit_insn_block_notes): Don't put block notes in
	between jump table and its label.
	* final.c (shorten_branches): Handle notes in between ADDR_VEC
	resp. ADDR_DIFF_VEC and the label preceeding it.
	(final_scan_insn): Likewise.  Ensure ADDR_VEC resp. ADDR_DIFF_VEC
	is emitted in the right section.
	
	* gcc.dg/20050321-2.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7955&r2=2.7956
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfglayout.c.diff?cvsroot=gcc&r1=1.82&r2=1.83
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/final.c.diff?cvsroot=gcc&r1=1.344&r2=1.345
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5193&r2=1.5194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050321-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 7 CVS Commits 2005-03-22 13:40:08 UTC
Subject: Bug 20561

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	jakub@gcc.gnu.org	2005-03-22 13:39:37

Modified files:
	gcc            : ChangeLog cfglayout.c final.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20050321-2.c 

Log message:
	PR target/20561
	* cfglayout.c (reemit_insn_block_notes): Don't put block notes in
	between jump table and its label.
	* final.c (shorten_branches): Handle notes in between ADDR_VEC
	resp. ADDR_DIFF_VEC and the label preceeding it.
	(final_scan_insn): Likewise.  Ensure ADDR_VEC resp. ADDR_DIFF_VEC
	is emitted in the right section.
	
	* gcc.dg/20050321-2.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.76&r2=2.7592.2.77
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfglayout.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.79&r2=1.79.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/final.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.344&r2=1.344.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.59&r2=1.5084.2.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050321-2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1

Comment 8 Andrew Pinski 2005-03-22 16:03:10 UTC
Fixed.