]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
fuzzing/oss-fuzz: fix samba build script for Ubuntu 20.04
authorUri Simchoni <uri@samba.org>
Sat, 4 Sep 2021 07:30:56 +0000 (10:30 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Sep 2021 00:53:54 +0000 (00:53 +0000)
Add a linker flag to generate fuzzer binaries with an RPATH
header instead of RUNPATH.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/fuzzing/oss-fuzz/do_build.sh

index 3cd4c12546b2c57ad97dd58c9e484f66ea534eb0..b1e009a0577fd629d12512427cb843f4ba663461 100755 (executable)
@@ -77,12 +77,15 @@ esac
 # $LIB_FUZZING_ENGINE is provided by the oss-fuzz "compile" command
 #
 
+# --disable-new-dtags linker flag creates fuzzer binaries with RPATH
+# header instead of RUNPATH header. Modern linkers use RUNPATH by
+# default.
 ./configure -C --without-gettext --enable-debug --enable-developer \
             --enable-libfuzzer \
            $SANITIZER_ARG \
            --disable-warnings-as-errors \
            --abi-check-disable \
-           --fuzz-target-ldflags="$LIB_FUZZING_ENGINE" \
+           --fuzz-target-ldflags="-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \
            --nonshared-binary=ALL \
            "$@" \
            LINK_CC="$CXX"