Table of Contents

GCC support for Xtensa

Compiler build for full testing

gcc testsuite requires libc, so the easiest way is the following:

Compiler build for debug

../gcc/configure \
    --prefix=`pwd`/root --target=$TARGET \
    --disable-libssp --disable-libisl --enable-languages=c,c++ \
    --enable-debug --enable-valgrind-annotations --disable-docs \
    --enable-checking=all \
    CFLAGS='-O0 -g3' CXXFLAGS='-O0 -g3'
    
make -j8 all-gcc
make -j8 install-gcc

For –enable-valgrind-annotations to work valgrind must be installed.

To use ASAN add the following to configure:

../gcc/configure \
    ... \
    --with-stage1-libs="-lstdc++ -ldl" \
    CXXFLAGS=-fsanitize=address \
    LDFLAGS=-fsanitize=address \
    ...

and have

ASAN_OPTIONS='detect_leaks=0'

in the environment when building.

See also