File 0001-build-with-rpm_opt_flags.patch of Package sblim-cmpi-smbios
From 4ece2561ec1849e290ae3fd90c5090d1c12b778a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com> Date: Fri, 21 Feb 2025 19:09:38 +0100 Subject: [PATCH 1/5] build with rpm_opt_flags --- makefile | 6 +++--- rules | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index 9981135..0118a8d 100644 --- a/makefile +++ b/makefile @@ -2,8 +2,8 @@ include setting.cmpi -export CFLAGS=-Wall -g -CPPFLAGS=-I $(CIMOMINC) -DDEBUG +export CFLAGS=$(RPM_OPT_FLAGS) -fPIC +export CPPFLAGS=$(RPM_OPT_FLAGS) -I $(CIMOMINC) -DDEBUG LOADLIBES=-ldmiinfo LDFLAGS=-L . @@ -55,4 +55,4 @@ endif ifndef NODEPS include $(DEPFILES) -endif \ No newline at end of file +endif diff --git a/rules b/rules index be3f882..1e7f539 100644 --- a/rules +++ b/rules @@ -2,7 +2,7 @@ %.d: %.c $(RM) $@ - $(CC) -M $(CPPFLAGS) $< | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@ + $(CC) -M $(CPPFLAGS) $(RPM_OPT_FLAGS) $< | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@ lib%.so: %.o $(LINK.c) -shared $^ $(LOADLIBES) $(LDLIBS)-o $@ -- 2.48.1