From ae9c4ab0a24f6c35748e5134688b0ed06e6d2046 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Mon, 9 Sep 2024 03:31:06 +0000 Subject: [PATCH 1/2] [elfutils] pass -Wno-error properly It fixes a bug where -Wno-error was passed along with CXX, which in turn led to `-Wno-error $CXX` being run instead of just `$CXX`. elfutils still fails to compile when libarchive is present but it doesn't affect OSS-Fuzz builds: https://sourceware.org/bugzilla/show_bug.cgi?id=32155. (It regressed in https://sourceware.org/git/?p=elfutils.git;a=commit;h=b9fd1dda0ba6ddf7dd14ff6745ea3e884a2f553a) --- projects/elfutils/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/elfutils/build.sh b/projects/elfutils/build.sh index 6ff268f2e5a6..a06671482bed 100755 --- a/projects/elfutils/build.sh +++ b/projects/elfutils/build.sh @@ -81,7 +81,7 @@ fi autoreconf -i -f if ! ./configure --enable-maintainer-mode --disable-debuginfod --disable-libdebuginfod \ --disable-demangler --without-bzlib --without-lzma --without-zstd \ - CC="$CC" CFLAGS="-Wno-error $CFLAGS" CXX="-Wno-error $CXX" CXXFLAGS="$CXXFLAGS" LDFLAGS="$CFLAGS"; then + CC="$CC" CFLAGS="-Wno-error $CFLAGS" CXX="$CXX" CXXFLAGS="-Wno-error $CXXFLAGS" LDFLAGS="$CFLAGS"; then cat config.log exit 1 fi From b91f89e69bc35a98735a22317001a7018d999f8f Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Mon, 9 Sep 2024 05:54:59 +0000 Subject: [PATCH 2/2] [elfutils] link fuzz-dwfl-core with libeu Fixes https://oss-fuzz-build-logs.storage.googleapis.com/log-dbd59f4a-34f9-417e-ad2f-55ddd4995c79.txt It's a follow-up to https://sourceware.org/git/?p=elfutils.git;a=commit;h=d6443d1a4df6057f9012d105037f52daaca911f1 --- projects/elfutils/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/elfutils/build.sh b/projects/elfutils/build.sh index a06671482bed..acd90c0f6d91 100755 --- a/projects/elfutils/build.sh +++ b/projects/elfutils/build.sh @@ -124,7 +124,7 @@ $CC $CFLAGS \ -I. -I./lib -I./libelf -I./libebl -I./libdw -I./libdwelf -I./libdwfl -I./libasm \ -c "$SRC/fuzz-dwfl-core.c" -o fuzz-dwfl-core.o $CXX $CXXFLAGS $LIB_FUZZING_ENGINE fuzz-dwfl-core.o \ - ./libdw/libdw.a ./libelf/libelf.a "$zlib" \ + ./libdw/libdw.a ./libelf/libelf.a ./lib/libeu.a "$zlib" \ -o "$OUT/fuzz-dwfl-core" $CC $CFLAGS \