fix annobin coverage (RHEL-33496)

Don't ignore unrecognized options in CFLAGS/LDFLAGS.

Resolves: RHEL-33496
This commit is contained in:
Miroslav Lichvar 2024-04-22 15:21:08 +02:00
parent eb635a538f
commit 33b8312426
2 changed files with 25 additions and 0 deletions

22
gpsd-sconsflags.patch Normal file
View File

@ -0,0 +1,22 @@
diff -up gpsd-3.25/SConscript.sconsflags gpsd-3.25/SConscript
--- gpsd-3.25/SConscript.sconsflags 2024-04-22 15:14:25.672775265 +0200
+++ gpsd-3.25/SConscript 2024-04-22 15:18:33.935960954 +0200
@@ -619,12 +619,15 @@ for i in ["ARFLAGS",
"SHLINKFLAGS",
]:
if i in os.environ:
- env.MergeFlags(Split(os.getenv(i)))
+ t = i
+ if t == "LDFLAGS":
+ t = "LINKFLAGS"
+ env.MergeFlags({t: Split(os.getenv(i))})
-# Keep scan-build options in the environment
+# Keep scan-build and rpm options in the environment
for key, value in os.environ.items():
- if key.startswith('CCC_'):
+ if key.startswith('CCC_') or key.startswith('RPM_'):
env.Append(ENV={key: value})
# Placeholder so we can kluge together something like VPATH builds.

View File

@ -31,6 +31,8 @@ Patch1: gpsd-ipv6.patch
Patch2: gpsd-scanfixes.patch Patch2: gpsd-scanfixes.patch
# fix busy wait when reading from gpsd socket # fix busy wait when reading from gpsd socket
Patch3: gpsd-busywait.patch Patch3: gpsd-busywait.patch
# don't ignore unrecognized options in CFLAGS/LDFLAGS
Patch4: gpsd-sconsflags.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: dbus-devel BuildRequires: dbus-devel
@ -156,6 +158,7 @@ do not reference it or depend on it in any way.
%patch -P 1 -p1 -b .ipv6 %patch -P 1 -p1 -b .ipv6
%patch -P 2 -p1 -b .scanfixes %patch -P 2 -p1 -b .scanfixes
%patch -P 3 -p1 -b .busywait %patch -P 3 -p1 -b .busywait
%patch -P 4 -p1 -b .sconsflags
# add note to man pages about limited support # add note to man pages about limited support
sed -i ':a;$!{N;ba};s|\(\.SH "[^"]*"\)|.SH "NOTE"\n%{note1}\n%{note2}\n\1|3' \ sed -i ':a;$!{N;ba};s|\(\.SH "[^"]*"\)|.SH "NOTE"\n%{note1}\n%{note2}\n\1|3' \