mkdir "cc-$dirname"
cd "cc-$dirname"
conf_cflags="$cflags -funwind-tables -fPIC"
- %{?asan: conf_cflags="$conf_cflags -DASAN_INIT_FIRST "}
+ %{?asan: conf_cflags="$conf_cflags -DASAN_INIT_FIRST"}
profile="--disable-profile"
%if %{build_profile}
unset CXXFLAGS
unset CFLAGS
unset LDFLAGS
+%ifarch %arm
+ # Glibc must have both functions' implementations
+ CPPFLAGS="-U_LARGEFILE_SOURCE -U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS"
+%endif
+
#chmod +x $HERE/asan-glibc-gcc-wrapper.py
#build static wrapper, because we don't want asan to intercept allocators
g++ -o gcc-wrapper gcc-wrapper.cc -O3 -funroll-loops -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions -static
mkdir -p $ASAN_BUILD
cd $ASAN_BUILD
# CC=$HERE/asan-glibc-gcc-wrapper.py $GLIBC/configure $configure_flags
+ CPPFLAGS=$CPPFLAGS \
CC=$HERE/gcc-wrapper $GLIBC/configure $configure_flags
# Quick build - builds only libraries, but does not create symlinks.