From eff8431485d708b0854ae446ebdd54d462c58208 Mon Sep 17 00:00:00 2001 From: Tony Camuso Date: Mon, 22 Jul 2024 12:15:21 -0400 Subject: [PATCH] Makefile: accept LDFLAGS from env if defined The binaries were failing annocheck because the external LDFLAGS were being nullified by the Makefile. Resolves: RHEL-33518 Signed-off-by: Tony Camuso --- ...e-accept-LDFLAGS-from-env-if-defined.patch | 25 +++++++++++++++++++ pigz.spec | 1 + 2 files changed, 26 insertions(+) create mode 100644 Makefile-accept-LDFLAGS-from-env-if-defined.patch diff --git a/Makefile-accept-LDFLAGS-from-env-if-defined.patch b/Makefile-accept-LDFLAGS-from-env-if-defined.patch new file mode 100644 index 0000000..6b71a47 --- /dev/null +++ b/Makefile-accept-LDFLAGS-from-env-if-defined.patch @@ -0,0 +1,25 @@ +From 32f59866bffcbfcfc44c22c613c0019a2e5d32f2 Mon Sep 17 00:00:00 2001 +From: Tony Camuso +Date: Mon, 22 Jul 2024 11:54:28 -0400 +Subject: [PATCH v0] Makefile: accept LDFLAGS from env if defined + +Signed-off-by: Tony Camuso +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b1866cf..b2b279c 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + CC=gcc + CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual +-LDFLAGS= ++LDFLAGS ?= + # CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual -g -fsanitize=thread + # LDFLAGS=-g -fsanitize=thread + # CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual -g -fsanitize=address +-- +2.45.2 + diff --git a/pigz.spec b/pigz.spec index 3a39de6..b3fdea3 100644 --- a/pigz.spec +++ b/pigz.spec @@ -5,6 +5,7 @@ Summary: Parallel implementation of gzip License: Zlib URL: https://www.zlib.net/pigz/ Source0: https://www.zlib.net/%{name}/%{name}-%{version}.tar.gz +Patch0: Makefile-accept-LDFLAGS-from-env-if-defined.patch BuildRequires: gcc BuildRequires: make BuildRequires: ncompress