git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1a0d72)
This centralizes the optimization defaults into configure.in, rather
Thu, 9 Oct 2003 03:20:34 +0000 (03:20 +0000)
Thu, 9 Oct 2003 03:20:34 +0000 (03:20 +0000)
than having CFLAGS= in the template files.

It uses -O2 for gcc (generated by autoconf), and -O for non-gcc, unless
the template overrides it.

24 files changed:

diff --git a/configure b/configure
index c4bb3df6018d0dd707f005c2677f8f4c10a561df..0ee499a304d9e3f6834dc6858ea5cbe443e947d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -2393,6 +2393,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$ac_env_CFLAGS_set" = set; then
CFLAGS=$ac_env_CFLAGS_value
fi
+# configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
+if test x"$CFLAGS" = x""; then
+ CFLAGS="-O"
+fi
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
CFLAGS="$CFLAGS -g"
fi
diff --git a/configure.in b/configure.in
index 62ede6dde0019677790107548d8f961730e8874b..18d612729b67eb77656abbfe3911fe14fefad202 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.293 2003年10月03日 03:08:14 pgsql Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.294 2003年10月09日 03:20:33 momjian Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -238,6 +238,10 @@ AC_PROG_CC([$pgac_cc_list])
if test "$ac_env_CFLAGS_set" = set; then
CFLAGS=$ac_env_CFLAGS_value
fi
+# configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
+if test x"$CFLAGS" = x""; then
+ CFLAGS="-O"
+fi
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
CFLAGS="$CFLAGS -g"
fi
diff --git a/src/template/beos b/src/template/beos
index c435200929cfbf5a37ef1f1b2ae290bb7fd6297c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/beos
+++ b/src/template/beos
@@ -1 +0,0 @@
-CFLAGS='-O2'
diff --git a/src/template/bsdi b/src/template/bsdi
index acb2c42d3c9a75646bfec88c6366c1a30e12ca5b..5e044ffad2d6c2edcc551a46611bf1c4b4356ba1 100644 (file)
--- a/src/template/bsdi
+++ b/src/template/bsdi
@@ -5,9 +5,7 @@ case $host_cpu in
esac
case $host_os in
- bsdi2.0 | bsdi2.1 | bsdi3*)
- CC=gcc2
- ;;
+ bsdi2.0 | bsdi2.1 | bsdi3*) CC=gcc2;;
esac
THREAD_SUPPORT=yes
diff --git a/src/template/cygwin b/src/template/cygwin
index eb8921984aab2f1cc04534a72628e63068943650..8a9fa0051eacb459cd0b6694fb18e48d27fbcc30 100644 (file)
--- a/src/template/cygwin
+++ b/src/template/cygwin
@@ -1,2 +1 @@
-CFLAGS='-O2'
SRCH_LIB='/usr/local/lib'
diff --git a/src/template/dgux b/src/template/dgux
index 7abc138a9f95dfa0a3db3f20fb88b58abe4309ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/dgux
+++ b/src/template/dgux
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/freebsd b/src/template/freebsd
index 082afc077b29646946eb7aca0affc25682db9792..651593232d3138d74f46f01034ed31103d176748 100644 (file)
--- a/src/template/freebsd
+++ b/src/template/freebsd
@@ -1,17 +1,11 @@
-CFLAGS='-pipe'
-
case $host_cpu in
- alpha*) CFLAGS="$CFLAGS -O" ;;
+ alpha*) CFLAGS="-O";;
esac
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes
THREAD_CPPFLAGS="-D_THREAD_SAFE"
case $host_os in
- freebsd2*|freebsd3*|freebsd4*)
- THREAD_LIBS="-pthread"
- ;;
- *)
- THREAD_LIBS="-lc_r"
- ;;
+ freebsd2*|freebsd3*|freebsd4*) THREAD_LIBS="-pthread";;
+ *) THREAD_LIBS="-lc_r";;
esac
diff --git a/src/template/hpux b/src/template/hpux
index 34a5e8614426748ee1ad2d512d6c7e44af5b56d5..28d836e0120483cd3721efb76f87fff14ee4ebf1 100644 (file)
--- a/src/template/hpux
+++ b/src/template/hpux
@@ -1,8 +1,6 @@
-if test "$GCC" = yes ; then
- CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED"
- CFLAGS="-O2"
-else
+CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED"
+
+if test "$GCC" != yes ; then
CC="$CC -Ae"
- CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED"
CFLAGS="+O2"
fi
diff --git a/src/template/irix5 b/src/template/irix5
index 7abc138a9f95dfa0a3db3f20fb88b58abe4309ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/irix5
+++ b/src/template/irix5
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/linux b/src/template/linux
index 44b046033abbb538dba8604ecd864ac2277672ca..529da9c1694e84d9ea05d73ab64e9dc61bd0cd8a 100644 (file)
--- a/src/template/linux
+++ b/src/template/linux
@@ -1,4 +1,3 @@
-CFLAGS=-O2
# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
CPPFLAGS="-D_GNU_SOURCE"
@@ -6,4 +5,3 @@ THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes # Debian kernel 2.2 2003年09月27日
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"
-
diff --git a/src/template/netbsd b/src/template/netbsd
index f510dc9ef0c47305e2921d36b017296b9d45480d..0d119a0136183f43de1e428b05fd0615805b7119 100644 (file)
--- a/src/template/netbsd
+++ b/src/template/netbsd
@@ -1,4 +1,2 @@
-CFLAGS='-O2 -pipe'
-
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes # 1.6 2003年09月14日
diff --git a/src/template/nextstep b/src/template/nextstep
index c8b14f4d8b73132a621b673a74ca317c59b29a86..d6b3c35e6cb53b86880d0f9ed64536a59d43404b 100644 (file)
--- a/src/template/nextstep
+++ b/src/template/nextstep
@@ -1,4 +1,3 @@
AROPT=rc
-CFLAGS=
SHARED_LIB=
DLSUFFIX=.o
diff --git a/src/template/openbsd b/src/template/openbsd
index bfbcbdd59755014424118ae8abec0bfcb1abe81d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/openbsd
+++ b/src/template/openbsd
@@ -1 +0,0 @@
-CFLAGS='-O2 -pipe'
diff --git a/src/template/osf b/src/template/osf
index b5c60413de88b39641489a9337625e679ff79a77..133a4516ab00b9682ce746b853ad4f8defe590ce 100644 (file)
--- a/src/template/osf
+++ b/src/template/osf
@@ -1,6 +1,4 @@
-if test "$GCC" = yes ; then
- CFLAGS=
-else
+if test "$GCC" != yes ; then
CC="$CC -std"
CFLAGS='-O4 -Olimit 2000'
fi
diff --git a/src/template/qnx4 b/src/template/qnx4
index d153324b9a6cbe992efbc440e21e7dc07425b2d2..c4bc9531b91e705edd8c739ab2f643ca78d93e24 100644 (file)
--- a/src/template/qnx4
+++ b/src/template/qnx4
@@ -1,2 +1,2 @@
-CFLAGS=-I/usr/local/include
-LIBS=-lunix
+CFLAGS="-O2 -I/usr/local/include"
+LIBS="-lunix"
diff --git a/src/template/sco b/src/template/sco
index 3126e062cedf1f3fe93769f36bbce9eb0fd98060..e0b08471db1d1cf75e656c3e6f1692fbf58c3d0c 100644 (file)
--- a/src/template/sco
+++ b/src/template/sco
@@ -1,7 +1,2 @@
-if test "$GCC" = yes; then
- CFLAGS=-O2
-else
- CFLAGS=-O
-fi
CC="$CC -b elf"
diff --git a/src/template/solaris b/src/template/solaris
index 083b1d3659fa37ea8982a9dd1d555e01d5ecab5b..f5ff36064bebc2c91730ed535edadb7f6058aeda 100644 (file)
--- a/src/template/solaris
+++ b/src/template/solaris
@@ -1,8 +1,6 @@
-if test "$GCC" = yes ; then
- CFLAGS=
-else
+if test "$GCC" != yes ; then
CC="$CC -Xa" # relaxed ISO C mode
- CFLAGS=-v # -v is like gcc -Wall
+ CFLAGS="-O -v" # -v is like gcc -Wall
fi
THREAD_SUPPORT=yes
diff --git a/src/template/sunos4 b/src/template/sunos4
index 7abc138a9f95dfa0a3db3f20fb88b58abe4309ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/sunos4
+++ b/src/template/sunos4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/svr4 b/src/template/svr4
index 7abc138a9f95dfa0a3db3f20fb88b58abe4309ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/svr4
+++ b/src/template/svr4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/ultrix4 b/src/template/ultrix4
index 7abc138a9f95dfa0a3db3f20fb88b58abe4309ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/ultrix4
+++ b/src/template/ultrix4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/univel b/src/template/univel
index 025fbda7bf4d6611b0e376ce47fb07938418de32..d48aa7c3111570f58a1aa29a35b1dba242c4983b 100644 (file)
--- a/src/template/univel
+++ b/src/template/univel
@@ -1,2 +1,2 @@
CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'
-LIBS=-lc89
+LIBS="-lc89"
diff --git a/src/template/unixware b/src/template/unixware
index e1991bcc9c8ad682778be843ad33faa50af8c1f2..cb1381d8fbd48987a7f10911223049004ac88335 100644 (file)
--- a/src/template/unixware
+++ b/src/template/unixware
@@ -1,5 +1,4 @@
if test "$GCC" = yes; then
- CFLAGS=-O2
THREAD_CPPFLAGS="-pthread"
else
# the -Kno_host is temporary for a bug in the compiler. See -hackers
diff --git a/src/template/win b/src/template/win
index 736e0f293d32b3246a6f979d90dbbeaa4d378c29..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/win
+++ b/src/template/win
@@ -1,3 +0,0 @@
-if test "$GCC" = yes; then
- CFLAGS="-O2"
-fi
diff --git a/src/template/win32 b/src/template/win32
index 736e0f293d32b3246a6f979d90dbbeaa4d378c29..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/src/template/win32
+++ b/src/template/win32
@@ -1,3 +0,0 @@
-if test "$GCC" = yes; then
- CFLAGS="-O2"
-fi
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /