#2 Use $CC instead of hardcoding gcc
Opened 3 years ago by tbaeder. Modified 3 years ago
rpms/ tbaeder/sgpio master  into  rawhide

file modified
+2 -2
@@ -16,11 +16,11 @@ 

   

   sgpio.o: sgpio.c

  -	gcc -g -Wall -c sgpio.c

- +	gcc $(CFLAGS) -c sgpio.c

+ +	$(CC) $(CFLAGS) -c sgpio.c

   

   sgpio: sgpio.o

  -	gcc -g sgpio.o -o sgpio

- +	gcc $(LDFLAGS) sgpio.o -o sgpio

+ +	$(CC) $(LDFLAGS) sgpio.o -o sgpio

   

   clean:

   	rm -f sgpio.o sgpio

file modified
+6 -2
@@ -1,7 +1,7 @@ 

  Summary: SGPIO captive backplane tool

  Name: sgpio

  Version: 1.2.0.10

- Release: 27%{?dist}

+ Release: 28%{?dist}

  License: GPLv2+

  URL: http://sources.redhat.com/lvm2/wiki/DMRAID_Eventing

  Source: sgpio-1.2-0.10-src.tar.gz
@@ -23,9 +23,10 @@ 

  chmod a-x *

  

  %build

+ %set_build_flags

  #@@@ workaround for #474755 - remove with next update

  make clean

- %make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"

+ %make_build

  

  %install

  %make_install SBIN_DIR=$RPM_BUILD_ROOT%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir}
@@ -36,6 +37,9 @@ 

  %{_mandir}/man1/sgpio.*

  

  %changelog

+ * Thu Dec 10 2020 Timm Bäder <tbaeder@redhat.com> - 1.2.0.10-28

+ - Use $CC from the environment instead of gcc

+ 

  * Mon Aug 24 2020 Jan Synáček <jsynacek@redhat.com> - 1.2.0.10-27

  - Use make macros

  - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro

This changes the sgpio-1.2-makefile.patch to additionally switch from
hardcoding gcc to using $CC instead.