#1 Make value of CC configurable in Makefile
Opened 4 years ago by tstellar. Modified 4 years ago
rpms/ tstellar/authd flexible-cc  into  rawhide

@@ -0,0 +1,68 @@ 

+ From eecd05897ea250a917cfac7b441be7687df98429 Mon Sep 17 00:00:00 2001

+ From: Tom Stellard <tstellar@redhat.com>

+ Date: Mon, 13 Jan 2020 17:29:08 +0000

+ Subject: [PATCH] Use Makefile variables for $(CC) and $(CPP) so users can

+  override them.

+ 

+ ---

+  GNUmakefile        | 9 +++++----

+  GNUmakefile.docdir | 9 +++++----

+  2 files changed, 10 insertions(+), 8 deletions(-)

+ 

+ diff --git a/GNUmakefile b/GNUmakefile

+ index 8f940e5..d08abcb 100644

+ --- a/GNUmakefile

+ +++ b/GNUmakefile

+ @@ -3,9 +3,10 @@ exec_prefix=$(prefix)

+  sbindir=$(exec_prefix)/sbin

+  datadir=$(prefix)/share

+  

+ -PACKAGE=$(shell gcc -E -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}')

+ -VERSION=$(shell gcc -E -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}')

+ -URL=$(shell gcc -E -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}')

+ +CC = gcc

+ +PACKAGE=$(shell $(CPP) -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}')

+ +VERSION=$(shell $(CPP) -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}')

+ +URL=$(shell $(CPP) -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}')

+  

+  PROJECT_ID := $(PACKAGE)-$(VERSION)

+  

+ @@ -21,7 +22,7 @@ all: $(targets)

+  ja.mo: ja.po

+  

+  in.authd: authd.c config.h

+ -	gcc $(CFLAGS) $(LDFLAGS) -o $@ $<

+ +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<

+  authd.pot: authd.c

+  

+  

+ diff --git a/GNUmakefile.docdir b/GNUmakefile.docdir

+ index 1c3a562..a4fe2d6 100644

+ --- a/GNUmakefile.docdir

+ +++ b/GNUmakefile.docdir

+ @@ -3,9 +3,10 @@ exec_prefix=$(prefix)

+  sbindir=$(exec_prefix)/sbin

+  datadir=$(prefix)/share

+  

+ -PACKAGE=$(shell gcc -E -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}')

+ -VERSION=$(shell gcc -E -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}')

+ -URL=$(shell gcc -E -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}')

+ +CC = gcc

+ +PACKAGE=$(shell $(CPP) -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}')

+ +VERSION=$(shell $(CPP) -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}')

+ +URL=$(shell $(CPP) -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}')

+  

+  PROJECT_ID := $(PACKAGE)-$(VERSION)

+  

+ @@ -21,7 +22,7 @@ all: $(targets)

+  ja.mo: ja.po

+  

+  in.authd: authd.c config.h

+ -	gcc $(CFLAGS) $(LDFLAGS) -o $@ $<

+ +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<

+  authd.pot: authd.c

+  

+  

+ -- 

+ 2.21.0

+ 

file modified
+12 -3
@@ -3,7 +3,7 @@ 

  Summary: A RFC 1413 ident protocol daemon

  Name: authd

  Version: 1.4.4

- Release: 4%{?dist}

+ Release: 6%{?dist}

  License: GPLv2+

  URL: https://github.com/InfrastructureServices/authd

  Obsoletes: pidentd < 3.2
@@ -18,6 +18,9 @@ 

  Requires(preun): systemd-units

  Requires(postun): systemd-units

  

+ # https://github.com/InfrastructureServices/authd/pull/2

+ Patch0: 0001-Use-Makefile-variables-for-CC-and-CPP-so-users-can-o.patch

+ 

  %description

  authd is a small and fast RFC 1413 ident protocol daemon

  with both xinetd server and interactive modes that
@@ -25,10 +28,10 @@ 

  of pidentd.

  

  %prep

- %autosetup

+ %autosetup -p1

  

  %build

- make prefix=%{_prefix} CFLAGS="%{optflags}" \

+ %make_build prefix=%{_prefix} CFLAGS="%{optflags}" \

          LDFLAGS="-lcrypto %{build_ldflags}"

  

  
@@ -72,6 +75,12 @@ 

  %{_unitdir}/*

  

  %changelog

+ * Wed Feb 26 2020 Tom Stellard <tstellar@redhat.com> - 1.4.4-6

+ - Use Makefile variables for $(CC) and $(CPP) so users can override them

+ 

+ * Wed Feb 26 2020 Tom Stellard <tstellar@redhat.com> - 1.4.4-5

+ - Use make_build macro instead of plain make

+ 

  * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

  

This will make it possible to do custom builds of this package with a non compiler other than gcc (e.g. clang).

rebased onto 1afdb55

4 years ago