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 <bernhard.rosenkranzer@linaro.org>
To:        mins.lin@globalunichip.com
Cc:        Andrew Stubbs <andrew.stubbs@linaro.org>, 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  <mins.lin@globalunichip.com>:
> 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 <bernhard.rosenkranzer@linaro.org>
> To:        mins.lin@globalunichip.com
> Cc:        Andrew Stubbs <andrew.stubbs@linaro.org>,
> 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  <mins.lin@globalunichip.com>:
>> 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-include    supports -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-include    linker
>> (/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-include    option 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
>> <command-line>: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: /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    -E  conftest.c
>> conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
>> compilation terminated.
>> configure:3524: $? = 1
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME "GNU C Runtime Library"
>> | #define PACKAGE_TARNAME "libgcc"
>> --------------
>>
>>
>>
>>
>>
>>
>>
>>
>> From:        Andrew Stubbs <andrew.stubbs@linaro.org>
>> To:        mins.lin@globalunichip.com
>> Cc:        linaro-toolchain@lists.linaro.org
>> Date:        2011/06/22 20:42
>> Subject:        Re: GCC cross compilation help: [cannot compute suffix of
>> object files]
>> ________________________________
>>
>>
>> You need to see config.log for more details. There'll be more than one
>> config.log, but probably only one will have this error message. Grep for
>> it.
>>
>> Once you have the relevant log snippet, we might be able to help you
>> decipher it.
>>
>> Andrew
>>
>> On 22/06/11 10:23, mins.lin@globalunichip.com wrote:
>>> 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.lin@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
>>
>>
>>
>> --------------------------------- 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
>>
>>
> [attachment "crosscompile-libstdc++.patch" deleted by
> mins.lin/Globalunichip]
>
> --------------------------------- 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.
> ----------------------------------------------------------------------------------------------------------------------


--------------------------------- 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.
----------------------------------------------------------------------------------------------------------------------