[Bug bootstrap/95122] New: Cross-compile arm32 toolchain with hard float, but Error in gcc final

chengcongxiu at huawei dot com gcc-bugzilla@gcc.gnu.org
Thu May 14 04:02:55 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95122

            Bug ID: 95122
           Summary: Cross-compile arm32 toolchain with hard float, but
                    Error in gcc final
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengcongxiu at huawei dot com
  Target Milestone: ---

Created attachment 48531
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48531&action=edit
Cross-compile arm32 toolchain with hard float, but Error in gcc final

Details of cross toolchain:

TARGET="arm-linux-gnueabihf"
HOST="$(gcc -dumpmachine)"
BUILD="$(gcc -dumpmachine)"

1、 GCC FIRST: 
CFLAGS_FOR_TARGET="${-march=armv7-a -mhard-float}"
CXXFLAGS_FOR_TARGET="${-march=armv7-a -mhardfloat}" ./configure --build=$BUILD
--host=$HOST --target=$TARGET --without-headers --with-newlib
make -j 16 && make install

this step is OK

2、GLIBC HEADER 
CC="arm-linux-gnueabihf-gcc -mhard-float"
$ROOT_TAR_SRC/$EGLIBC/configure --with-float=hard --with-fp

this step is OK

3、GCC SECOND
CFLAGS_FOR_TARGET="${-march=armv7-a -mhard-float}"
CXXFLAGS_FOR_TARGET="${-march=armv7-a -mhardfloat}" --enable-shared

this step is OK

4、GLIBC 
CC="arm-linux-gnueabihf-gcc -mhard-float"
$ROOT_TAR_SRC/$EGLIBC/configure --with-float=hard --with-fp 

this step is OK

5、GCC Final
CFLAGS_FOR_TARGET="${-march=armv7-a -mhard-float}"
CXXFLAGS_FOR_TARGET="${-march=armv7-a -mhardfloat}" --enable-shared 

compier error:the error is checking libgcc terminated。 the checking log at
File, the reason is stubs.h, but I add the option -mhard-float. How I solve
this Error?


/home/ccx/fenghuo/SDK_CPU_HCC/build/hcc_arm32le/arm32le_build_dir/hcc_arm32le/arm-linux-gnueabihf/sys-include/gnu/stubs.h:7:29:
fatal error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
                             ^
compilation terminated.


More information about the Gcc-bugs mailing list