Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda14c9b

Browse files
committed
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk whichwill be appended or prepended to the corresponding make variables.Notably, there was previously no way to pass custom CXXFLAGS to thirdparty extension module builds, COPT and PROFILE supporting only CFLAGSand LDFLAGS.Backpatch all the way down to ease integration with existingextensions.Author: Christoph BergReviewed-by: Andres Freund, Tom Lane, Michael PaquierDiscussion:https://postgr.es/m/20181113104005.GA32154@msg.credativ.deBackpatch-through: 9.4
1 parent1ca33fc commitda14c9b

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

‎doc/src/sgml/extend.sgml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,34 @@ include $(PGXS)
12501250
<term><varname>PG_CPPFLAGS</varname></term>
12511251
<listitem>
12521252
<para>
1253-
will be added to <varname>CPPFLAGS</varname>
1253+
will be prepended to <varname>CPPFLAGS</varname>
1254+
</para>
1255+
</listitem>
1256+
</varlistentry>
1257+
1258+
<varlistentry>
1259+
<term><varname>PG_CFLAGS</varname></term>
1260+
<listitem>
1261+
<para>
1262+
will be appended to <varname>CFLAGS</varname>
1263+
</para>
1264+
</listitem>
1265+
</varlistentry>
1266+
1267+
<varlistentry>
1268+
<term><varname>PG_CXXFLAGS</varname></term>
1269+
<listitem>
1270+
<para>
1271+
will be appended to <varname>CXXFLAGS</varname>
1272+
</para>
1273+
</listitem>
1274+
</varlistentry>
1275+
1276+
<varlistentry>
1277+
<term><varname>PG_LDFLAGS</varname></term>
1278+
<listitem>
1279+
<para>
1280+
will be prepended to <varname>LDFLAGS</varname>
12541281
</para>
12551282
</listitem>
12561283
</varlistentry>

‎src/makefiles/pgxs.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
# NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if
4444
# tests require special configuration, or don't use pg_regress
4545
# EXTRA_CLEAN -- extra files to remove in 'make clean'
46-
# PG_CPPFLAGS -- will be added to CPPFLAGS
46+
# PG_CPPFLAGS -- will be prepended to CPPFLAGS
47+
# PG_CFLAGS -- will be appended to CFLAGS
48+
# PG_CXXFLAGS -- will be appended to CXXFLAGS
49+
# PG_LDFLAGS -- will be prepended to LDFLAGS
4750
# PG_LIBS -- will be added to PROGRAM link line
4851
# PG_LIBS_INTERNAL -- same, for references to libraries within build tree
4952
# SHLIB_LINK -- will be added to MODULE_big link line
@@ -100,6 +103,15 @@ endif
100103
ifdefPG_CPPFLAGS
101104
overrideCPPFLAGS :=$(PG_CPPFLAGS)$(CPPFLAGS)
102105
endif
106+
ifdefPG_CFLAGS
107+
overrideCFLAGS :=$(CFLAGS)$(PG_CFLAGS)
108+
endif
109+
ifdefPG_CXXFLAGS
110+
overrideCXXFLAGS :=$(CXXFLAGS)$(PG_CXXFLAGS)
111+
endif
112+
ifdefPG_LDFLAGS
113+
overrideLDFLAGS :=$(PG_LDFLAGS)$(LDFLAGS)
114+
endif
103115

104116
all:$(PROGRAM)$(DATA_built)$(SCRIPTS_built)$(addsuffix$(DLSUFFIX),$(MODULES))$(addsuffix .control,$(EXTENSION))
105117

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp