mirror of https://github.com/google/oss-fuzz.git
[bind9] Adjust the Dockerfile and build.sh for main branch (#4309)
This commit is contained in:
parent
014e070f99
commit
70abe8f33c
|
@ -29,6 +29,6 @@ RUN apt-get -y install \
|
||||||
libuv1-dev \
|
libuv1-dev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
zip
|
zip
|
||||||
RUN git clone --depth 1 --branch ondrej/oss-fuzz https://gitlab.isc.org/isc-projects/bind9.git
|
RUN git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9.git
|
||||||
WORKDIR bind9
|
WORKDIR bind9
|
||||||
COPY build.sh $SRC/
|
COPY build.sh $SRC/
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
|
|
||||||
# build the project
|
# build the project
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
./configure --disable-shared --enable-static --enable-developer --without-cmocka --without-zlib --disable-linux-caps --prefix="$WORK"
|
./configure --disable-shared --enable-static --enable-developer --without-cmocka --without-zlib --disable-linux-caps --prefix="$WORK" --enable-fuzzing=ossfuzz
|
||||||
make -j"$(nproc)" all
|
make -j"$(nproc)" all
|
||||||
|
(cd fuzz && TESTS='' make -e -j"$(nproc)" check)
|
||||||
|
|
||||||
LIBISC_CFLAGS="-Ilib/isc/unix/include -Ilib/isc/pthreads/include -Ilib/isc/include"
|
LIBISC_CFLAGS="-Ilib/isc/unix/include -Ilib/isc/pthreads/include -Ilib/isc/include"
|
||||||
LIBDNS_CFLAGS="-Ilib/dns/include"
|
LIBDNS_CFLAGS="-Ilib/dns/include"
|
||||||
|
@ -28,7 +29,7 @@ LIBDNS_LIBS="lib/dns/.libs/libdns.a -Wl,-Bstatic -lcrypto -Wl,-Bdynamic"
|
||||||
for fuzzer in fuzz/*.c; do
|
for fuzzer in fuzz/*.c; do
|
||||||
output=$(basename "${fuzzer%.c}")
|
output=$(basename "${fuzzer%.c}")
|
||||||
[ "$output" = "main" ] && continue
|
[ "$output" = "main" ] && continue
|
||||||
(cd fuzz && make "${output}.o")
|
# We need to try little bit harder to link everything statically
|
||||||
${CXX} ${CXXFLAGS} \
|
${CXX} ${CXXFLAGS} \
|
||||||
-o "${OUT}/${output}_fuzzer" \
|
-o "${OUT}/${output}_fuzzer" \
|
||||||
"fuzz/${output}.o" \
|
"fuzz/${output}.o" \
|
||||||
|
|
Loading…
Reference in New Issue