mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
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:
parent
c1a0d72da6
commit
0e22cb1232
4
configure
vendored
4
configure
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
CFLAGS='-O2'
|
@ -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
|
||||
|
@ -1,2 +1 @@
|
||||
CFLAGS='-O2'
|
||||
SRCH_LIB='/usr/local/lib'
|
||||
|
@ -1 +0,0 @@
|
||||
CFLAGS=
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
CFLAGS=
|
@ -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"
|
||||
|
||||
|
@ -1,4 +1,2 @@
|
||||
CFLAGS='-O2 -pipe'
|
||||
|
||||
THREAD_SUPPORT=yes
|
||||
NEED_REENTRANT_FUNCS=yes # 1.6 2003-09-14
|
||||
|
@ -1,4 +1,3 @@
|
||||
AROPT=rc
|
||||
CFLAGS=
|
||||
SHARED_LIB=
|
||||
DLSUFFIX=.o
|
||||
|
@ -1 +0,0 @@
|
||||
CFLAGS='-O2 -pipe'
|
@ -1,6 +1,4 @@
|
||||
if test "$GCC" = yes ; then
|
||||
CFLAGS=
|
||||
else
|
||||
if test "$GCC" != yes ; then
|
||||
CC="$CC -std"
|
||||
CFLAGS='-O4 -Olimit 2000'
|
||||
fi
|
||||
|
@ -1,2 +1,2 @@
|
||||
CFLAGS=-I/usr/local/include
|
||||
LIBS=-lunix
|
||||
CFLAGS="-O2 -I/usr/local/include"
|
||||
LIBS="-lunix"
|
||||
|
@ -1,7 +1,2 @@
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS=-O2
|
||||
else
|
||||
CFLAGS=-O
|
||||
fi
|
||||
CC="$CC -b elf"
|
||||
|
||||
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
CFLAGS=
|
@ -1 +0,0 @@
|
||||
CFLAGS=
|
@ -1 +0,0 @@
|
||||
CFLAGS=
|
@ -1,2 +1,2 @@
|
||||
CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'
|
||||
LIBS=-lc89
|
||||
LIBS="-lc89"
|
||||
|
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-O2"
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-O2"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user