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

Commit44273ce

Browse files
committed
Select CFLAGS_SL at configure time, not in platform-specific Makefiles.
Move the platform-dependent logic that sets CFLAGS_SL fromsrc/makefiles/Makefile.foo to src/template/foo, so that the valueis determined at configure time and thus is available while runningconfigure's tests.On a couple of platforms this might save a few microseconds of buildtime by eliminating a test that make otherwise has to do over and over.Otherwise it's pretty much a wash for build purposes; in particular,this makes no difference to anyone who might be overriding CFLAGS_SLvia a make option.This patch in itself does nothing with the value and thus should notchange any behavior, though you'll probably have to re-run configureto get a correctly updated Makefile.global. We'll use the newconfigure variable in a follow-on patch.Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches,because the follow-on patch is a portability bug fix.Discussion:https://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com
1 parent80831bc commit44273ce

21 files changed

+55
-26
lines changed

‎configure‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ autodepend
728728
TAS
729729
GCC
730730
CPP
731+
CFLAGS_SL
731732
BITCODE_CXXFLAGS
732733
BITCODE_CFLAGS
733734
CFLAGS_VECTOR
@@ -6579,7 +6580,6 @@ fi
65796580

65806581
fi
65816582

6582-
CFLAGS_VECTOR=$CFLAGS_VECTOR
65836583

65846584

65856585
# Determine flags used to emit bitcode for JIT inlining. Need to test
@@ -6899,9 +6899,10 @@ CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
68996899
BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
69006900
BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
69016901

6902-
BITCODE_CFLAGS=$BITCODE_CFLAGS
69036902

6904-
BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6903+
6904+
6905+
# The template file must set up CFLAGS_SL; we don't support user override
69056906

69066907

69076908
# Check if the compiler still works with the final flag settings

‎configure.in‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ elif test "$PORTNAME" = "hpux"; then
547547
PGAC_PROG_CXX_CFLAGS_OPT([+Olibmerrno])
548548
fi
549549

550-
AC_SUBST(CFLAGS_VECTOR, $CFLAGS_VECTOR)
550+
AC_SUBST(CFLAGS_VECTOR)
551551

552552
# Determine flags used to emit bitcode for JIT inlining. Need to test
553553
# for behaviour changing compiler flags, to keep compatibility with
@@ -607,8 +607,11 @@ CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
607607
BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
608608
BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
609609

610-
AC_SUBST(BITCODE_CFLAGS, $BITCODE_CFLAGS)
611-
AC_SUBST(BITCODE_CXXFLAGS, $BITCODE_CXXFLAGS)
610+
AC_SUBST(BITCODE_CFLAGS)
611+
AC_SUBST(BITCODE_CXXFLAGS)
612+
613+
# The template file must set up CFLAGS_SL; we don't support user override
614+
AC_SUBST(CFLAGS_SL)
612615

613616
# Check if the compiler still works with the final flag settings
614617
# (note, we're not checking that for CXX, which is optional)

‎src/Makefile.global.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ GCC = @GCC@
258258
SUN_STUDIO_CC = @SUN_STUDIO_CC@
259259
CXX = @CXX@
260260
CFLAGS = @CFLAGS@
261+
CFLAGS_SL = @CFLAGS_SL@
261262
CFLAGS_VECTOR = @CFLAGS_VECTOR@
262263
CFLAGS_SSE42 = @CFLAGS_SSE42@
263264
CFLAGS_ARMV8_CRC32C = @CFLAGS_ARMV8_CRC32C@

‎src/makefiles/Makefile.cygwin‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LIBS:=$(filter-out -lm -lc, $(LIBS))
1212

1313
AROPT = crs
1414
DLSUFFIX = .dll
15-
CFLAGS_SL =
1615

1716
override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
1817

‎src/makefiles/Makefile.freebsd‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ rpath = -Wl,-R'$(rpathdir)'
55

66
DLSUFFIX = .so
77

8-
CFLAGS_SL = -fPIC -DPIC
9-
108
# extra stuff for $(with_temp_install)
119
# we need this to get LD_LIBRARY_PATH searched ahead of the compiled-in
1210
# rpath, if no DT_RUNPATH is present in the executable. The conditions

‎src/makefiles/Makefile.hpux‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ ifeq ($(host_cpu), ia64)
3030
else
3131
DLSUFFIX = .sl
3232
endif
33-
ifeq ($(GCC), yes)
34-
CFLAGS_SL = -fPIC
35-
else
36-
CFLAGS_SL = +Z
37-
endif
3833

3934
# env var name to use in place of LD_LIBRARY_PATH
4035
ld_library_path_var = SHLIB_PATH

‎src/makefiles/Makefile.linux‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ rpath = -Wl,-rpath,'$(rpathdir)',--enable-new-dtags
77

88
DLSUFFIX = .so
99

10-
CFLAGS_SL = -fPIC
11-
1210

1311
# Rule for building a shared library from a single .o file
1412
%.so: %.o

‎src/makefiles/Makefile.netbsd‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ rpath = -Wl,-R'$(rpathdir)'
55

66
DLSUFFIX = .so
77

8-
CFLAGS_SL = -fPIC -DPIC
9-
108

119
# Rule for building a shared library from a single .o file
1210
%.so: %.o

‎src/makefiles/Makefile.openbsd‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ rpath = -Wl,-R'$(rpathdir)'
55

66
DLSUFFIX = .so
77

8-
CFLAGS_SL = -fPIC -DPIC
9-
108

119
# Rule for building a shared library from a single .o file
1210
%.so: %.o

‎src/makefiles/Makefile.solaris‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ rpath = -Wl,-R'$(rpathdir)'
1010
endif
1111

1212
DLSUFFIX = .so
13-
ifeq ($(GCC), yes)
14-
CFLAGS_SL = -fPIC
15-
else
16-
CFLAGS_SL = -KPIC
17-
endif
13+
1814

1915
# Rule for building a shared library from a single .o file
2016
%.so: %.o

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp