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

Commit5e63df8

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 parent073afae commit5e63df8

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
@@ -1190,7 +1190,34 @@ include $(PGXS)
11901190
<term><varname>PG_CPPFLAGS</varname></term>
11911191
<listitem>
11921192
<para>
1193-
will be added to <varname>CPPFLAGS</varname>
1193+
will be prepended to <varname>CPPFLAGS</varname>
1194+
</para>
1195+
</listitem>
1196+
</varlistentry>
1197+
1198+
<varlistentry>
1199+
<term><varname>PG_CFLAGS</varname></term>
1200+
<listitem>
1201+
<para>
1202+
will be appended to <varname>CFLAGS</varname>
1203+
</para>
1204+
</listitem>
1205+
</varlistentry>
1206+
1207+
<varlistentry>
1208+
<term><varname>PG_CXXFLAGS</varname></term>
1209+
<listitem>
1210+
<para>
1211+
will be appended to <varname>CXXFLAGS</varname>
1212+
</para>
1213+
</listitem>
1214+
</varlistentry>
1215+
1216+
<varlistentry>
1217+
<term><varname>PG_LDFLAGS</varname></term>
1218+
<listitem>
1219+
<para>
1220+
will be prepended to <varname>LDFLAGS</varname>
11941221
</para>
11951222
</listitem>
11961223
</varlistentry>

‎src/makefiles/pgxs.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
# REGRESS -- list of regression test cases (without suffix)
4242
# REGRESS_OPTS -- additional switches to pass to pg_regress
4343
# EXTRA_CLEAN -- extra files to remove in 'make clean'
44-
# PG_CPPFLAGS -- will be added to CPPFLAGS
44+
# PG_CPPFLAGS -- will be prepended to CPPFLAGS
45+
# PG_CFLAGS -- will be appended to CFLAGS
46+
# PG_CXXFLAGS -- will be appended to CXXFLAGS
47+
# PG_LDFLAGS -- will be prepended to LDFLAGS
4548
# PG_LIBS -- will be added to PROGRAM link line
4649
# PG_LIBS_INTERNAL -- same, for references to libraries within build tree
4750
# SHLIB_LINK -- will be added to MODULE_big link line
@@ -98,6 +101,15 @@ endif
98101
ifdefPG_CPPFLAGS
99102
overrideCPPFLAGS :=$(PG_CPPFLAGS)$(CPPFLAGS)
100103
endif
104+
ifdefPG_CFLAGS
105+
overrideCFLAGS :=$(CFLAGS)$(PG_CFLAGS)
106+
endif
107+
ifdefPG_CXXFLAGS
108+
overrideCXXFLAGS :=$(CXXFLAGS)$(PG_CXXFLAGS)
109+
endif
110+
ifdefPG_LDFLAGS
111+
overrideLDFLAGS :=$(PG_LDFLAGS)$(LDFLAGS)
112+
endif
101113

102114
all:$(PROGRAM)$(DATA_built)$(SCRIPTS_built)$(addsuffix$(DLSUFFIX),$(MODULES))$(addsuffix .control,$(EXTENSION))
103115

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp