Apply COPT to CXXFLAGS as well
authorPeter Eisentraut
Mon, 1 Jul 2024 05:30:38 +0000 (07:30 +0200)
committerPeter Eisentraut
Mon, 1 Jul 2024 05:30:55 +0000 (07:30 +0200)
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

doc/src/sgml/installation.sgml
src/Makefile.global.in

index 1b32d5ca62c1f53c9646ff1fbae311fbab554d6d..c39bcb3ee7c1b350697fbe8537300339371a472f 100644 (file)
@@ -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 CFLAGSCXXFLAGS, and LDFLAGS
      options set up by configure.  For example, you could do
 
 make COPT='-Werror'
index a00c909681eb163d31986123790add1b4181606e..83b91fe916738226d63299bef772c92693ce73e1 100644 (file)
@@ -741,6 +741,7 @@ endif
 #
 ifdef COPT
    CFLAGS += $(COPT)
+   CXXFLAGS += $(COPT)
    LDFLAGS += $(COPT)
 endif