powerpc cross compiler issue

6 messages, 4 authors, 2016-05-31 · open the first message on its own page

powerpc cross compiler issue

From: Safa Hamza <hidden>
Date: 2016-05-26 09:05:54

hello every one
please can any one suggest to me a powerpc cross compiler package or from
source, i have downloaded  cross compiler package such as powerpc64le and i
got a little endian and big endian problem, i have tried also to download
eldk cross compiler but i didn't know how
any suggestion please
regards,

Re: powerpc cross compiler issue

From: Christophe Leroy <hidden>
Date: 2016-05-26 10:02:38

Le 26/05/2016 à 11:05, Safa Hamza a écrit :
hello every one
please can any one suggest to me a powerpc cross compiler package or 
from source, i have downloaded  cross compiler package such as 
powerpc64le and i got a little endian and big endian problem, i have 
tried also to download eldk cross compiler but i didn't know how
any suggestion please
https://www.kernel.org/pub/tools/crosstool/

Christophe

Re: powerpc cross compiler issue

From: Safa Hamza <hidden>
Date: 2016-05-26 11:30:01

---------- Forwarded message ----------
From: Christophe Leroy <redacted>
Date: Thu, May 26, 2016 at 11:02 AM
Subject: Re: powerpc cross compiler issue
To: Safa Hamza <redacted>, linuxppc-dev@lists.ozlabs.org



Le 26/05/2016 à 11:05, Safa Hamza a écrit :
hello every one
please can any one suggest to me a powerpc cross compiler package or from
source, i have downloaded  cross compiler package such as powerpc64le and i
got a little endian and big endian problem, i have tried also to download
eldk cross compiler but i didn't know how
any suggestion please
https://www.kernel.org/pub/tools/crosstool/


Christophe

thanks for replying, I tried a powerpc cross compiler from the list you
have send but I always got this error

 VDSO32L arch/powerpc/kernel/vdso32/vdso32.so.dbg
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
arch/powerpc/kernel/vdso32/note.o: compiled for a little endian system and
target is big endian
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
failed to merge target specific data of file
arch/powerpc/kernel/vdso32/note.o
collect2: ld returned 1 exit status
make[2]: *** [arch/powerpc/kernel/vdso32/vdso32.so.dbg] Erreur 1
make[1]: *** [arch/powerpc/kernel/vdso32] Erreur 2
make: *** [arch/powerpc/kernel] Erreur 2


the kernel was configured with ppc64_defconfig (linux-4.4.1)

Re: powerpc cross compiler issue

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-05-30 23:07:45

On Thu, 2016-05-26 at 11:05 +0200, Safa Hamza wrote:
hello every one
please can any one suggest to me a powerpc cross compiler package or from
source, i have downloaded  cross compiler package such as powerpc64le and i
got a little endian and big endian problem, i  have tried also to download
eldk cross compiler but i didn't know how  any suggestion please
If you're on Ubuntu:

  $ sudo apt-get install gcc-powerpc-linux-gnu gcc-powerpc64le-linux-gnu libc-dev-powerpc-cross libc-dev-ppc64el-cross

On Fedora I think it's called gcc-powerpc64-linux-gnu.

Then to build a big endian kernel:

  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- mrproper
  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- ppc64_defconfig
  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j 4


To build a little endian kernel:

  $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- mrproper
  $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- ppc64le_defconfig
  $ make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- -j 4


cheers

Re: powerpc cross compiler issue

From: oliver <oohall@gmail.com>
Date: 2016-05-30 23:48:49

On Thu, May 26, 2016 at 9:29 PM, Safa Hamza [off-list ref] wrote:
thanks for replying, I tried a powerpc cross compiler from the list you have
send but I always got this error

 VDSO32L arch/powerpc/kernel/vdso32/vdso32.so.dbg
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
arch/powerpc/kernel/vdso32/note.o: compiled for a little endian system and
target is big endian
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
failed to merge target specific data of file
arch/powerpc/kernel/vdso32/note.o
collect2: ld returned 1 exit status
make[2]: *** [arch/powerpc/kernel/vdso32/vdso32.so.dbg] Erreur 1
make[1]: *** [arch/powerpc/kernel/vdso32] Erreur 2
make: *** [arch/powerpc/kernel] Erreur 2
This kind of error is  usually caused by building for one endianess
then changing endianness in the kernel configuration. The build system
isn't smart enough to realise that it needs to recompile the VDSO when
this happens so you'll get linker errors unless you clean the build
directory with `make mrproper` or similar.

We should probably fix that.

Re: powerpc cross compiler issue

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-05-31 04:20:19

On Tue, 2016-05-31 at 09:48 +1000, oliver wrote:
On Thu, May 26, 2016 at 9:29 PM, Safa Hamza [off-list ref] wrote:
quoted
thanks for replying, I tried a powerpc cross compiler from the list you have
send but I always got this error

 VDSO32L arch/powerpc/kernel/vdso32/vdso32.so.dbg
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
arch/powerpc/kernel/vdso32/note.o: compiled for a little endian system and
target is big endian
/home/marwa/Bureau/lauterbach/powerpc/gcc-4.6.3-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/4.6.3/../../../../powerpc64-linux/bin/ld:
failed to merge target specific data of file
arch/powerpc/kernel/vdso32/note.o
collect2: ld returned 1 exit status
make[2]: *** [arch/powerpc/kernel/vdso32/vdso32.so.dbg] Erreur 1
make[1]: *** [arch/powerpc/kernel/vdso32] Erreur 2
make: *** [arch/powerpc/kernel] Erreur 2
This kind of error is  usually caused by building for one endianess
then changing endianness in the kernel configuration. The build system
isn't smart enough to realise that it needs to recompile the VDSO when
this happens so you'll get linker errors unless you clean the build
directory with `make mrproper` or similar.

We should probably fix that.
We should:

  https://github.com/linuxppc/linux/issues/30

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help