From: Peter Eisentraut Date: Mon, 1 Jul 2024 05:30:38 +0000 (+0200) Subject: Apply COPT to CXXFLAGS as well X-Git-Tag: REL_18_BETA1~2516 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c3930d0768;p=thirdparty%2Fpostgresql.git Apply COPT to CXXFLAGS as well The main use of that make variable is to pass in -Werror. It makes sense to apply this to C++ as well. Reviewed-by: Tom Lane Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/flat/fe3e200c-edee-44e0-a6e3-d45dca72873b%40eisentraut.org --- diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 1b32d5ca62c..c39bcb3ee7c 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1937,7 +1937,7 @@ build-postgresql: it will break many of configure's built-in tests. To add such flags, include them in the COPT environment variable while running make. The contents of COPT - are added to both the CFLAGS and LDFLAGS + are added to the CFLAGS, CXXFLAGS, and LDFLAGS options set up by configure. For example, you could do make COPT='-Werror' diff --git a/src/Makefile.global.in b/src/Makefile.global.in index a00c909681e..83b91fe9167 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -741,6 +741,7 @@ endif # ifdef COPT CFLAGS += $(COPT) + CXXFLAGS += $(COPT) LDFLAGS += $(COPT) endif