All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Recommended MIPS toolchain
@ 2014-08-20  9:35 Vasili Galka
  2014-08-20 10:23 ` Daniel Schwierzeck
  0 siblings, 1 reply; 8+ messages in thread
From: Vasili Galka @ 2014-08-20  9:35 UTC (permalink / raw)
  To: u-boot

Hi,

What is the recommended tool-chain to verify compilation of MIPS boards?

I tried the one from
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
But it does not work, throws plenty of errors about hard/soft float.

Regards,
Vasili

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

* [U-Boot] Recommended MIPS toolchain
  2014-08-20  9:35 [U-Boot] Recommended MIPS toolchain Vasili Galka
@ 2014-08-20 10:23 ` Daniel Schwierzeck
  2014-08-20 11:50   ` Vasili Galka
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Schwierzeck @ 2014-08-20 10:23 UTC (permalink / raw)
  To: u-boot



On 20.08.2014 11:35, Vasili Galka wrote:
> Hi,
> 
> What is the recommended tool-chain to verify compilation of MIPS boards?

you could try

Denx ELDK 5.5 for MIPS
http://www.denx.de/wiki/ELDK-5/WebHome

or

Mentor Sourcery CodeBench Lite Edition for MIPS ELF
https://sourcery.mentor.com/GNUToolchain/subscription3537?lite=MIPS

> 
> I tried the one from
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
> But it does not work, throws plenty of errors about hard/soft float.

Similar to ARM you can use the built-in libgcc implementation of U-Boot
with "export USE_PRIVATE_LIBGCC=yes" (before Kbuild/Kconfig) or
"CONFIG_USE_PRIVATE_LIBGCC=y".

Actually you would need a full multilib toolchain with different libgcc
or multiple toolchains to build all BE/LE and hard-float/soft-float
variants. But that is not feasible, so you should always set
USE_PRIVATE_LIBGCC. USE_PRIVATE_LIBGCC is also required for ELDK toolchains.

BTW: "MAKEALL -a mips" with the kernel.org toolchain and
USE_PRIVATE_LIBGCC works

-- 
- Daniel

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

* [U-Boot] Recommended MIPS toolchain
  2014-08-20 10:23 ` Daniel Schwierzeck
@ 2014-08-20 11:50   ` Vasili Galka
  2014-08-20 12:20     ` Daniel Schwierzeck
  0 siblings, 1 reply; 8+ messages in thread
From: Vasili Galka @ 2014-08-20 11:50 UTC (permalink / raw)
  To: u-boot

Hi Daniel,

On Wed, Aug 20, 2014 at 1:23 PM, Daniel Schwierzeck
<daniel.schwierzeck@gmail.com> wrote:
>
>
>
> On 20.08.2014 11:35, Vasili Galka wrote:
> > Hi,
> >
> > What is the recommended tool-chain to verify compilation of MIPS boards?
>
> you could try
>
> Denx ELDK 5.5 for MIPS
> http://www.denx.de/wiki/ELDK-5/WebHome
>
> or
>
> Mentor Sourcery CodeBench Lite Edition for MIPS ELF
> https://sourcery.mentor.com/GNUToolchain/subscription3537?lite=MIPS
>
> >
> > I tried the one from
> > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
> > But it does not work, throws plenty of errors about hard/soft float.
>
> Similar to ARM you can use the built-in libgcc implementation of U-Boot
> with "export USE_PRIVATE_LIBGCC=yes" (before Kbuild/Kconfig) or
> "CONFIG_USE_PRIVATE_LIBGCC=y".
>
> Actually you would need a full multilib toolchain with different libgcc
> or multiple toolchains to build all BE/LE and hard-float/soft-float
> variants. But that is not feasible, so you should always set
> USE_PRIVATE_LIBGCC. USE_PRIVATE_LIBGCC is also required for ELDK toolchains.
>
> BTW: "MAKEALL -a mips" with the kernel.org toolchain and
> USE_PRIVATE_LIBGCC works
>
> --
> - Daniel

Strangely, I still fail to build.
I'm trying on u-boot/master 6d1966e12 (dated Aug 1st 2014)
Building with the following commands, on clean build directory:

export BUILD_DIR=/home/lab/dev/u-boot/out/all_mips
export USE_PRIVATE_LIBGCC=yes
export CROSS_COMPILE=mips-linux-
./MAKEALL -a mips

