Bug#647324: gcj-4.6: Wrong MULTIARCH_DIRNAME on powerpcspe (is "powerpc-linux-gnu")
Source: gcj-4.6
Version: 4.6.2-1
Severity: wishlist
Tags: patch
Building gcj-4.6=4.6.2-1 (using gcc-4.6-source=4.6.2-2) is failing due
to an invalid value of MULTIARCH_DIRNAME on powerpcspe.
I don't have the foggiest idea why GCC itself builds and installs
correctly, but the Java build fails with this error:
dh_movefiles: debian/tmp/usr/lib/powerpc-linux-gnuspe/gcj-4.6-12/libjvm.so not found (supposed to put it in libgcj12)
dh_movefiles: debian/tmp/usr/lib/powerpc-linux-gnuspe/gcj-4.6-12/libjavamath.so not found (supposed to put it in libgcj12)
Inspecting that directory, I see this:
$ ls -l debian/tmp/usr/lib
total 20
drwxr-xr-x 3 kmoffett kmoffett 4096 Nov 1 14:11 gcc
drwxr-xr-x 3 kmoffett kmoffett 4096 Nov 1 14:13 jvm
drwxr-xr-x 3 kmoffett kmoffett 4096 Nov 1 14:13 jvm-exports
drwxr-xr-x 3 kmoffett kmoffett 4096 Nov 1 14:13 powerpc-linux-gnu
drwxr-xr-x 3 kmoffett kmoffett 4096 Nov 1 14:13 powerpc-linux-gnuspe
The "powerpc-linux-gnu" is obviously wrong, and it contains the files
that are missing from "powerpc-linux-gnuspe":
$ ls -l debian/tmp/usr/lib/powerpc-linux-gnu
total 135200
drwxr-xr-x 2 kmoffett kmoffett 4096 Nov 1 14:13 gcj-4.6-12
-rwxr-xr-x 1 kmoffett kmoffett 1637 Nov 1 14:12 libgcj_bc.so
lrwxrwxrwx 1 kmoffett kmoffett 18 Nov 1 14:12 libgcj_bc.so.1 -> libgcj_bc.so.1.0.0
-rwxr-xr-x 1 kmoffett kmoffett 1637 Nov 1 14:12 libgcj_bc.so.1.0.0
lrwxrwxrwx 1 kmoffett kmoffett 16 Nov 1 14:12 libgcj.so -> libgcj.so.12.0.0
lrwxrwxrwx 1 kmoffett kmoffett 16 Nov 1 14:12 libgcj.so.12 -> libgcj.so.12.0.0
-rwxr-xr-x 1 kmoffett kmoffett 127976277 Nov 1 14:12 libgcj.so.12.0.0
lrwxrwxrwx 1 kmoffett kmoffett 22 Nov 1 14:12 libgcj-tools.so -> libgcj-tools.so.12.0.0
lrwxrwxrwx 1 kmoffett kmoffett 22 Nov 1 14:12 libgcj-tools.so.12 -> libgcj-tools.so.12.0.0
-rwxr-xr-x 1 kmoffett kmoffett 10421495 Nov 1 14:12 libgcj-tools.so.12.0.0
lrwxrwxrwx 1 kmoffett kmoffett 16 Nov 1 14:12 libgij.so -> libgij.so.12.0.0
lrwxrwxrwx 1 kmoffett kmoffett 16 Nov 1 14:12 libgij.so.12 -> libgij.so.12.0.0
-rwxr-xr-x 1 kmoffett kmoffett 19447 Nov 1 14:12 libgij.so.12.0.0
-rw-r--r-- 1 kmoffett kmoffett 1437 Nov 1 14:12 logging.properties
drwxr-xr-x 2 kmoffett kmoffett 4096 Nov 1 14:12 security
I can disassemble those files with objdump and they clearly contain
valid e500v2 opcode sequences, so the build process seems to be fine
except for the multiarch directory.
I tried to hack up a patch (attached) that looks correct to me, but I
have very little experience with this area of GCC and I haven't tested
it yet. I would really appreciate a second set of eyes.
I'm going to apply it on top of the gcc-4.6 sources (4.6.2-2) and
rebuild GCC and GIJ to see if the problem goes away; I'll let you know
when I have some results.
Cheers,
Kyle Moffett
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'stable-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- gcj-4.6-4.6.2/src/gcc/config.gcc.orig 2011-11-01 15:02:10.318248946 -0400
+++ gcj-4.6-4.6.2/src/gcc/config.gcc 2011-11-01 15:03:42.149247963 -0400
@@ -2188,7 +2188,8 @@
powerpc*-*-linux*altivec*)
tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
powerpc*-*-linux*spe*)
- tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
+ tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h"
+ tmake_file="${tmake_file} rs6000/t-linux-spe" ;;
powerpc*-*-linux*paired*)
tm_file="${tm_file} rs6000/750cl.h" ;;
esac
--- gcj-4.6-4.6.2/src/gcc/config/rs6000/t-linux-spe.orig 1969-12-31 19:00:00.000000000 -0500
+++ gcj-4.6-4.6.2/src/gcc/config/rs6000/t-linux-spe 2011-11-01 15:04:06.994247615 -0400
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = powerpc-linux-gnuspe
Reply to: