summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-01-30 09:41:12 +0000
committerDmitry Stogov <dmitry@php.net>2008-01-30 09:41:12 +0000
commit240fa244c345141b13485713f16525c169ffa49a (patch)
tree0addb4de1f48312bcac53d8f8d7863ff0fdf325f /configure.in
parent71efa394a6e17fa2552ccbbf454bb0f33429a8b2 (diff)
downloadphp-git-240fa244c345141b13485713f16525c169ffa49a.tar.gz
Improved PHP binary size and startup speed with GCC4 visibility control (Nuno)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index b627a676ec..e5dff11c71 100644
--- a/configure.in
+++ b/configure.in
@@ -165,6 +165,14 @@ alpha*)
;;
esac
+dnl activate some gcc specific optimizations for gcc >= 4
+if test "$GCC" = "yes"; then
+ GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'`
+ if test $GCC_MAJOR_VERSION -ge 4; then
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ fi
+fi
+
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"