diff --git a/gcc7.patch b/gcc7.patch new file mode 100644 index 0000000..0565362 --- /dev/null +++ b/gcc7.patch @@ -0,0 +1,23 @@ +Index: honggfuzz-0.9/Makefile +=================================================================== +--- honggfuzz-0.9.orig/Makefile ++++ honggfuzz-0.9/Makefile +@@ -24,7 +24,7 @@ + CC ?= gcc + LD = $(CC) + BIN := honggfuzz +-COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072 ++COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Wframe-larger-than=131072 + COMMON_LDFLAGS := -lm + COMMON_SRCS := $(sort $(wildcard *.c)) + CFLAGS ?= -O3 +@@ -37,8 +37,7 @@ ifeq ($(OS),Linux) + ARCH := LINUX + + ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/include \ +- -Wextra -Wno-initializer-overrides -Wno-override-init \ +- -Wno-unknown-warning-option -funroll-loops \ ++ -Wextra -Wno-override-init -funroll-loops \ + -D_FILE_OFFSET_BITS=64 + ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \ + -lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt diff --git a/honggfuzz.changes b/honggfuzz.changes index f5fe754..1f64a6b 100644 --- a/honggfuzz.changes +++ b/honggfuzz.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 29 12:12:59 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input files to make build reproducible + (boo#1041090) +- Add gcc7.patch to make it build on GCC7 in Factory + ------------------------------------------------------------------- Sat Apr 29 17:13:02 UTC 2017 - mpluskal@suse.com diff --git a/honggfuzz.spec b/honggfuzz.spec index 3b92ed4..f1b1b26 100644 --- a/honggfuzz.spec +++ b/honggfuzz.spec @@ -24,6 +24,10 @@ License: Apache-2.0 Group: Development/Tools/Other Url: https://google.github.io/honggfuzz/ Source: https://github.com/google/honggfuzz/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/google/honggfuzz/pull/144 +Patch0: reproducible.patch +# PATCH-FIX-UPSTREAM Make this package compile with gcc7 https://github.com/google/honggfuzz/issues/145 +Patch1: gcc7.patch BuildRequires: binutils-devel BuildRequires: libunwind-devel BuildRequires: zlib-devel @@ -35,6 +39,8 @@ evolutionary, feedback-driven fuzzing based on code coverage %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build export CFLAGS="%{optflags}" diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..10046df --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,36 @@ +Index: honggfuzz-0.9/Makefile +=================================================================== +--- honggfuzz-0.9.orig/Makefile ++++ honggfuzz-0.9/Makefile +@@ -26,7 +26,7 @@ LD = $(CC) + BIN := honggfuzz + COMMON_CFLAGS := -D_GNU_SOURCE -Wall -Werror -Wframe-larger-than=131072 + COMMON_LDFLAGS := -lm +-COMMON_SRCS := $(wildcard *.c) ++COMMON_SRCS := $(sort $(wildcard *.c)) + CFLAGS ?= -O3 + LDFLAGS ?= + +@@ -42,7 +42,7 @@ ifeq ($(OS),Linux) + -D_FILE_OFFSET_BITS=64 + ARCH_LDFLAGS := -L/usr/local/include -L/usr/include \ + -lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt +- ARCH_SRCS := $(wildcard linux/*.c) ++ ARCH_SRCS := $(sort $(wildcard linux/*.c)) + + ifeq ("$(wildcard /usr/include/bfd.h)","") + WARN_LIBRARY += binutils-devel +@@ -113,11 +113,11 @@ else ifeq ($(OS),Darwin) + ifeq ($(MIG_RET),1) + $(error mig failed to generate RPC code) + endif +- ARCH_SRCS := $(wildcard mac/*.c) ++ ARCH_SRCS := $(sort $(wildcard mac/*.c)) + # OS Darwin + else + ARCH := POSIX +- ARCH_SRCS := $(wildcard posix/*.c) ++ ARCH_SRCS := $(sort $(wildcard posix/*.c)) + ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/include \ + -Wextra -Wno-initializer-overrides -Wno-override-init \ + -Wno-unknown-warning-option -Wno-unknown-pragmas \