build: fix AIX xlc autotools build (#3588)
This commit is contained in:
parent
223e526f27
commit
7233c428ec
@ -28,7 +28,9 @@ AM_PROG_CC_C_O
|
|||||||
CC_ATTRIBUTE_VISIBILITY([default], [
|
CC_ATTRIBUTE_VISIBILITY([default], [
|
||||||
CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"])
|
CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"])
|
||||||
])
|
])
|
||||||
CC_CHECK_CFLAGS_APPEND([-fno-strict-aliasing])
|
# Xlc has a flag "-f<filename>". Need to use CC_CHECK_FLAG_SUPPORTED_APPEND so
|
||||||
|
# we exclude -fno-strict-aliasing for xlc
|
||||||
|
CC_CHECK_FLAG_SUPPORTED_APPEND([-fno-strict-aliasing])
|
||||||
CC_CHECK_CFLAGS_APPEND([-g])
|
CC_CHECK_CFLAGS_APPEND([-g])
|
||||||
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
|
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
|
||||||
CC_CHECK_CFLAGS_APPEND([-Wall])
|
CC_CHECK_CFLAGS_APPEND([-Wall])
|
||||||
|
|||||||
@ -104,6 +104,20 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
|
|||||||
[$2], [$3])
|
[$2], [$3])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl Check if flag is supported by both compiler and linker
|
||||||
|
dnl If so, append it to AM_CFLAGS
|
||||||
|
dnl CC_CHECK_FLAG_SUPPORTED_APPEND([FLAG])
|
||||||
|
|
||||||
|
AC_DEFUN([CC_CHECK_FLAG_SUPPORTED_APPEND], [
|
||||||
|
CC_CHECK_CFLAGS([$1],
|
||||||
|
[CC_CHECK_LDFLAGS([$1],
|
||||||
|
[AM_CFLAGS="$AM_CFLAGS $1";
|
||||||
|
DEBUG_CFLAGS="$DEBUG_CFLAGS $1";
|
||||||
|
AC_SUBST([AM_CFLAGS])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
|
dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
|
||||||
dnl the current linker to avoid undefined references in a shared object.
|
dnl the current linker to avoid undefined references in a shared object.
|
||||||
AC_DEFUN([CC_NOUNDEFINED], [
|
AC_DEFUN([CC_NOUNDEFINED], [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user