GCC cross compilation help: [cannot compute suffix of object files]

2011-06-22 Thread mins . lin
Hello,
I tried to build the gcc-linaro cross compiler tool on the x86_64 
ubuntu-10.04 machine.
The build and host machine is the x86_64 ubuntu-10.04, the target 
is arm-eabi.
But failed and got the following error messages:
-
checking host system type... arm-unknown-eabi
checking for arm-eabi-ar... arm-eabi-ar
checking for arm-eabi-lipo... arm-eabi-lipo
checking for arm-eabi-nm... /home/minslin/ET0001A/build-gcc/./gcc/nm
checking for arm-eabi-ranlib... arm-eabi-ranlib
checking for arm-eabi-strip... arm-eabi-strip
checking whether ln -s works... yes
checking for arm-eabi-gcc... /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include
checking for suffix of object files... configure: error: in 
`/home/minslin/ET0001A/build-gcc/arm-eabi/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/minslin/ET0001A/build-gcc'
make: *** [all] Error 2
-

The configure options I used were:
-
../gcc-linaro-4.5-2011.06-0/configure --target=arm-eabi 
--enable-languages=c,c++ --enable-shared --prefix=/home/minslin/linaro-gcc 
--with-gmp=/home/minslin/gmp --with-mpfr=/home/minslin/mpfr 
--with-mpc=/home/minslin/mpc
-

I downloaded and built the GMP, MPFR and MPC packages. The 
versions I used are:
gmp-5.0.2
mpfr-3.0.1
mpc-0.8.2

Please help me solving this problem.
Thanks.

Best regards,

Min-Shong Lin (林敏雄)
Engineering Division
Global UniChip Corp. (創意電子)
EMAIL : mins@globalunichip.com
TEL  : +886-3-5646600 ext. 6937

- Email Confidentiality Notice 
--
If you are not the intended recipient for this CONFIDENTIAL E-mail, please 
delete it immediately without keeping or distributing any copy and notify 
the sender.
--
___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


Re: GCC cross compilation help: [cannot compute suffix of object files]

2011-06-23 Thread mins . lin
Hi Andrew,
Before, I thought there is only one config.log under the root 
path.
I have solved this error: gmp, mpfr, mpc library path should be 
added to LD_LIBRARY_PATH.

This time, I am stuck with the following messages.
Please help.
Thanks.
--
minslin

---
checking if /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-includesupports -c -o file.o... 
(cached) yes
checking whether the /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-includelinker 
(/home/minslin/ET0001A/build-gcc/./gcc/collect-ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed 
after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/minslin/ET0001A/build-gcc'
make: *** [all] Error 2


Some snippet of the arm-eabi/libgcc/config.log below
--
configure:3377: checking for /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-includeoption to accept ISO C89
configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include -c -g -O2  conftest.c 
>&5
conftest.c:10:19: fatal error: stdio.h: No such file or directory
compilation terminated.
configure:3441: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
--
configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include-qlanglvl=extc89 -c -g 
-O2  conftest.c >&5
xgcc: unrecognized option '-qlanglvl=extc89'
conftest.c:10:19: fatal error: stdio.h: No such file or directory
compilation terminated.
configure:3441: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
--
configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include-qlanglvl=ansi -c -g -O2 
conftest.c >&5
xgcc: unrecognized option '-qlanglvl=ansi'
conftest.c:10:19: fatal error: stdio.h: No such file or directory
compilation terminated.
configure:3441: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
--
configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include-std -c -g -O2 conftest.c 
>&5
cc1: error: unrecognized command line option "-std"
configure:3441: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
--
configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include-Ae -c -g -O2  conftest.c 
>&5
:0:1: error: missing '(' after predicate
conftest.c:10:19: fatal error: stdio.h: No such file or directory
compilation terminated.
configure:3441: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
--
configure:3524: /

Re: GCC cross compilation help: [cannot compute suffix of object files]

2011-06-26 Thread mins . lin
Hi Bernhard,
I applied this patch, but still got the same error.
Did I miss anything else ?
My configure options are:
-
../gcc-linaro-4.5-2011.06-0/configure --target=arm-eabi 
--enable-languages=c,c++ --with-mode=thumb --with-arch=armv7-a 
--with-tune=cortex-a9 --with-fpu=neon --with-float=softfp 
--with-gmp=/home/minslin/gmp --with-mpfr=/home/minslin/mpfr 
--with-mpc=/home/minslin/mpc --with-binutils=/home/minslin/arm-binutils 
--prefix=/home/minslin/linaro-gcc
-

Thanks.
--
minslin




From:   Bernhard Rosenkranzer 
To: mins@globalunichip.com
Cc: Andrew Stubbs , 
linaro-toolchain@lists.linaro.org
Date:   2011/06/24 20:53
Subject:Re: GCC cross compilation help: [cannot compute suffix of 
object files]



Hi,
I've run into this a couple of years ago, and worked around it with
the attached patch.
Chances are the patch (or a slight variation of it) will still work.

ttyl
bero

2011/6/24  :
> Hi Andrew,
> Before, I thought there is only one config.log under the root 
path.
> I have solved this error: gmp, mpfr, mpc library path should be
> added to LD_LIBRARY_PATH.
>
> This time, I am stuck with the following messages.
> Please help.
> Thanks.
> --
> minslin
>
> ---
> checking if /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-includesupports -c -o 
file.o...
> (cached) yes
> checking whether the /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-includelinker
> (/home/minslin/ET0001A/build-gcc/./gcc/collect-ld) supports shared
> libraries... yes
> checking whether -lc should be explicitly linked in... yes
> checking dynamic linker characteristics... no
> checking how to hardcode library paths into programs... immediate
> checking for shl_load... configure: error: Link tests are not allowed 
after
> GCC_NO_EXECUTABLES.
> make[1]: *** [configure-target-libstdc++-v3] Error 1
> make[1]: Leaving directory `/home/minslin/ET0001A/build-gcc'
> make: *** [all] Error 2
> 
>
> Some snippet of the arm-eabi/libgcc/config.log below
> --
> configure:3377: checking for /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-includeoption to accept ISO 
C89
> configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-include -c -g -O2  conftest.c 
>&5
> conftest.c:10:19: fatal error: stdio.h: No such file or directory
> compilation terminated.
> configure:3441: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> --
> configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-include-qlanglvl=extc89 -c -g 
-O2
>  conftest.c >&5
> xgcc: unrecognized option '-qlanglvl=extc89'
> conftest.c:10:19: fatal error: stdio.h: No such file or directory
> compilation terminated.
> configure:3441: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> --
> configure:3441: /home/minslin/ET0001A/build-gcc/./gcc/xgcc
> -B/home/minslin/ET0001A/build-gcc/./gcc/
> -B/home/minslin/linaro-gcc/arm-eabi/bin/
> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
> /home/minslin/linaro-gcc/arm-eabi/include -isystem
> /home/minslin/linaro-gcc/arm-eabi/sys-include-qlanglvl=ansi -c -g 
-O2
>  conftest.c >&5
> xgcc: unrecognized option '-qlanglvl=ansi'
> conftest.c:10:19: fatal error: stdio.h: No such file or directory
> compilation terminated.
> configure:3441: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> | #define PACKAGE_VERSION "1.0"
> | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
> | #define PACKAGE_BUGREPORT ""
> --
> configure:3441: /home/min

