mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
Check if gcc supports -fvisibility=hidden before adding to CFLAGS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
parent
aec3fe82e4
commit
adda7f3215
1 changed files with 8 additions and 1 deletions
|
|
@ -96,7 +96,14 @@ esac
|
|||
|
||||
dnl Add flags for gcc and g++
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden"
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math"
|
||||
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
save_CFLAGS="$CFLAGS"
|
||||
AC_MSG_CHECKING([whether $(CC) supports -fvisibility=hidden])
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
|
||||
[CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]);
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue