From 8d3554499710e4afc9d89c4466e16fb58aaa159b Mon Sep 17 00:00:00 2001 From: wu-leilei Date: Fri, 3 Mar 2023 11:05:09 +0800 Subject: [PATCH] Add the compilation option pie (cherry picked from commit 9a46813daceb7133555a8a72527479c863d63af8) --- byaccj.spec | 6 +++++- fix-add-the-compilation-option-pie.patch | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 fix-add-the-compilation-option-pie.patch diff --git a/byaccj.spec b/byaccj.spec index 891f507..488f092 100644 --- a/byaccj.spec +++ b/byaccj.spec @@ -1,10 +1,11 @@ Name: byaccj Version: 1.15 -Release: 20 +Release: 21 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 BuildRequires: make gdb-headless gcc @@ -44,6 +45,9 @@ install -p -m 755 src/yacc %{buildroot}%{_bindir}/%{name} %doc docs/* src/README %changelog +* Fri Mar 03 2023 wulei - 1.15-21 +- Add the compilation option pie + * Mon May 31 2021 baizhonggui - 1.15-20 - Fix building error: cc: No such file or directory - Add gcc in BuildRequires diff --git a/fix-add-the-compilation-option-pie.patch b/fix-add-the-compilation-option-pie.patch new file mode 100644 index 0000000..341deeb --- /dev/null +++ b/fix-add-the-compilation-option-pie.patch @@ -0,0 +1,12 @@ +diff -Nur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2008-11-24 16:41:02.000000000 +0800 ++++ b/src/Makefile 2023-03-03 10:48:20.373307674 +0800 +@@ -75,7 +75,7 @@ + $(CC) -c $(CFLAGS) $(INC) $< -o $@ + + yacc: $(OBJ) +- $(CC) -o yacc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 $(OBJ) ++ $(CC) -o yacc -fPIE -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 $(OBJ) + @echo "done" + + clean: -- Gitee