diff --git a/byaccj-c99.patch b/byaccj-c99.patch new file mode 100644 index 0000000000000000000000000000000000000000..0fd17f9edd45ee7694433e54e1d09e7792a9e2cc --- /dev/null +++ b/byaccj-c99.patch @@ -0,0 +1,17 @@ +Include for the unlink function. This avoids an implicit +function declaration, increasing C99 compatibility. + +Submitted upstream: + +diff --git a/src/main.c b/src/main.c +index 54b5e05ba3aa2946..e4deacd47a3c0d34 100755 +--- a/src/main.c ++++ b/src/main.c +@@ -4,6 +4,7 @@ + + #ifndef __WIN32__ /*rwj -- make portable*/ + #include ++#include + #else + #include + #endif diff --git a/byaccj.spec b/byaccj.spec index 488f092861dac340c90acc10904d96221f03b48a..38679f5f163705b77281fb1ed0af8f97562b4ed1 100644 --- a/byaccj.spec +++ b/byaccj.spec @@ -1,11 +1,12 @@ Name: byaccj Version: 1.15 -Release: 21 +Release: 24 Summary: BYACC/J Java extension License: Public Domain URL: http://byaccj.sourceforge.net/ Source0: http://sourceforge.net/projects/byaccj/files/byaccj/1.15/byaccj1.15_src.tar.gz Patch0: fix-add-the-compilation-option-pie.patch +Patch1: byaccj-c99.patch BuildRequires: make gdb-headless gcc @@ -32,7 +33,11 @@ sed -i -e 's|-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-versi %build cd src +%if "%{?toolchain}" == "clang" +%make_build yacc CC=clang CFLAGS="%{optflags} -Wno-error=implicit-function-declaration" +%else %make_build yacc CFLAGS="%{optflags}" +%endif %install install -d -m 755 %{buildroot}%{_bindir} @@ -45,6 +50,15 @@ install -p -m 755 src/yacc %{buildroot}%{_bindir}/%{name} %doc docs/* src/README %changelog +* Fri Aug 01 2025 liuqingtao 1.15-24 +- Ignore -Wimplicit-function-declaration error when compiling with gcc-14.3 + +* Thu Feb 20 2025 pengjian - 1.15-23 +- C99 compatibility fix + +* Mon Aug 26 2024 wangqiang - 1.15-22 +- Support build with clang + * Fri Mar 03 2023 wulei - 1.15-21 - Add the compilation option pie