linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc cross compiler issue
@ 2016-05-26  9:05 Safa Hamza
  2016-05-26 10:02 ` Christophe Leroy
  2016-05-30 23:07 ` Michael Ellerman
  0 siblings, 2 replies; 6+ messages in thread
From: Safa Hamza @ 2016-05-26  9:05 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

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,

[-- Attachment #2: Type: text/html, Size: 370 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc cross compiler issue
  2016-05-26  9:05 powerpc cross compiler issue Safa Hamza
@ 2016-05-26 10:02 ` Christophe Leroy
  2016-05-26 11:29   ` Safa Hamza
  2016-05-30 23:07 ` Michael Ellerman
  1 sibling, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2016-05-26 10:02 UTC (permalink / raw)
  To: Safa Hamza, linuxppc-dev


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc cross compiler issue
  2016-05-26 10:02 ` Christophe Leroy
@ 2016-05-26 11:29   ` Safa Hamza
  2016-05-30 23:48     ` oliver
  0 siblings, 1 reply; 6+ messages in thread
From: Safa Hamza @ 2016-05-26 11:29 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

---------- Forwarded message ----------
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Thu, May 26, 2016 at 11:02 AM
Subject: Re: powerpc cross compiler issue
To: Safa Hamza <safahamza1@gmail.com>, 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)

[-- Attachment #2: Type: text/html, Size: 2467 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc cross compiler issue
  2016-05-26  9:05 powerpc cross compiler issue Safa Hamza
  2016-05-26 10:02 ` Christophe Leroy
@ 2016-05-30 23:07 ` Michael Ellerman
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-05-30 23:07 UTC (permalink / raw)
  To: Safa Hamza, linuxppc-dev

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc cross compiler issue
  2016-05-26 11:29   ` Safa Hamza
@ 2016-05-30 23:48     ` oliver
  2016-05-31  4:20       ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: oliver @ 2016-05-30 23:48 UTC (permalink / raw)
  To: Safa Hamza; +Cc: Christophe Leroy, linuxppc-dev

On Thu, May 26, 2016 at 9:29 PM, Safa Hamza <safahamza1@gmail.com> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: powerpc cross compiler issue
  2016-05-30 23:48     ` oliver
@ 2016-05-31  4:20       ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2016-05-31  4:20 UTC (permalink / raw)
  To: oliver, Safa Hamza; +Cc: linuxppc-dev

On Tue, 2016-05-31 at 09:48 +1000, oliver wrote:

> On Thu, May 26, 2016 at 9:29 PM, Safa Hamza <safahamza1@gmail.com> 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.

We should:

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

cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-31  4:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26  9:05 powerpc cross compiler issue Safa Hamza
2016-05-26 10:02 ` Christophe Leroy
2016-05-26 11:29   ` Safa Hamza
2016-05-30 23:48     ` oliver
2016-05-31  4:20       ` Michael Ellerman
2016-05-30 23:07 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).