altcross.sh: disable libsanitizer to avoid build error

libsanitizer wants limits.h, which is a part of compiler. However
the compiler hasn't been installed yet, since we are building its
runtime. Disable libsanitizer to avoid the problem.

TODO: Perhaps there's a special target to build an install compiler
headers only. Figure it out and re-enable libsanitizer.
This commit is contained in:
Alexey Sheplyakov 2021-07-29 21:11:56 +04:00
parent 58d444cced
commit dfe065bd30

View File

@ -67,6 +67,17 @@ make -j$(nproc)
make -j$(nproc) install DESTDIR="$INSTALLDIR"
# gcc
# Disable libsanitizer to avoid the build failure:
#
# ../../../../../src/gcc/libsanitizer/asan/asan_linux.cpp: In function void __asan::AsanCheckIncompatibleRT():
# ../../../../../src/gcc/libsanitizer/asan/asan_linux.cpp:217:21: error: PATH_MAX was not declared in this scope
# 217 | char filename[PATH_MAX];
# | ^~~~~~~~
# ../../../../../src/gcc/libsanitizer/asan/asan_linux.cpp:218:35: error: filename was not declared in this scope; did you mean fileno?
# 218 | MemoryMappedSegment segment(filename, sizeof(filename));
# | ^~~~~~~~
# | fileno
cd "$BUILDDIR/obj_gcc"
../../src/gcc/configure \
--prefix= \
@ -76,6 +87,7 @@ cd "$BUILDDIR/obj_gcc"
--with-sysroot="$SYSROOT" \
--with-build-sysroot="$SYSROOTDIR" \
--with-gcc-major-version-only \
--disable-libsanitizer \
--disable-multilib
# compiler only