Support specify CC

This commit is contained in:
jammyjellyfish 2023-04-14 22:44:31 +08:00
parent a11b72d111
commit 0d4104d692
2 changed files with 24 additions and 1 deletions

View File

@ -20,7 +20,7 @@ Requires: gawk \
Name: initscripts
Summary: Basic support for legacy System V init scripts
Version: 10.17
Release: 3
Release: 4
License: GPLv2
@ -93,6 +93,7 @@ Patch9005: new-network-fork-to-start-dhcp.patch
Patch9006: exec-udevadm-settle-when-network-start.patch
Patch9007: remove-rename_device_lock-when-process-does-not-exis.patch
Patch9008: bugfix-Incorrect-processing-of-empty-files-for-resolv.conf.patch
Patch9009: support-specify-cc.patch
%description
This package provides basic support for legacy System V init scripts, and some
@ -388,6 +389,13 @@ fi
# =============================================================================
%changelog
* Fri Apr 14 2023 jammyjellyfish <jammyjellyfish255@outlook.com> - 10.17-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Support specify CC
* Mon Feb 20 2023 gaihuiying <eaglegai@163.com> - 10.17-3
- Type:bugfix
- ID:NA

15
support-specify-cc.patch Normal file
View File

@ -0,0 +1,15 @@
From: jammyjellyfish <jammyjellyfish255@outlook.com>
Date: Mon Apr 17 01:49:49 PM CST 2023
Subject: Support specify CC
diff -up initscripts-10.17/src/Makefile.orig2 initscripts-10.17/src/Makefile
--- initscripts-10.17/src/Makefile.orig2 2023-04-14 22:39:35.308829467 +0800
+++ initscripts-10.17/src/Makefile 2023-04-14 22:39:49.296867265 +0800
@@ -17,7 +17,7 @@ bindir = $(prefix)/bin
sbindir = $(prefix)/sbin
libdir = $(prefix)/lib
-CC = gcc
+CC ?= gcc
CFLAGS += $(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -fPIE
LDFLAGS += $(RPM_LD_FLAGS) -pie -z relro -z now