Here is what I get with the toolchain from kernel.org:

Building qemu_mips board...
   text       data        bss        dec        hex    filename
 223063       8160     217752     448975      6d9cf
/home/lab/dev/u-boot/out/all_mips/u-boot
mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
arch/mips/cpu/mips32/built-in.o),
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
uses -mhard-float
mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
arch/mips/cpu/mips32/built-in.o),
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
uses -mhard-float
Building qemu_mipsel board...
make[1]: *** [u-boot] Error 1
make: *** [sub-make] Error 2
mips-linux-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
mips-linux-ld.bfd:
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
compiled for a big endian system and target is little endian
mips-linux-ld.bfd:
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
endianness incompatible with that of the selected emulation
mips-linux-ld.bfd: failed to merge target specific data of file
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
mips-linux-ld.bfd:
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
compiled for a big endian system and target is little endian
mips-linux-ld.bfd:
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
endianness incompatible with that of the selected emulation
mips-linux-ld.bfd: failed to merge target specific data of file
/usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
make[1]: *** [u-boot] Error 1
make: *** [sub-make] Error 2


and here is what I get with Mentor Sourcery CodeBench Lite Edition:
(Replacing to CROSS_COMPILE=mips-sde-elf-)

Building qemu_mips board...
arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
make[1]: *** [u-boot] Error 1
make: *** [sub-make] Error 2
mips-sde-elf-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
mips-sde-elf-ld: board/qemu-mips/lowlevel_init.o: warning: linking
abicalls files with non-abicalls files
mips-sde-elf-ld: arch/mips/cpu/mips32/cpu.o: warning: linking abicalls
files with non-abicalls files
/home/lab/dev/u-boot/common/cli_simple.c: In function 'process_macros':
/home/lab/dev/u-boot/common/cli_simple.c:73:2: warning: format '%zd'
expects argument of type 'signed size_t', but argument 2 has type
'__kernel_size_t' [-Wformat=]
  debug_parser("[PROCESS_MACROS] INPUT len %zd: \"%s\"\n", strlen(input),
  ^
/home/lab/dev/u-boot/common/cli_simple.c:162:2: warning: format '%zd'
expects argument of type 'signed size_t', but argument 2 has type
'__kernel_size_t' [-Wformat=]
  debug_parser("[PROCESS_MACROS] OUTPUT len %zd: \"%s\"\n",
  ^
/home/lab/dev/u-boot/lib/lzma/LzmaTools.c: In function
'lzmaBuffToBuffDecompress':
/home/lab/dev/u-boot/lib/lzma/LzmaTools.c:94:5: warning: format '%zx'
expects argument of type 'size_t', but argument 2 has type 'SizeT'
[-Wformat=]
     debug("LZMA: Uncompresed size............ 0x%zx\n", outSizeFull);
     ^
/home/lab/dev/u-boot/lib/lzma/LzmaTools.c:95:5: warning: format '%zx'
expects argument of type 'size_t', but argument 2 has type 'SizeT'
[-Wformat=]
     debug("LZMA: Compresed size.............. 0x%zx\n", compressedSize);
     ^
/home/lab/dev/u-boot/lib/lzma/LzmaTools.c:115:5: warning: format '%zx'
expects argument of type 'size_t', but argument 2 has type 'SizeT'
[-Wformat=]
     debug("LZMA: Uncompresed ................ 0x%zx\n", outProcessed);
     ^
/home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_export':
/home/lab/dev/u-boot/common/cmd_nvedit.c:914:3: warning: format '%zX'
expects argument of type 'size_t', but argument 3 has type 'unsigned
int' [-Wformat=]
   sprintf(buf, "%zX", (size_t)len);
   ^
/home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_import':
/home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zu'
expects argument of type 'size_t', but argument 2 has type 'unsigned
int' [-Wformat=]
   printf("## Info: input data size = %zu = 0x%zX\n", size, size);
   ^
/home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zX'
expects argument of type 'size_t', but argument 3 has type 'unsigned
int' [-Wformat=]
/home/lab/dev/u-boot/lib/hashtable.c: In function 'hexport_r':
/home/lab/dev/u-boot/lib/hashtable.c:605:2: warning: format '%zu'
expects argument of type 'size_t', but argument 5 has type 'unsigned
int' [-Wformat=]
  debug("EXPORT  table = %p, htab.size = %d, htab.filled = %d, "
  ^
/home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
expects argument of type 'size_t', but argument 2 has type 'unsigned
int' [-Wformat=]
     "but need %zu\n", size, totlen + 1);
     ^
/home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
expects argument of type 'size_t', but argument 3 has type 'unsigned
int' [-Wformat=]
/home/lab/dev/u-boot/lib/hashtable.c: In function 'himport_r':
/home/lab/dev/u-boot/lib/hashtable.c:793:3: warning: format '%zu'
expects argument of type 'size_t', but argument 2 has type 'unsigned
int' [-Wformat=]
   debug("himport_r: can't malloc %zu bytes\n", size);
   ^
mips-sde-elf-ld: arch/mips/cpu/mips32/start.o: relocation R_MIPS_HI16
against `lowlevel_init' can not be used when making a shared object;
recompile with -fPIC
arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
make[1]: *** [u-boot] Error 1
make: *** [sub-make] Error 2

I would appreciate your assistance.

Best,
Vasili

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

* [U-Boot] Recommended MIPS toolchain
  2014-08-20 11:50   ` Vasili Galka
@ 2014-08-20 12:20     ` Daniel Schwierzeck
  2014-08-20 12:31       ` Vasili Galka
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Schwierzeck @ 2014-08-20 12:20 UTC (permalink / raw)
  To: u-boot



On 20.08.2014 13:50, Vasili Galka wrote:
> Hi Daniel,
> 
> On Wed, Aug 20, 2014 at 1:23 PM, Daniel Schwierzeck
> <daniel.schwierzeck@gmail.com> wrote:
>>
>>
>>
>> On 20.08.2014 11:35, Vasili Galka wrote:
>>> Hi,
>>>
>>> What is the recommended tool-chain to verify compilation of MIPS boards?
>>
>> you could try
>>
>> Denx ELDK 5.5 for MIPS
>> http://www.denx.de/wiki/ELDK-5/WebHome
>>
>> or
>>
>> Mentor Sourcery CodeBench Lite Edition for MIPS ELF
>> https://sourcery.mentor.com/GNUToolchain/subscription3537?lite=MIPS
>>
>>>
>>> I tried the one from
>>> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
>>> But it does not work, throws plenty of errors about hard/soft float.
>>
>> Similar to ARM you can use the built-in libgcc implementation of U-Boot
>> with "export USE_PRIVATE_LIBGCC=yes" (before Kbuild/Kconfig) or
>> "CONFIG_USE_PRIVATE_LIBGCC=y".
>>
>> Actually you would need a full multilib toolchain with different libgcc
>> or multiple toolchains to build all BE/LE and hard-float/soft-float
>> variants. But that is not feasible, so you should always set
>> USE_PRIVATE_LIBGCC. USE_PRIVATE_LIBGCC is also required for ELDK toolchains.
>>
>> BTW: "MAKEALL -a mips" with the kernel.org toolchain and
>> USE_PRIVATE_LIBGCC works
>>
>> --
>> - Daniel
> 
> Strangely, I still fail to build.
> I'm trying on u-boot/master 6d1966e12 (dated Aug 1st 2014)
> Building with the following commands, on clean build directory:
> 
> export BUILD_DIR=/home/lab/dev/u-boot/out/all_mips
> export USE_PRIVATE_LIBGCC=yes
> export CROSS_COMPILE=mips-linux-
> ./MAKEALL -a mips

sorry if I was not accurate enough but with introduction of Kbuild
"USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
To support different U-Boot versions you should set both variants:

export USE_PRIVATE_LIBGCC=yes
export CONFIG_USE_PRIVATE_LIBGCC=y


> 
> Here is what I get with the toolchain from kernel.org:
> 
> Building qemu_mips board...
>    text       data        bss        dec        hex    filename
>  223063       8160     217752     448975      6d9cf
> /home/lab/dev/u-boot/out/all_mips/u-boot
> mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
> arch/mips/cpu/mips32/built-in.o),
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
> uses -mhard-float
> mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
> arch/mips/cpu/mips32/built-in.o),
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
> uses -mhard-float
> Building qemu_mipsel board...
> make[1]: *** [u-boot] Error 1
> make: *** [sub-make] Error 2
> mips-linux-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
> mips-linux-ld.bfd:
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
> compiled for a big endian system and target is little endian
> mips-linux-ld.bfd:
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
> endianness incompatible with that of the selected emulation
> mips-linux-ld.bfd: failed to merge target specific data of file
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
> mips-linux-ld.bfd:
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
> compiled for a big endian system and target is little endian
> mips-linux-ld.bfd:
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
> endianness incompatible with that of the selected emulation
> mips-linux-ld.bfd: failed to merge target specific data of file
> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
> make[1]: *** [u-boot] Error 1
> make: *** [sub-make] Error 2
> 
> 
> and here is what I get with Mentor Sourcery CodeBench Lite Edition:
> (Replacing to CROSS_COMPILE=mips-sde-elf-)
> 
> Building qemu_mips board...
> arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
> make[1]: *** [u-boot] Error 1
> make: *** [sub-make] Error 2
> mips-sde-elf-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
> mips-sde-elf-ld: board/qemu-mips/lowlevel_init.o: warning: linking
> abicalls files with non-abicalls files
> mips-sde-elf-ld: arch/mips/cpu/mips32/cpu.o: warning: linking abicalls
> files with non-abicalls files
> /home/lab/dev/u-boot/common/cli_simple.c: In function 'process_macros':
> /home/lab/dev/u-boot/common/cli_simple.c:73:2: warning: format '%zd'
> expects argument of type 'signed size_t', but argument 2 has type
> '__kernel_size_t' [-Wformat=]
>   debug_parser("[PROCESS_MACROS] INPUT len %zd: \"%s\"\n", strlen(input),
>   ^
> /home/lab/dev/u-boot/common/cli_simple.c:162:2: warning: format '%zd'
> expects argument of type 'signed size_t', but argument 2 has type
> '__kernel_size_t' [-Wformat=]
>   debug_parser("[PROCESS_MACROS] OUTPUT len %zd: \"%s\"\n",
>   ^
> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c: In function
> 'lzmaBuffToBuffDecompress':
> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:94:5: warning: format '%zx'
> expects argument of type 'size_t', but argument 2 has type 'SizeT'
> [-Wformat=]
>      debug("LZMA: Uncompresed size............ 0x%zx\n", outSizeFull);
>      ^
> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:95:5: warning: format '%zx'
> expects argument of type 'size_t', but argument 2 has type 'SizeT'
> [-Wformat=]
>      debug("LZMA: Compresed size.............. 0x%zx\n", compressedSize);
>      ^
> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:115:5: warning: format '%zx'
> expects argument of type 'size_t', but argument 2 has type 'SizeT'
> [-Wformat=]
>      debug("LZMA: Uncompresed ................ 0x%zx\n", outProcessed);
>      ^
> /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_export':
> /home/lab/dev/u-boot/common/cmd_nvedit.c:914:3: warning: format '%zX'
> expects argument of type 'size_t', but argument 3 has type 'unsigned
> int' [-Wformat=]
>    sprintf(buf, "%zX", (size_t)len);
>    ^
> /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_import':
> /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zu'
> expects argument of type 'size_t', but argument 2 has type 'unsigned
> int' [-Wformat=]
>    printf("## Info: input data size = %zu = 0x%zX\n", size, size);
>    ^
> /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zX'
> expects argument of type 'size_t', but argument 3 has type 'unsigned
> int' [-Wformat=]
> /home/lab/dev/u-boot/lib/hashtable.c: In function 'hexport_r':
> /home/lab/dev/u-boot/lib/hashtable.c:605:2: warning: format '%zu'
> expects argument of type 'size_t', but argument 5 has type 'unsigned
> int' [-Wformat=]
>   debug("EXPORT  table = %p, htab.size = %d, htab.filled = %d, "
>   ^
> /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
> expects argument of type 'size_t', but argument 2 has type 'unsigned
> int' [-Wformat=]
>      "but need %zu\n", size, totlen + 1);
>      ^
> /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
> expects argument of type 'size_t', but argument 3 has type 'unsigned
> int' [-Wformat=]
> /home/lab/dev/u-boot/lib/hashtable.c: In function 'himport_r':
> /home/lab/dev/u-boot/lib/hashtable.c:793:3: warning: format '%zu'
> expects argument of type 'size_t', but argument 2 has type 'unsigned
> int' [-Wformat=]
>    debug("himport_r: can't malloc %zu bytes\n", size);
>    ^
> mips-sde-elf-ld: arch/mips/cpu/mips32/start.o: relocation R_MIPS_HI16
> against `lowlevel_init' can not be used when making a shared object;
> recompile with -fPIC
> arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
> make[1]: *** [u-boot] Error 1
> make: *** [sub-make] Error 2
> 
> I would appreciate your assistance.
> 
> Best,
> Vasili
> 

-- 
- Daniel

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

* [U-Boot] Recommended MIPS toolchain
  2014-08-20 12:20     ` Daniel Schwierzeck
@ 2014-08-20 12:31       ` Vasili Galka
  2014-09-08  9:29         ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Vasili Galka @ 2014-08-20 12:31 UTC (permalink / raw)
  To: u-boot

Hi Daniel,

On Wed, Aug 20, 2014 at 3:20 PM, Daniel Schwierzeck
<daniel.schwierzeck@gmail.com> wrote:
>
>
> On 20.08.2014 13:50, Vasili Galka wrote:
>> Hi Daniel,
>>
>> On Wed, Aug 20, 2014 at 1:23 PM, Daniel Schwierzeck
>> <daniel.schwierzeck@gmail.com> wrote:
>>>
>>>
>>>
>>> On 20.08.2014 11:35, Vasili Galka wrote:
>>>> Hi,
>>>>
>>>> What is the recommended tool-chain to verify compilation of MIPS boards?
>>>
>>> you could try
>>>
>>> Denx ELDK 5.5 for MIPS
>>> http://www.denx.de/wiki/ELDK-5/WebHome
>>>
>>> or
>>>
>>> Mentor Sourcery CodeBench Lite Edition for MIPS ELF
>>> https://sourcery.mentor.com/GNUToolchain/subscription3537?lite=MIPS
>>>
>>>>
>>>> I tried the one from
>>>> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
>>>> But it does not work, throws plenty of errors about hard/soft float.
>>>
>>> Similar to ARM you can use the built-in libgcc implementation of U-Boot
>>> with "export USE_PRIVATE_LIBGCC=yes" (before Kbuild/Kconfig) or
>>> "CONFIG_USE_PRIVATE_LIBGCC=y".
>>>
>>> Actually you would need a full multilib toolchain with different libgcc
>>> or multiple toolchains to build all BE/LE and hard-float/soft-float
>>> variants. But that is not feasible, so you should always set
>>> USE_PRIVATE_LIBGCC. USE_PRIVATE_LIBGCC is also required for ELDK toolchains.
>>>
>>> BTW: "MAKEALL -a mips" with the kernel.org toolchain and
>>> USE_PRIVATE_LIBGCC works
>>>
>>> --
>>> - Daniel
>>
>> Strangely, I still fail to build.
>> I'm trying on u-boot/master 6d1966e12 (dated Aug 1st 2014)
>> Building with the following commands, on clean build directory:
>>
>> export BUILD_DIR=/home/lab/dev/u-boot/out/all_mips
>> export USE_PRIVATE_LIBGCC=yes
>> export CROSS_COMPILE=mips-linux-
>> ./MAKEALL -a mips
>
> sorry if I was not accurate enough but with introduction of Kbuild
> "USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
> To support different U-Boot versions you should set both variants:
>
> export USE_PRIVATE_LIBGCC=yes
> export CONFIG_USE_PRIVATE_LIBGCC=y
>
>
>>
>> Here is what I get with the toolchain from kernel.org:
>>
>> Building qemu_mips board...
>>    text       data        bss        dec        hex    filename
>>  223063       8160     217752     448975      6d9cf
>> /home/lab/dev/u-boot/out/all_mips/u-boot
>> mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
>> arch/mips/cpu/mips32/built-in.o),
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
>> uses -mhard-float
>> mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by
>> arch/mips/cpu/mips32/built-in.o),
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
>> uses -mhard-float
>> Building qemu_mipsel board...
>> make[1]: *** [u-boot] Error 1
>> make: *** [sub-make] Error 2
>> mips-linux-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
>> mips-linux-ld.bfd:
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
>> compiled for a big endian system and target is little endian
>> mips-linux-ld.bfd:
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o):
>> endianness incompatible with that of the selected emulation
>> mips-linux-ld.bfd: failed to merge target specific data of file
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
>> mips-linux-ld.bfd:
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
>> compiled for a big endian system and target is little endian
>> mips-linux-ld.bfd:
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o):
>> endianness incompatible with that of the selected emulation
>> mips-linux-ld.bfd: failed to merge target specific data of file
>> /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
>> make[1]: *** [u-boot] Error 1
>> make: *** [sub-make] Error 2
>>
>>
>> and here is what I get with Mentor Sourcery CodeBench Lite Edition:
>> (Replacing to CROSS_COMPILE=mips-sde-elf-)
>>
>> Building qemu_mips board...
>> arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
>> make[1]: *** [u-boot] Error 1
>> make: *** [sub-make] Error 2
>> mips-sde-elf-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file
>> mips-sde-elf-ld: board/qemu-mips/lowlevel_init.o: warning: linking
>> abicalls files with non-abicalls files
>> mips-sde-elf-ld: arch/mips/cpu/mips32/cpu.o: warning: linking abicalls
>> files with non-abicalls files
>> /home/lab/dev/u-boot/common/cli_simple.c: In function 'process_macros':
>> /home/lab/dev/u-boot/common/cli_simple.c:73:2: warning: format '%zd'
>> expects argument of type 'signed size_t', but argument 2 has type
>> '__kernel_size_t' [-Wformat=]
>>   debug_parser("[PROCESS_MACROS] INPUT len %zd: \"%s\"\n", strlen(input),
>>   ^
>> /home/lab/dev/u-boot/common/cli_simple.c:162:2: warning: format '%zd'
>> expects argument of type 'signed size_t', but argument 2 has type
>> '__kernel_size_t' [-Wformat=]
>>   debug_parser("[PROCESS_MACROS] OUTPUT len %zd: \"%s\"\n",
>>   ^
>> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c: In function
>> 'lzmaBuffToBuffDecompress':
>> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:94:5: warning: format '%zx'
>> expects argument of type 'size_t', but argument 2 has type 'SizeT'
>> [-Wformat=]
>>      debug("LZMA: Uncompresed size............ 0x%zx\n", outSizeFull);
>>      ^
>> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:95:5: warning: format '%zx'
>> expects argument of type 'size_t', but argument 2 has type 'SizeT'
>> [-Wformat=]
>>      debug("LZMA: Compresed size.............. 0x%zx\n", compressedSize);
>>      ^
>> /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:115:5: warning: format '%zx'
>> expects argument of type 'size_t', but argument 2 has type 'SizeT'
>> [-Wformat=]
>>      debug("LZMA: Uncompresed ................ 0x%zx\n", outProcessed);
>>      ^
>> /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_export':
>> /home/lab/dev/u-boot/common/cmd_nvedit.c:914:3: warning: format '%zX'
>> expects argument of type 'size_t', but argument 3 has type 'unsigned
>> int' [-Wformat=]
>>    sprintf(buf, "%zX", (size_t)len);
>>    ^
>> /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_import':
>> /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zu'
>> expects argument of type 'size_t', but argument 2 has type 'unsigned
>> int' [-Wformat=]
>>    printf("## Info: input data size = %zu = 0x%zX\n", size, size);
>>    ^
>> /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zX'
>> expects argument of type 'size_t', but argument 3 has type 'unsigned
>> int' [-Wformat=]
>> /home/lab/dev/u-boot/lib/hashtable.c: In function 'hexport_r':
>> /home/lab/dev/u-boot/lib/hashtable.c:605:2: warning: format '%zu'
>> expects argument of type 'size_t', but argument 5 has type 'unsigned
>> int' [-Wformat=]
>>   debug("EXPORT  table = %p, htab.size = %d, htab.filled = %d, "
>>   ^
>> /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
>> expects argument of type 'size_t', but argument 2 has type 'unsigned
>> int' [-Wformat=]
>>      "but need %zu\n", size, totlen + 1);
>>      ^
>> /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu'
>> expects argument of type 'size_t', but argument 3 has type 'unsigned
>> int' [-Wformat=]
>> /home/lab/dev/u-boot/lib/hashtable.c: In function 'himport_r':
>> /home/lab/dev/u-boot/lib/hashtable.c:793:3: warning: format '%zu'
>> expects argument of type 'size_t', but argument 2 has type 'unsigned
>> int' [-Wformat=]
>>    debug("himport_r: can't malloc %zu bytes\n", size);
>>    ^
>> mips-sde-elf-ld: arch/mips/cpu/mips32/start.o: relocation R_MIPS_HI16
>> against `lowlevel_init' can not be used when making a shared object;
>> recompile with -fPIC
>> arch/mips/cpu/mips32/start.o: error adding symbols: Bad value
>> make[1]: *** [u-boot] Error 1
>> make: *** [sub-make] Error 2
>>
>> I would appreciate your assistance.
>>
>> Best,
>> Vasili
>>
>
> --
> - Daniel

My sincere apologies. My mistake. Your explanation was fine - I just misread it.
Anyway, I have just successfully built all the boards with the
kernel.org tool-chain.

Many thanks for the help!

Best regards,
Vasili

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

* [U-Boot] Recommended MIPS toolchain
  2014-08-20 12:31       ` Vasili Galka
@ 2014-09-08  9:29         ` Masahiro Yamada
  2014-09-08  9:40           ` Vasili Galka
  2014-09-08 10:30           ` Daniel Schwierzeck
  0 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2014-09-08  9:29 UTC (permalink / raw)
  To: u-boot

Hi Daniel, Vasili,


> >
> > sorry if I was not accurate enough but with introduction of Kbuild
> > "USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
> > To support different U-Boot versions you should set both variants:
> >
> > export USE_PRIVATE_LIBGCC=yes
> > export CONFIG_USE_PRIVATE_LIBGCC=y
> >
> >


Shall I send a patch to enable CONFIG_USE_PRIVATE_LIBGCC ?


Best Regards
Masahiro Yamada

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

* [U-Boot] Recommended MIPS toolchain
  2014-09-08  9:29         ` Masahiro Yamada
@ 2014-09-08  9:40           ` Vasili Galka
  2014-09-08 10:30           ` Daniel Schwierzeck
  1 sibling, 0 replies; 8+ messages in thread
From: Vasili Galka @ 2014-09-08  9:40 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On Mon, Sep 8, 2014 at 12:29 PM, Masahiro Yamada <yamada.m@jp.panasonic.com>
wrote:

> Hi Daniel, Vasili,
>
>
> > >
> > > sorry if I was not accurate enough but with introduction of Kbuild
> > > "USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
> > > To support different U-Boot versions you should set both variants:
> > >
> > > export USE_PRIVATE_LIBGCC=yes
> > > export CONFIG_USE_PRIVATE_LIBGCC=y
> > >
> > >
>
>
> Shall I send a patch to enable CONFIG_USE_PRIVATE_LIBGCC ?
>
>
> Best Regards
> Masahiro Yamada
>
>
That probably depends on the percentage of toolchains that require this
flag to be set. I only tried one and it does require it. I believe Daniel
can provide more statistics.

Regards,
Vasili

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

* [U-Boot] Recommended MIPS toolchain
  2014-09-08  9:29         ` Masahiro Yamada
  2014-09-08  9:40           ` Vasili Galka
@ 2014-09-08 10:30           ` Daniel Schwierzeck
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Schwierzeck @ 2014-09-08 10:30 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On 08.09.2014 11:29, Masahiro Yamada wrote:
> Hi Daniel, Vasili,
> 
> 
>>>
>>> sorry if I was not accurate enough but with introduction of Kbuild
>>> "USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
>>> To support different U-Boot versions you should set both variants:
>>>
>>> export USE_PRIVATE_LIBGCC=yes
>>> export CONFIG_USE_PRIVATE_LIBGCC=y
>>>
>>>
> 
> 
> Shall I send a patch to enable CONFIG_USE_PRIVATE_LIBGCC ?
> 

I'm not sure. That would change the behaviour of MIPS in relation to
other architectures. I think we need a common solution for all
architectures which always use a private libgcc like the kernel does.

-- 
- Daniel

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

end of thread, other threads:[~2014-09-08 10:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20  9:35 [U-Boot] Recommended MIPS toolchain Vasili Galka
2014-08-20 10:23 ` Daniel Schwierzeck
2014-08-20 11:50   ` Vasili Galka
2014-08-20 12:20     ` Daniel Schwierzeck
2014-08-20 12:31       ` Vasili Galka
2014-09-08  9:29         ` Masahiro Yamada
2014-09-08  9:40           ` Vasili Galka
2014-09-08 10:30           ` Daniel Schwierzeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.