sync lib/Makefile fix from upstream

The previous one incorrectly enabled multithread options everywhere
This commit is contained in:
Pádraig Brady 2020-05-25 15:12:51 +01:00
parent a2c88d401a
commit b2a12f103c
2 changed files with 17 additions and 35 deletions

View File

@ -1,38 +1,20 @@
From 66db79bbb0977bea7023000dca6211c2cacf9a07 Mon Sep 17 00:00:00 2001 diff -Naur zstd-1.4.5.orig/lib/Makefile zstd-1.4.5/lib/Makefile
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> --- zstd-1.4.5.orig/lib/Makefile 2020-05-22 05:04:00.000000000 +0000
Date: Mon, 25 May 2020 13:16:31 +0100 +++ zstd-1.4.5/lib/Makefile 2020-05-25 14:11:28.947300726 +0000
Subject: [PATCH] fix generalization of pattern rules in lib/Makefile @@ -220,13 +220,14 @@
.PHONY: lib
This was introduced in v1.4.4-383-gf77fd5ce
and results in the default rule in lib/ doing nothing.
---
lib/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index e6213ac8..de437a98 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -221,14 +221,14 @@ libzstd : $(LIBZSTD)
lib : libzstd.a libzstd lib : libzstd.a libzstd
.PHONY: lib-mt -.PHONY: lib-mt
-%-mt : CPPFLAGS += -DZSTD_MULTITHREAD +# note : do not define lib-mt or lib-release as .PHONY
-%-mt : LDFLAGS += -pthread +# make does not consider implicit pattern rule for .PHONY target
-%-mt : % +
+% : CPPFLAGS += -DZSTD_MULTITHREAD %-mt : CPPFLAGS += -DZSTD_MULTITHREAD
+% : LDFLAGS += -pthread %-mt : LDFLAGS += -pthread
+% : lib %-mt : %
@echo multi-threading build completed @echo multi-threading build completed
.PHONY: lib-release -.PHONY: lib-release
-%-release : DEBUGFLAGS := %-release : DEBUGFLAGS :=
-%-release : % %-release : %
+% : DEBUGFLAGS :=
+% : lib
@echo release build completed @echo release build completed
--
2.26.2

View File

@ -13,7 +13,7 @@
Name: zstd Name: zstd
Version: 1.4.5 Version: 1.4.5
Release: 2%{?dist} Release: 3%{?dist}
Summary: Zstd compression library Summary: Zstd compression library
License: BSD and GPLv2 License: BSD and GPLv2
@ -124,7 +124,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%ldconfig_scriptlets -n lib%{name} %ldconfig_scriptlets -n lib%{name}
%changelog %changelog
* Fri May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-2 * Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
- Build shared library with correct compiler flags - Build shared library with correct compiler flags
* Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1 * Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1