Add LDFLAGS to linking

Add the usual LDFLAGS when linking.
This commit is contained in:
Timm Bäder 2020-11-03 16:10:53 +01:00
parent ec0ec05211
commit 730a21a590
2 changed files with 14 additions and 0 deletions

12
fxload-ldflags.patch Normal file
View File

@ -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 $@

View File

@ -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"