From: Christoph Berg <christoph.berg@credativ.de>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
Date: Tue, 13 Nov 2018 11:40:05 +0100
Message-ID: <20181113104005.GA32154@msg.credativ.de> (raw)
While working on making extension modules built reproducibly, I
noticed that extra flags passed via COPT (notably -ffile-prefix-map)
do not get added to CXXFLAGS.
This causes postgresql-hll to still store the full build path in the
.so file built: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/postgresql-hll...
Christoph
--
Senior Berater, Tel.: +49 2166 9901 187
credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutzAttachments:
[text/x-diff] 0001-Pass-COPT-and-PROFILE-to-CXXFLAGS-as-well.patch (865B, ../20181113104005.GA32154@msg.credativ.de/2-0001-Pass-COPT-and-PROFILE-to-CXXFLAGS-as-well.patch)
download | inline diff:
From 1c9a12d24169edb5343df28036adbf1d09a9ab2c Mon Sep 17 00:00:00 2001
From: Christoph Berg <christoph.berg@credativ.de>
Date: Tue, 13 Nov 2018 11:35:26 +0100
Subject: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
The existing machinery for extending CFLAGS and LDFLAGS via COPT and
PROFILE neglected to extend CXXFLAGS as well, causing third party
extensions written in C++ not to get the extra flags.
---
src/Makefile.global.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Makefile.global.in b/src/Makefile.global.inindex 956fd274cd..5e7eb550cc 100644--- a/src/Makefile.global.in+++ b/src/Makefile.global.in@@ -671,11 +671,13 @@ endif
#
ifdef COPT
CFLAGS += $(COPT)
+ CXXFLAGS += $(COPT)
LDFLAGS += $(COPT)
endif
ifdef PROFILE
CFLAGS += $(PROFILE)
+ CXXFLAGS += $(PROFILE)
LDFLAGS += $(PROFILE)
endif
--
2.19.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: christoph.berg@credativ.de
Subject: Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
In-Reply-To: <20181113104005.GA32154@msg.credativ.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox