Skip to content

Instantly share code, notes, and snippets.

@bjornharrtell
Last active November 26, 2019 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjornharrtell/4577048bf94106f5428cf784a8b4657b to your computer and use it in GitHub Desktop.
Save bjornharrtell/4577048bf94106f5428cf784a8b4657b to your computer and use it in GitHub Desktop.
gdal
CCACHE_CPP2=yes CC='ccache gcc' CXX='ccache g++' LDFLAGS='-lstdc++' ./configure --disable-all-optional-drivers --enable-driver-flatgeobuf --enable-driver-shape --enable-driver-gpkg --enable-driver-gml --enable-driver-pds --with-pg=no --with-libkml=no --without-lerc --without-libtool
CCACHE_CPP2=yes make USER_DEFS=-Werror -j4
# sanitize...
export LD_LIBRARY_PATH=/usr/lib/llvm-9/lib/clang/9.0.0/lib/linux
CFLAGS="-DMAKE_SANITIZE_HAPPY -fsanitize=undefined -fsanitize=address -fsanitize=unsigned-integer-overflow" CXXFLAGS="-DMAKE_SANITIZE_HAPPY -fsanitize=undefined -fsanitize=address -fsanitize=unsigned-integer-overflow" CCACHE_CPP2=yes LDFLAGS='-fsanitize=undefined -fsanitize=address -lstdc++' ./configure --disable-all-optional-drivers --enable-driver-flatgeobuf --enable-driver-shape --enable-driver-gpkg --enable-driver-gml --enable-driver-pds --with-pg=no --with-libkml=no --without-lerc --without-libtool --enable-debug
sed -i "s/-fsanitize=address/-fsanitize=address -shared-libasan/g" GDALmake.opt
sed -i "s/-fsanitize=unsigned-integer-overflow/-fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow/g" GDALmake.opt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment