aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-10-09 03:20:34 +0000
committerBruce Momjian <bruce@momjian.us>2003-10-09 03:20:34 +0000
commit0e22cb1232f4474f9b461661b621603312f37d3d (patch)
treeabd5f46c27f3bbde748119ed6d135a29c7b3224a /src
parentc1a0d72da6f7b6a6d84d24059a1c2af40aec7ee3 (diff)
downloadpostgresql-0e22cb1232f4474f9b461661b621603312f37d3d.tar.gz
postgresql-0e22cb1232f4474f9b461661b621603312f37d3d.zip
This centralizes the optimization defaults into configure.in, rather
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.
Diffstat (limited to 'src')
-rw-r--r--src/template/beos1
-rw-r--r--src/template/bsdi4
-rw-r--r--src/template/cygwin1
-rw-r--r--src/template/dgux1
-rw-r--r--src/template/freebsd12
-rw-r--r--src/template/hpux8
-rw-r--r--src/template/irix51
-rw-r--r--src/template/linux2
-rw-r--r--src/template/netbsd2
-rw-r--r--src/template/nextstep1
-rw-r--r--src/template/openbsd1
-rw-r--r--src/template/osf4
-rw-r--r--src/template/qnx44
-rw-r--r--src/template/sco5
-rw-r--r--src/template/solaris6
-rw-r--r--src/template/sunos41
-rw-r--r--src/template/svr41
-rw-r--r--src/template/ultrix41
-rw-r--r--src/template/univel2
-rw-r--r--src/template/unixware1
-rw-r--r--src/template/win3
-rw-r--r--src/template/win323
22 files changed, 13 insertions, 52 deletions
diff --git a/src/template/beos b/src/template/beos
index c435200929c..e69de29bb2d 100644
--- a/src/template/beos
+++ b/src/template/beos
@@ -1 +0,0 @@
-CFLAGS='-O2'
diff --git a/src/template/bsdi b/src/template/bsdi
index acb2c42d3c9..5e044ffad2d 100644
--- 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 eb8921984aa..8a9fa0051ea 100644
--- 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 7abc138a9f9..e69de29bb2d 100644
--- a/src/template/dgux
+++ b/src/template/dgux
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/freebsd b/src/template/freebsd
index 082afc077b2..651593232d3 100644
--- 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 34a5e861442..28d836e0120 100644
--- 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 7abc138a9f9..e69de29bb2d 100644
--- a/src/template/irix5
+++ b/src/template/irix5
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/linux b/src/template/linux
index 44b046033ab..529da9c1694 100644
--- 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 f510dc9ef0c..0d119a01361 100644
--- 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 c8b14f4d8b7..d6b3c35e6cb 100644
--- 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 bfbcbdd5975..e69de29bb2d 100644
--- 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 b5c60413de8..133a4516ab0 100644
--- 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 d153324b9a6..c4bc9531b91 100644
--- 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 3126e062ced..e0b08471db1 100644
--- 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 083b1d3659f..f5ff36064be 100644
--- 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 7abc138a9f9..e69de29bb2d 100644
--- a/src/template/sunos4
+++ b/src/template/sunos4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/svr4 b/src/template/svr4
index 7abc138a9f9..e69de29bb2d 100644
--- a/src/template/svr4
+++ b/src/template/svr4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/ultrix4 b/src/template/ultrix4
index 7abc138a9f9..e69de29bb2d 100644
--- a/src/template/ultrix4
+++ b/src/template/ultrix4
@@ -1 +0,0 @@
-CFLAGS=
diff --git a/src/template/univel b/src/template/univel
index 025fbda7bf4..d48aa7c3111 100644
--- 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 e1991bcc9c8..cb1381d8fbd 100644
--- 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 736e0f293d3..e69de29bb2d 100644
--- 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 736e0f293d3..e69de29bb2d 100644
--- a/src/template/win32
+++ b/src/template/win32
@@ -1,3 +0,0 @@
-if test "$GCC" = yes; then
- CFLAGS="-O2"
-fi