diff options
| author | Joe Watkins <krakjoe@php.net> | 2017-01-06 08:13:53 +0000 |
|---|---|---|
| committer | Joe Watkins <krakjoe@php.net> | 2017-01-06 08:13:53 +0000 |
| commit | 9e18b6e21e3f837fa183edcab2ac94730fa39473 (patch) | |
| tree | 7e44d0697f04b1458b82fc9b256ae98fad2bff5a /configure.in | |
| parent | a319e09e87265d3de4f10946e214bac9279b9655 (diff) | |
| parent | 672178ff2c5ca8f82836d0b8f8a7657b762bb5d0 (diff) | |
| download | php-git-9e18b6e21e3f837fa183edcab2ac94730fa39473.tar.gz | |
Merge branch 'pull-request/2124'
* pull-request/2124:
Use AX_CHECK_COMPILE_FLAG macro to check for -fvisibility=hidden
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/configure.in b/configure.in index ea52783903..73ecb9be38 100644 --- a/configure.in +++ b/configure.in @@ -271,20 +271,10 @@ case $host_cpu in ;; esac -dnl activate some gcc specific optimizations for gcc >= 4 -if test "$GCC" = "yes"; then - case $host_alias in - *darwin*) - GCC_MAJOR_VERSION=`$CC -dumpversion | /usr/bin/sed -nE '1s/([[0-9]]+)\.[[0-9]]+\..*/\1/;1p'` - ;; - *) - GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*//;1s/\..*//;1p'` - ;; - esac - if test $GCC_MAJOR_VERSION -ge 4; then - CFLAGS="$CFLAGS -fvisibility=hidden" - fi -fi +dnl Mark symbols hidden by default if the compiler (for example, gcc >= 4) +dnl supports it. This can help reduce the binary size and startup time. +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], + [CFLAGS="$CFLAGS -fvisibility=hidden"]) case $host_alias in *solaris*) |
