From b6f55eac14a2db703b1fae978a51dc6668301595 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 4 Nov 2018 21:14:35 +0000 Subject: [PATCH] Problem: unity build broken with Sun Studio Solution: define UNITY_WEAK_PRAGMA when building with the Sun compiler as it does not support the weak attribute. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 00b3b7a1..254005b9 100644 --- a/configure.ac +++ b/configure.ac @@ -322,10 +322,11 @@ case "${host_os}" in ;; esac -# Sun Studio does not like anonymous structures in unions +# Sun Studio does not like anonymous structures in unions and does not have weak attribute if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then CXXFLAGS="${CXXFLAGS} -features=extensions" CFLAGS="${CFLAGS} -features=extensions" + CPPFLAGS="${CPPFLAGS} -DUNITY_WEAK_PRAGMA" fi # Checks for libraries