From 032c082f5fe3cc96cbfc818ce076861993dffd7c Mon Sep 17 00:00:00 2001 From: Li Date: Sun, 23 Apr 2023 16:28:21 +0800 Subject: [PATCH 1/2] Fix CC compiler support --- linuxptp-fix-cc.patch | 11 +++++++++++ linuxptp.spec | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 linuxptp-fix-cc.patch diff --git a/linuxptp-fix-cc.patch b/linuxptp-fix-cc.patch new file mode 100644 index 0000000..b6ea2cf --- /dev/null +++ b/linuxptp-fix-cc.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2021-11-19 01:14:15.000000000 +0800 ++++ b/Makefile 2023-04-23 16:19:15.349812381 +0800 +@@ -11,7 +11,7 @@ + + MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION) + +-CC = gcc ++CC ?= gcc + CFLAGS = -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall + LDFLAGS = + diff --git a/linuxptp.spec b/linuxptp.spec index 969a8a2..418e27d 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -1,6 +1,6 @@ Name: linuxptp Version: 3.1.1 -Release: 1 +Release: 2 Summary: Linuxptp is an implementation of the Precision Time Protocol (PTP) Group: System Environment/Base License: GPLv2+ @@ -8,7 +8,7 @@ URL: http://linuxptp.sourceforge.net/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz Source1: phc2sys.service Source2: ptp4l.service - +Patch0: linuxptp-fix-cc.patch BuildRequires: gcc gcc-c++ systemd git net-tools @@ -80,8 +80,12 @@ echo 'OPTIONS="-a -r"' > %{buildroot}%{_sysconfdir}/sysconfig/phc2sys %{_mandir}/man8/*.8* %changelog +* Sun Apr 23 2023 xqlids@isoftstone.com> - 3.1.1-2 +- fix Fix CC compiler support + * Sat Feb 04 2023 wenchaofan <349464272@qq.com> - 3.1.1-1 - Update to 3.1.1 version + * Wed Sep 22 2021 yaoxin - 2.0-5 - Fix CVE-2021-3570 -- Gitee From 6230ad81ab6111b5c037aa70b8b864acf95132ab Mon Sep 17 00:00:00 2001 From: Li Date: Mon, 24 Apr 2023 16:27:47 +0800 Subject: [PATCH 2/2] CC compiler support --- linuxptp-fix-cc.patch | 11 ----------- linuxptp.spec | 1 - 2 files changed, 12 deletions(-) delete mode 100644 linuxptp-fix-cc.patch diff --git a/linuxptp-fix-cc.patch b/linuxptp-fix-cc.patch deleted file mode 100644 index b6ea2cf..0000000 --- a/linuxptp-fix-cc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile 2021-11-19 01:14:15.000000000 +0800 -+++ b/Makefile 2023-04-23 16:19:15.349812381 +0800 -@@ -11,7 +11,7 @@ - - MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION) - --CC = gcc -+CC ?= gcc - CFLAGS = -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall - LDFLAGS = - diff --git a/linuxptp.spec b/linuxptp.spec index 418e27d..6332bfc 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -8,7 +8,6 @@ URL: http://linuxptp.sourceforge.net/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz Source1: phc2sys.service Source2: ptp4l.service -Patch0: linuxptp-fix-cc.patch BuildRequires: gcc gcc-c++ systemd git net-tools -- Gitee