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

Commitac3a9af

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 parent0b8bdb3 commitac3a9af

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
@@ -1353,7 +1353,34 @@ include $(PGXS)
13531353
<term><varname>PG_CPPFLAGS</varname></term>
13541354
<listitem>
13551355
<para>
1356-
will be added to <varname>CPPFLAGS</varname>
1356+
will be prepended to <varname>CPPFLAGS</varname>
1357+
</para>
1358+
</listitem>
1359+
</varlistentry>
1360+
1361+
<varlistentry>
1362+
<term><varname>PG_CFLAGS</varname></term>
1363+
<listitem>
1364+
<para>
1365+
will be appended to <varname>CFLAGS</varname>
1366+
</para>
1367+
</listitem>
1368+
</varlistentry>
1369+
1370+
<varlistentry>
1371+
<term><varname>PG_CXXFLAGS</varname></term>
1372+
<listitem>
1373+
<para>
1374+
will be appended to <varname>CXXFLAGS</varname>
1375+
</para>
1376+
</listitem>
1377+
</varlistentry>
1378+
1379+
<varlistentry>
1380+
<term><varname>PG_LDFLAGS</varname></term>
1381+
<listitem>
1382+
<para>
1383+
will be prepended to <varname>LDFLAGS</varname>
13571384
</para>
13581385
</listitem>
13591386
</varlistentry>

‎src/makefiles/pgxs.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
# NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if
5353
# tests require special configuration, or don't use pg_regress
5454
# EXTRA_CLEAN -- extra files to remove in 'make clean'
55-
# PG_CPPFLAGS -- will be added to CPPFLAGS
55+
# PG_CPPFLAGS -- will be prepended to CPPFLAGS
56+
# PG_CFLAGS -- will be appended to CFLAGS
57+
# PG_CXXFLAGS -- will be appended to CXXFLAGS
58+
# PG_LDFLAGS -- will be prepended to LDFLAGS
5659
# PG_LIBS -- will be added to PROGRAM link line
5760
# PG_LIBS_INTERNAL -- same, for references to libraries within build tree
5861
# SHLIB_LINK -- will be added to MODULE_big link line
@@ -119,6 +122,15 @@ endif
119122
ifdefPG_CPPFLAGS
120123
overrideCPPFLAGS :=$(PG_CPPFLAGS)$(CPPFLAGS)
121124
endif
125+
ifdefPG_CFLAGS
126+
overrideCFLAGS :=$(CFLAGS)$(PG_CFLAGS)
127+
endif
128+
ifdefPG_CXXFLAGS
129+
overrideCXXFLAGS :=$(CXXFLAGS)$(PG_CXXFLAGS)
130+
endif
131+
ifdefPG_LDFLAGS
132+
overrideLDFLAGS :=$(PG_LDFLAGS)$(LDFLAGS)
133+
endif
122134

123135
# logic for HEADERS_* stuff
124136

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp