[infra] using LDFLAGS with static library linkage

This commit is contained in:
Mike Aizatsky 2016-08-05 16:29:38 -07:00
parent d0e1f06107
commit 255a2c63b4
4 changed files with 7 additions and 10 deletions

View File

@ -36,7 +36,7 @@ find . -name "*.a"
for F in $fuzzerFiles; do
fuzzerName=$(basename $F .cc)
echo "Building fuzzer $fuzzerName"
$CXX $CXXFLAGS $LDFLAGS -std=c++11 -o /out/openssl_${fuzzerName} /work/libfuzzer/*.o $F \
-I /src/boringssl/include ./ssl/libssl.a ./crypto/libcrypto.a
$CXX $CXXFLAGS-std=c++11 -o /out/openssl_${fuzzerName} /work/libfuzzer/*.o $F \
-I /src/boringssl/include ./ssl/libssl.a ./crypto/libcrypto.a $LDFLAGS
done

View File

@ -7,6 +7,6 @@ cd /src/expat/expat
./configure
make clean all
$CXX $CXXFLAGS $LDFLAGS -std=c++11 -Ilib/ \
$CXX $CXXFLAGS -std=c++11 -Ilib/ \
/src/oss-fuzz/expat/parse_fuzzer.cc -o /out/expat_parse_fuzzer \
/work/libfuzzer/*.o .libs/libexpat.a
/work/libfuzzer/*.o .libs/libexpat.a $LDFLAGS

View File

@ -23,9 +23,6 @@ cd /src/freetype2/
./configure
make
$CXX $CXXFLAGS $LDFLAGS -std=c++11 ./src/tools/ftfuzzer/ftfuzzer.cc \
$CXX $CXXFLAGS -std=c++11 ./src/tools/ftfuzzer/ftfuzzer.cc -o /out/freetype2_fuzzer \
./objs/*.o /work/libfuzzer/*.o \
-nodefaultlibs -Wl,-Bdynamic -lpthread -lrt -lm -ldl -lgcc_s -lgcc -lc \
-Wl,-Bstatic -lc++ -lc++abi \
-larchive -I./include -I. ./objs/.libs/libfreetype.a \
-o /out/freetype2_fuzzer
-larchive -I./include -I. ./objs/.libs/libfreetype.a $LDFLAGS

View File

@ -28,7 +28,7 @@ popd > /dev/null
export CFLAGS="-g $sanitizer_flags $cov_flags"
export LIBCXX_FLAGS="-stdlib=libc++"
export CXXFLAGS="$CFLAGS $LIBCXX_FLAGS "
export LDFLAGS="-lc++abi"
export LDFLAGS="-nodefaultlibs -Wl,-Bdynamic -lpthread -lrt -lm -ldl -lgcc_s -lgcc -lc -Wl,-Bstatic -lc++ -lc++abi"
echo "CC=$CC"
echo "CXX=$CXX"