Hi, I was building last release and I got the following error trying to build from source. The parameters used are the followings:
# ../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c\+\+,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:6.3.1\+svn251940-1 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc\+\+-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=rmprofile "CFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." "CPPFLAGS=-Wdate-time" "CXXFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." "FCFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." "FFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." "GCJFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." LDFLAGS=-Wl,-z,relro "OBJCFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." "OBJCXXFLAGS=-g -O2 -fdebug-prefix-map=$PWD/gcc-arm-none-eabi-6.3.1+svn251940=." INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
I think the most relevant parameter is `--without-newlib`, but I'm not completely sure because I didn't try building without this parameter. I looked at the recipe `build-toolchain.sh` and as far I can see the only parameter different is this. The error that I get:
/<<BUILDDIR>>/gcc-arm-none-eabi-6.3.1+svn251940/build/./gcc/xgcc -B/<<BUILDDIR>>/gcc-arm-none-eabi-6.3.1+svn251940/build/./gcc/ -B/usr/lib/arm-none-eabi/bin/ -B/usr/lib/arm-none-eabi/lib/ -isystem /usr/lib/arm-none-eabi/include -isystem /usr/lib/arm-none-eabi/sys-include -g -O2 -mthumb -march=armv8-m.base -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fno-inline -I. -I. -I../../../.././gcc -I../../../../../src/libgcc -I../../../../../src/libgcc/. -I../../../../../src/libgcc/../gcc -I../../../../../src/libgcc/../include -o _thumb1_case_sqi.o -MT _thumb1_case_sqi.o -MD -MP -MF _thumb1_case_sqi.dep -DL_thumb1_case_sqi -xassembler-with-cpp -c ../../../../../src/libgcc/config/arm/lib1funcs.S -include _thumb1_case_sqi.vis
In file included from /<<BUILDDIR>>/gcc-arm-none-eabi-6.3.1+svn251940/build/gcc/include/arm_cmse.h:38:0,
from ../../../../../src/libgcc/config/arm/cmse.c:27:
/<<BUILDDIR>>/gcc-arm-none-eabi-6.3.1+svn251940/build/gcc/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
^
compilation terminated.
../../../../../src/libgcc/config/arm/t-arm:14: recipe for target 'cmse.o' failed
make[6]: *** [cmse.o] Error 1
Applying the patch attached, it builds ok. So my best guess is that something is missing when you added support for armv8 and it is mandatory to build with newlib.
>Applying the patch attached, it builds ok. So my best guess is that something is missing when you added support for armv8 and it is mandatory to build with newlib.
I shouldn't be. Thanks for your fix. I think a more appropriate fix is to remove standard headers' dependency from arm_cmse.h which will enable gcc and its runtime to build --with-headers=no and --without-newlib.