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.
This commit is contained in:
Bruce Momjian 2003-10-09 03:20:34 +00:00
parent c1a0d72da6
commit 0e22cb1232
24 changed files with 22 additions and 53 deletions

4
configure vendored
View file

@ -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

View file

@ -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

View file

@ -1 +0,0 @@
CFLAGS='-O2'

View file

@ -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

View file

@ -1,2 +1 @@
CFLAGS='-O2'
SRCH_LIB='/usr/local/lib'

View file

@ -1 +0,0 @@
CFLAGS=

View file

@ -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

View file

@ -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

View file

@ -1 +0,0 @@
CFLAGS=

View file

@ -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"

View file

@ -1,4 +1,2 @@
CFLAGS='-O2 -pipe'
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=yes # 1.6 2003-09-14

View file

@ -1,4 +1,3 @@
AROPT=rc
CFLAGS=
SHARED_LIB=
DLSUFFIX=.o

View file

@ -1 +0,0 @@
CFLAGS='-O2 -pipe'

View file

@ -1,6 +1,4 @@
if test "$GCC" = yes ; then
CFLAGS=
else
if test "$GCC" != yes ; then
CC="$CC -std"
CFLAGS='-O4 -Olimit 2000'
fi

View file

@ -1,2 +1,2 @@
CFLAGS=-I/usr/local/include
LIBS=-lunix
CFLAGS="-O2 -I/usr/local/include"
LIBS="-lunix"

View file

@ -1,7 +1,2 @@
if test "$GCC" = yes; then
CFLAGS=-O2
else
CFLAGS=-O
fi
CC="$CC -b elf"

View file

@ -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

View file

@ -1 +0,0 @@
CFLAGS=

View file

@ -1 +0,0 @@
CFLAGS=

View file

@ -1 +0,0 @@
CFLAGS=

View file

@ -1,2 +1,2 @@
CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'
LIBS=-lc89
LIBS="-lc89"

View file

@ -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

View file

@ -1,3 +0,0 @@
if test "$GCC" = yes; then
CFLAGS="-O2"
fi

View file

@ -1,3 +0,0 @@
if test "$GCC" = yes; then
CFLAGS="-O2"
fi