diff --git a/fxload-cflags-ldflags.patch b/fxload-cflags-ldflags.patch new file mode 100644 index 0000000..ce7e7ed --- /dev/null +++ b/fxload-cflags-ldflags.patch @@ -0,0 +1,12 @@ +diff -up fxload-2008_10_13/Makefile.cflags fxload-2008_10_13/Makefile +--- fxload-2008_10_13/Makefile.cflags 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/Makefile 2018-02-25 23:11:02.416103160 -0500 +@@ -39,7 +39,7 @@ release: rpms + + # object files + $(PROG): $(FILES_OBJ) +- $(CC) -o $(PROG) $(FILES_OBJ) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(FILES_OBJ) + + %.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ diff --git a/fxload-noa3load.patch b/fxload-noa3load.patch index 7d80fee..e18b732 100644 --- a/fxload-noa3load.patch +++ b/fxload-noa3load.patch @@ -1,7 +1,7 @@ -diff -urN fxload-2002_04_11/fxload.8 fxload-2002_04_11-noa3load/fxload.8 ---- fxload-2002_04_11/fxload.8 2002-04-11 22:08:01.000000000 -0600 -+++ fxload-2002_04_11-noa3load/fxload.8 2007-11-16 23:13:40.000000000 -0700 -@@ -217,15 +217,6 @@ +diff -up fxload-2008_10_13/fxload.8.fxload-noa3load fxload-2008_10_13/fxload.8 +--- fxload-2008_10_13/fxload.8.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/fxload.8 2018-02-25 23:33:18.717749708 -0500 +@@ -224,15 +224,6 @@ and some firmware can't be placed in boo .B DEVICE normally names a "usbfs" file that will be used to talk to the device. This is provided by the Linux kernel as part of USB hotplugging. @@ -17,10 +17,10 @@ diff -urN fxload-2002_04_11/fxload.8 fxload-2002_04_11-noa3load/fxload.8 .SH "SEE ALSO" .BR hotplug "(8) " .SH "AUTHORS" -diff -urN fxload-2002_04_11/README.txt fxload-2002_04_11-noa3load/README.txt ---- fxload-2002_04_11/README.txt 2002-04-11 22:08:01.000000000 -0600 -+++ fxload-2002_04_11-noa3load/README.txt 2007-11-16 23:13:29.000000000 -0700 -@@ -11,11 +11,6 @@ +diff -up fxload-2008_10_13/README.txt.fxload-noa3load fxload-2008_10_13/README.txt +--- fxload-2008_10_13/README.txt.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/README.txt 2018-02-25 23:33:18.717749708 -0500 +@@ -11,11 +11,6 @@ firmware on devices which boot from I2C use, as well as downloading firmware to all other off-chip memory, a second stage loader must first be downloaded. diff --git a/fxload.spec b/fxload.spec index 3cc016f..aaf9b92 100644 --- a/fxload.spec +++ b/fxload.spec @@ -1,6 +1,6 @@ Name: fxload Version: 2008_10_13 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A helper program to download firmware into FX and FX2 EZ-USB devices License: GPLv2+ @@ -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-cflags-ldflags.patch BuildRequires: gcc kernel-headers Requires: udev @@ -29,9 +30,10 @@ appears on the bus. %prep %setup -q %patch0 -p1 -b .fxload-noa3load +%patch1 -p1 -b .cflags %build -make +make CC=gcc CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %install mkdir -p -m 755 %{buildroot}/sbin @@ -47,6 +49,11 @@ install -m 644 fxload.8 %{buildroot}/%{_mandir}/man8/ %{_mandir}/*/* %changelog +* Sun Feb 25 2018 Charles R. Anderson - 2008_10_13-10 +- Patch to apply CFLAGS/LDFLAGS to final link so RPM_OPT_FLAGS are picked up (rhbz#1548426) +- Use CC=gcc explicitly +- Regenerate fxload-noa3load.patch + * Sun Feb 18 2018 Charles R. Anderson - 2008_10_13-9 - add BR gcc - remove Group:, BuildRoot: and rm -rf in install section