Re: GCC cross compilation help: [cannot compute suffix of object files]

2011-06-27 Thread mins . lin
Hello,
It succeeded!  Thanks~
But another obstacle:
-
checking for arm-eabi-gcc... /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include
checking whether the C compiler works... no
configure: error: in 
`/home/minslin/ET0001A/build-gcc/arm-eabi/libstdc++-v3':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/minslin/ET0001A/build-gcc'
make: *** [all] Error 2
--


arm-eabi/libstdc++-v3/config.log
---
configure:3743: checking whether the C compiler works
configure:3765: /home/minslin/ET0001A/build-gcc/./gcc/xgcc 
-B/home/minslin/ET0001A/build-gcc/./gcc/ 
-B/home/minslin/linaro-gcc/arm-eabi/bin/ 
-B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem 
/home/minslin/linaro-gcc/arm-eabi/include -isystem 
/home/minslin/linaro-gcc/arm-eabi/sys-include-g -O2   conftest.c  >&5
/home/minslin/arm-binutils/bin/arm-eabi-ld: cannot find crt0.o: No such 
file or directory
/home/minslin/arm-binutils/bin/arm-eabi-ld: cannot find -lg
/home/minslin/arm-binutils/bin/arm-eabi-ld: cannot find -lc
collect2: ld returned 1 exit status
configure:3769: $? = 1
configure:3807: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3812: error: in 
`/home/minslin/ET0001A/build-gcc/arm-eabi/libstdc++-v3':
configure:3816: error: C compiler cannot create executables
See `config.log' for more details.
---



--
minslin





From:   Bernhard Rosenkranzer 
To: mins@globalunichip.com
Cc: Andrew Stubbs , 
linaro-toolchain@lists.linaro.org
Date:   2011/06/27 15:01
Subject:Re: GCC cross compilation help: [cannot compute suffix of 
object files]



Hi,
you may have to regenerate the configure scripts -- the patch touches
a file that is only used during configure script generation.
Try running
aclocal -I config
autoconf
in libstdc++-v3 after applying the patch.

ttyl
bero

2011/6/27  :
> Hi Bernhard,
> I applied this patch, but still got the same error.
> Did I miss anything else ?
> My configure options are:
> -
> ../gcc-linaro-4.5-2011.06-0/configure --target=arm-eabi
> --enable-languages=c,c++ --with-mode=thumb --with-arch=armv7-a
> --with-tune=cortex-a9 --with-fpu=neon --with-float=softfp
> --with-gmp=/home/minslin/gmp --with-mpfr=/home/minslin/mpfr
> --with-mpc=/home/minslin/mpc --with-binutils=/home/minslin/arm-binutils
> --prefix=/home/minslin/linaro-gcc
> -
>
> Thanks.
> --
> minslin
>
>
>
>
> From:Bernhard Rosenkranzer 
> To:mins@globalunichip.com
> Cc:Andrew Stubbs ,
> linaro-toolchain@lists.linaro.org
> Date:2011/06/24 20:53
> Subject:Re: GCC cross compilation help: [cannot compute suffix 
of
> object files]
> 
>
>
> Hi,
> I've run into this a couple of years ago, and worked around it with
> the attached patch.
> Chances are the patch (or a slight variation of it) will still work.
>
> ttyl
> bero
>
> 2011/6/24  :
>> Hi Andrew,
>> Before, I thought there is only one config.log under the root
>> path.
>> I have solved this error: gmp, mpfr, mpc library path should be
>> added to LD_LIBRARY_PATH.
>>
>> This time, I am stuck with the following messages.
>> Please help.
>> Thanks.
>> --
>> minslin
>>
>> ---
>> checking if /home/minslin/ET0001A/build-gcc/./gcc/xgcc
>> -B/home/minslin/ET0001A/build-gcc/./gcc/
>> -B/home/minslin/linaro-gcc/arm-eabi/bin/
>> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
>> /home/minslin/linaro-gcc/arm-eabi/include -isystem
>> /home/minslin/linaro-gcc/arm-eabi/sys-includesupports -c -o 
file.o...
>> (cached) yes
>> checking whether the /home/minslin/ET0001A/build-gcc/./gcc/xgcc
>> -B/home/minslin/ET0001A/build-gcc/./gcc/
>> -B/home/minslin/linaro-gcc/arm-eabi/bin/
>> -B/home/minslin/linaro-gcc/arm-eabi/lib/ -isystem
>> /home/minslin/linaro-gcc/arm-eabi/include -isystem
>> /home/minslin/linaro-gcc/arm-eabi/sys-includelinker
>> (/home/minslin/ET0001A/build-gcc/./gcc/collect-ld) supports shared
>> libraries... yes
>> checking whether -lc should be explicitly linked in... yes
>> checking dynamic linker characteristics... no
>> checking how to hardcode library paths into programs... immediate
>> checking for shl_load... configure: error: Link tests are not allowed
>> after
>> GCC_NO_EXECUTABLES.
>> make[1

Error: selected processor does not support requested special purpose register

2011-07-06 Thread mins . lin
Hi,
I used Linaro cross-toolchain version 4.5 
(gcc-4.5-arm-linux-gnueabi) to compile linux-linaro-11.05 for beagle 
board,
but got the following error messages:


  AS  arch/arm/boot/compressed/head.o
arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:127: Error: selected processor does not 
support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:134: Error: selected processor does not 
support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:136: Error: selected processor does not 
support requested special purpose register -- `msr cpsr_c,r2'
make[2]: *** [arch/arm/boot/compressed/head.o] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2


The .config file I used for kernel build is 
"config-2.6.38-1003-linaro-omap" which is from 
hwpack_linaro-omap3-x11-base_20110526-5_armel_supported.tar.gz
My host development platform is 64-bit Ubuntu 10.04.2 LTS (Linux 
ubuntu 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 
x86_64 GNU/Linux).

Is this a known bug, or did I miss anything else ?

Thanks.

- Email Confidentiality Notice 
--
If you are not the intended recipient for this CONFIDENTIAL E-mail, please 
delete it immediately without keeping or distributing any copy and notify 
the sender.
--___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain