diff --git a/fix-clang.patch b/fix-clang.patch new file mode 100644 index 0000000000000000000000000000000000000000..e375775289d116602e47ffab9549eddfd8e5a96f --- /dev/null +++ b/fix-clang.patch @@ -0,0 +1,12 @@ +diff -u -r openresty-1.19.3.1/bundle/LuaJIT-2.1-20201027/src/Makefile openresty-1.19.3.1/bundle/LuaJIT-2.1-20201027/src/Makefile +--- openresty-1.19.3.1/bundle/LuaJIT-2.1-20201027/src/Makefile 2020-10-27 15:30:36.000000000 +0800 ++++ openresty-1.19.3.1/bundle/LuaJIT-2.1-20201027/src/Makefile 2023-06-27 15:10:47.000000000 +0800 +@@ -27,7 +27,7 @@ + DEFAULT_CC = gcc + # + # LuaJIT builds as a native 32 or 64 bit binary by default. +-CC= $(DEFAULT_CC) ++CC ?= gcc + # + # Use this if you want to force a 32 bit build on a 64 bit multilib OS. + #CC= $(DEFAULT_CC) -m32 diff --git a/openresty-valgrind.spec b/openresty-valgrind.spec index 7bc0760b24222b251af072de4c34bc572a17ad96..a8129d719c2fa1cf4a70b481c112671ae4219b09 100644 --- a/openresty-valgrind.spec +++ b/openresty-valgrind.spec @@ -1,6 +1,6 @@ Name: openresty-valgrind Version: 1.19.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Valgrind debug version of OpenResty Group: System Environment/Daemons @@ -12,6 +12,7 @@ URL: https://openresty.org/ Source0: https://openresty.org/download/openresty-%{version}.tar.gz +Patch0: fix-clang.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -83,11 +84,12 @@ a single box. %prep %setup -q -n "openresty-%{version}" +%patch0 -p1 %build ./configure \ --prefix="%{orprefix}" \ - --with-cc='ccache gcc -fdiagnostics-color=always' \ + --with-cc="ccache $CC -fdiagnostics-color=always" \ --with-debug \ --with-cc-opt="-I%{zlib_prefix}/include -I%{pcre_prefix}/include -I%{openssl_prefix}/include -O0" \ --with-ld-opt="-L%{zlib_prefix}/lib -L%{pcre_prefix}/lib -L%{openssl_prefix}/lib -Wl,-rpath,%{zlib_prefix}/lib:%{pcre_prefix}/lib:%{openssl_prefix}/lib" \ @@ -166,5 +168,8 @@ rm -rf %{buildroot} %changelog +* Tue Jun 27 2023 yoo - 1.19.3.1-2 +- fix clang build error + * Fri Jul 23 2021 Fu Changjie 1.19.3.1-1 - Package init with openresty-valgrind 1.19.3.1