From 730a21a5908a358d4bbc681a6be5ac5b575f4fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Nov 2020 16:10:53 +0100 Subject: [PATCH] Add LDFLAGS to linking Add the usual LDFLAGS when linking. --- fxload-ldflags.patch | 12 ++++++++++++ fxload.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 fxload-ldflags.patch diff --git a/fxload-ldflags.patch b/fxload-ldflags.patch new file mode 100644 index 0000000..2b5639c --- /dev/null +++ b/fxload-ldflags.patch @@ -0,0 +1,12 @@ +diff -ruN fxload-2008_10_13.orig/Makefile fxload-2008_10_13/Makefile +--- fxload-2008_10_13.orig/Makefile 2008-10-13 23:44:04.000000000 +0200 ++++ fxload-2008_10_13/Makefile 2020-11-03 16:05:41.516974652 +0100 +@@ -39,7 +39,7 @@ + + # object files + $(PROG): $(FILES_OBJ) +- $(CC) -o $(PROG) $(FILES_OBJ) ++ $(CC) $(LDFLAGS) -o $(PROG) $(FILES_OBJ) + + %.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ diff --git a/fxload.spec b/fxload.spec index be8b321..ef97477 100644 --- a/fxload.spec +++ b/fxload.spec @@ -15,6 +15,7 @@ Source0: fxload-%{version}-noa3load.tar.gz # ./fxload-generate-tarball.sh 2008_10_13 Source1: fxload-generate-tarball.sh Patch0: fxload-noa3load.patch +Patch1: fxload-ldflags.patch BuildRequires: gcc kernel-headers Requires: udev @@ -29,6 +30,7 @@ appears on the bus. %prep %setup -q %patch0 -p1 -b .fxload-noa3load +%patch1 -p1 -b .ldflags %build make CC=%{__cc} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"