Makefiles should honor external LDFLAGS

[skip changelog]

Resolves: RHEL-46071

Signed-off-by: Vladis Dronov <vdronov@redhat.com>
This commit is contained in:
Vladis Dronov 2024-10-30 22:51:51 +01:00
parent d21111484b
commit a515f25b77
2 changed files with 28 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: lib-version.patch
Patch1: test.patch
Patch2: rh-makefile.patch
BuildRequires: automake
BuildRequires: gcc

27
rh-makefile.patch Normal file
View File

@ -0,0 +1,27 @@
--- a/src/Makefile 2024-10-30 22:20:03.296178391 +0100
+++ b/src/Makefile 2024-10-30 22:21:43.915301707 +0100
@@ -52,11 +52,11 @@ ifneq ($(ICP_ROOT), )
-I$(ICP_ROOT)/quickassist/include/dc \
-I$(ICP_ROOT)/quickassist/lookaside/access_layer/include \
-I$(ICP_ROOT)/quickassist/utilities/libusdm_drv
- LDFLAGS = -Wl,-rpath,$(ICP_ROOT)/build -L$(ICP_ROOT)/build -lqat_s \
+ LDFLAGS += -Wl,-rpath,$(ICP_ROOT)/build -L$(ICP_ROOT)/build -lqat_s \
-lusdm_drv_s
else
QATFLAGS = -DINTREE
- LDFLAGS = -lqat -lusdm
+ LDFLAGS += -lqat -lusdm
endif
ifdef ZSTDLIB
--- a/test/Makefile 2024-10-30 22:22:39.465369781 +0100
+++ b/test/Makefile 2024-10-30 22:24:02.145471097 +0100
@@ -34,7 +34,7 @@
# #######################################################################
LIB = ../src
-LDFLAGS = -L$(LIB) -I$(LIB)
+LDFLAGS += -L$(LIB) -I$(LIB)
ifneq ($(ICP_ROOT), )
LDFLAGS += -lqat_s -lusdm_drv_s -Wl,-rpath,$(ICP_ROOT)/build -L$(ICP_ROOT)/build