OSDN Git Service

Add LD option --build-id only at RPM-build time
authorfengzh <fzhlib@gmail.com>
Tue, 18 Jan 2022 07:18:19 +0000 (16:18 +0900)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Tue, 18 Jan 2022 07:20:42 +0000 (16:20 +0900)
That option harms not only SunOS but also BSDs.  It is required by
rpmbuild so it is sensible to move the option from Makefile to SPEC
file.

Makefile
SPECS/pg_hint_plan14.spec

index f5057c5..3e27311 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,10 +43,6 @@ TARSOURCES = Makefile *.c  *.h COPYRIGHT* \
        doc/* expected/*.out sql/*.sql sql/maskout.sh \
        data/data.csv input/*.source output/*.source SPECS/*.spec
 
-ifneq ($(shell uname), SunOS)
-LDFLAGS+=-Wl,--build-id
-endif
-
 installcheck: $(REGRESSION_EXPECTED)
 
 rpms: rpm14
index 26da951..fef6334 100644 (file)
@@ -59,7 +59,7 @@ if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi
 ## Set variables for build environment
 %build
 PATH=/usr/pgsql-14/bin:$PATH
-make USE_PGXS=1 %{?_smp_mflags}
+make USE_PGXS=1 LDFLAGS+=-Wl,--build-id %{?_smp_mflags}
 
 ## Set variables for install
 %install