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
This commit is contained in:
Charles R. Anderson 2018-02-25 23:41:50 -05:00
parent 9d4f7479ae
commit f258aba29b
3 changed files with 29 additions and 10 deletions

View File

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

View File

@ -1,7 +1,7 @@
diff -urN fxload-2002_04_11/fxload.8 fxload-2002_04_11-noa3load/fxload.8 diff -up fxload-2008_10_13/fxload.8.fxload-noa3load fxload-2008_10_13/fxload.8
--- fxload-2002_04_11/fxload.8 2002-04-11 22:08:01.000000000 -0600 --- fxload-2008_10_13/fxload.8.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400
+++ fxload-2002_04_11-noa3load/fxload.8 2007-11-16 23:13:40.000000000 -0700 +++ fxload-2008_10_13/fxload.8 2018-02-25 23:33:18.717749708 -0500
@@ -217,15 +217,6 @@ @@ -224,15 +224,6 @@ and some firmware can't be placed in boo
.B DEVICE .B DEVICE
normally names a "usbfs" file that will be used to talk to the 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. 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" .SH "SEE ALSO"
.BR hotplug "(8) " .BR hotplug "(8) "
.SH "AUTHORS" .SH "AUTHORS"
diff -urN fxload-2002_04_11/README.txt fxload-2002_04_11-noa3load/README.txt diff -up fxload-2008_10_13/README.txt.fxload-noa3load fxload-2008_10_13/README.txt
--- fxload-2002_04_11/README.txt 2002-04-11 22:08:01.000000000 -0600 --- fxload-2008_10_13/README.txt.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400
+++ fxload-2002_04_11-noa3load/README.txt 2007-11-16 23:13:29.000000000 -0700 +++ fxload-2008_10_13/README.txt 2018-02-25 23:33:18.717749708 -0500
@@ -11,11 +11,6 @@ @@ -11,11 +11,6 @@ firmware on devices which boot from I2C
use, as well as downloading firmware to all other off-chip memory, use, as well as downloading firmware to all other off-chip memory,
a second stage loader must first be downloaded. a second stage loader must first be downloaded.

View File

@ -1,6 +1,6 @@
Name: fxload Name: fxload
Version: 2008_10_13 Version: 2008_10_13
Release: 9%{?dist} Release: 10%{?dist}
Summary: A helper program to download firmware into FX and FX2 EZ-USB devices Summary: A helper program to download firmware into FX and FX2 EZ-USB devices
License: GPLv2+ License: GPLv2+
@ -15,6 +15,7 @@ Source0: fxload-%{version}-noa3load.tar.gz
# ./fxload-generate-tarball.sh 2008_10_13 # ./fxload-generate-tarball.sh 2008_10_13
Source1: fxload-generate-tarball.sh Source1: fxload-generate-tarball.sh
Patch0: fxload-noa3load.patch Patch0: fxload-noa3load.patch
Patch1: fxload-cflags-ldflags.patch
BuildRequires: gcc kernel-headers BuildRequires: gcc kernel-headers
Requires: udev Requires: udev
@ -29,9 +30,10 @@ appears on the bus.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .fxload-noa3load %patch0 -p1 -b .fxload-noa3load
%patch1 -p1 -b .cflags
%build %build
make make CC=gcc CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%install %install
mkdir -p -m 755 %{buildroot}/sbin mkdir -p -m 755 %{buildroot}/sbin
@ -47,6 +49,11 @@ install -m 644 fxload.8 %{buildroot}/%{_mandir}/man8/
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Sun Feb 25 2018 Charles R. Anderson <cra@wpi.edu> - 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 <cra@wpi.edu> - 2008_10_13-9 * Sun Feb 18 2018 Charles R. Anderson <cra@wpi.edu> - 2008_10_13-9
- add BR gcc - add BR gcc
- remove Group:, BuildRoot: and rm -rf in install section - remove Group:, BuildRoot: and rm -rf in install section