Skip to content

Commit

Permalink
SWPTP-1517: build RPM using gcc with sufficient C11 support on EL7, EL6
Browse files Browse the repository at this point in the history
  • Loading branch information
abower-amd committed Sep 13, 2024
1 parent bf1d43f commit d23b65a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/rpm/el6/sfptpd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BuildRequires: gcc
BuildRequires: make
BuildRequires: libmnl-devel
BuildRequires: libcap-devel
BuildRequires: devtoolset-7-gcc
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%define _pkgdocdir %{_defaultdocdir}/%{name}-%{version}
Expand Down Expand Up @@ -45,7 +46,7 @@ find -iregex '.*\.py' | xargs sed -i -r -e '1s,^(#!).*python3,\1/usr/bin/python,
sed -i 's,.*\(SFPTPD_USER=\).*",#\1"",g' scripts/sfptpd.env

%build
make %{?_smp_mflags} sfptpd sfptpdctl sfptpd_priv_helper GLIBC_COMPAT=1
scl enable devtoolset-7 'make %{?_smp_mflags} sfptpd sfptpdctl sfptpd_priv_helper GLIBC_COMPAT=1'

%install
export CC='false # no compilation at installation stage #'
Expand Down
3 changes: 2 additions & 1 deletion scripts/rpm/el7/sfptpd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ BuildRequires: make
BuildRequires: systemd
BuildRequires: libmnl-devel
BuildRequires: libcap-devel
BuildRequires: devtoolset-8-gcc

%description
Use multiple PTP an PPS sources and sync local clocks together in one
Expand All @@ -42,7 +43,7 @@ scripts/sfptpd_versioning write %{version}
sed -i 's,.*\(SFPTPD_USER=\).*",#\1"",g' scripts/sfptpd.env

%build
%make_build
scl enable devtoolset-8 '%make_build'

%install
export CC='false # no compilation at installation stage #'
Expand Down

0 comments on commit d23b65a

Please sign in to comment.