mirror of https://github.com/google/oss-fuzz.git
42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
|
#!/bin/bash -eu
|
||
|
# Copyright 2021 Google LLC
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
#
|
||
|
################################################################################
|
||
|
|
||
|
unset CPP
|
||
|
unset CXX
|
||
|
|
||
|
# Download apr and place in httpd srclib folder. Apr-2.0 includes apr-utils
|
||
|
svn checkout https://svn.apache.org/repos/asf/apr/apr/trunk/ srclib/apr
|
||
|
|
||
|
# Build httpd
|
||
|
./buildconf
|
||
|
./configure --with-included-apr --enable-pool-debug
|
||
|
make
|
||
|
|
||
|
# Build the fuzzers
|
||
|
for fuzzname in utils parse tokenize addr_parse; do
|
||
|
$CC $CFLAGS $LIB_FUZZING_ENGINE -I./include -I./os/unix -I./srclib/apr/include -I./srclib/apr-util/include/ \
|
||
|
$SRC/fuzz_${fuzzname}.c -o $OUT/fuzz_${fuzzname} \
|
||
|
./modules.o buildmark.o \
|
||
|
-Wl,--start-group ./server/.libs/libmain.a \
|
||
|
./modules/core/.libs/libmod_so.a \
|
||
|
./modules/http/.libs/libmod_http.a \
|
||
|
./server/mpm/event/.libs/libevent.a \
|
||
|
./os/unix/.libs/libos.a \
|
||
|
./srclib/apr/.libs/libapr-2.a \
|
||
|
-Wl,--end-group -luuid -lpcre -lcrypt
|
||
|
done
|