aboutsummaryrefslogtreecommitdiff
path: root/projects/qpid-proton
diff options
context:
space:
mode:
authorJiří Daněk <jdanek@redhat.com>2018-07-12 19:11:50 +0200
committerAbhishek Arya <inferno@chromium.org>2018-07-12 10:11:50 -0700
commitb3e75a11432e34622fcc23d30eeccae621cd8d85 (patch)
tree51e79a7a81c7689983440969404b2bc57c22eb95 /projects/qpid-proton
parentc25212663d8b5dcbffc171ef8a1f10e0b3439793 (diff)
downloadoss-fuzz-b3e75a11432e34622fcc23d30eeccae621cd8d85.tar.gz
[qpid-proton] fix patch after changes to upstream build (#1610)
This is a temporary workaround until I can get * https://github.com/apache/qpid-proton/pull/143 * and https://github.com/apache/qpid-proton/pull/146 reviewed and merged in upstream. After that, no patches should be necessary.
Diffstat (limited to 'projects/qpid-proton')
-rw-r--r--projects/qpid-proton/Dockerfile1
-rwxr-xr-xprojects/qpid-proton/build.sh5
-rw-r--r--projects/qpid-proton/c_CMakeLists.patch13
-rw-r--r--projects/qpid-proton/c_tests_fuzz_CMakeLists.patch14
4 files changed, 13 insertions, 20 deletions
diff --git a/projects/qpid-proton/Dockerfile b/projects/qpid-proton/Dockerfile
index 0c2e6eada..37f5e306c 100644
--- a/projects/qpid-proton/Dockerfile
+++ b/projects/qpid-proton/Dockerfile
@@ -25,4 +25,3 @@ RUN git clone git://git.apache.org/qpid-proton.git
WORKDIR qpid-proton
COPY build.sh $SRC/
COPY c_tests_fuzz_CMakeLists.patch $SRC/
-COPY c_CMakeLists.patch $SRC/
diff --git a/projects/qpid-proton/build.sh b/projects/qpid-proton/build.sh
index ba7e1ff98..62e51e4b6 100755
--- a/projects/qpid-proton/build.sh
+++ b/projects/qpid-proton/build.sh
@@ -15,11 +15,10 @@
#
################################################################################
-patch -p1 < $SRC/c_tests_fuzz_CMakeLists.patch
-patch -p1 < $SRC/c_CMakeLists.patch
+patch -p1 < $SRC/c_tests_fuzz_CMakeLists.patch || (cat c/tests/fuzz/CMakeLists.txt.rej && false)
mkdir build
pushd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_FUZZ_TESTING=ON -DFUZZ_REGRESSION_TESTS=OFF
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIBS=ON -DENABLE_FUZZ_TESTING=ON -DFUZZ_REGRESSION_TESTS=OFF
pushd c/tests/fuzz/
make -j $(nproc)
popd
diff --git a/projects/qpid-proton/c_CMakeLists.patch b/projects/qpid-proton/c_CMakeLists.patch
deleted file mode 100644
index 5b186de4f..000000000
--- a/projects/qpid-proton/c_CMakeLists.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
-index 40b50374..2247e0f1 100644
---- a/c/CMakeLists.txt
-+++ b/c/CMakeLists.txt
-@@ -539,7 +539,7 @@ if (BUILD_WITH_CXX)
- endif (BUILD_WITH_CXX)
-
- add_library (
-- qpid-proton-core SHARED
-+ qpid-proton-core STATIC
- ${qpid-proton-core}
- ${qpid-proton-layers}
- ${qpid-proton-platform}
diff --git a/projects/qpid-proton/c_tests_fuzz_CMakeLists.patch b/projects/qpid-proton/c_tests_fuzz_CMakeLists.patch
index 140789b32..759ed9dcf 100644
--- a/projects/qpid-proton/c_tests_fuzz_CMakeLists.patch
+++ b/projects/qpid-proton/c_tests_fuzz_CMakeLists.patch
@@ -1,11 +1,19 @@
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
-index f870d617..054ec6d6 100644
+index f870d617..c9d46168 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
-@@ -33,6 +33,8 @@ add_library (StandaloneFuzzTargetMain STATIC StandaloneFuzzTargetMain.c Standalo
+@@ -32,7 +32,15 @@ add_library (StandaloneFuzzTargetMain STATIC StandaloneFuzzTargetMain.c Standalo
+
macro (pn_add_fuzz_test test)
add_executable (${test} ${ARGN})
- target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
+- target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
++ # prefer static lib for the fuzzer, if available
++ if (BUILD_STATIC_LIBS)
++ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core-static)
++ else()
++ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core)
++ endif()
++ target_link_libraries (${test} ${FUZZING_QPID_PROTON_CORE_LIBRARY} ${FUZZING_LIBRARY})
+ # -lFuzzingEngine is a C++ library, which needs c++ std lib
+ set_target_properties(${test} PROPERTIES LINKER_LANGUAGE CXX)