profiles/prefix/solaris/5.10: set -std=c99 for flex
authorMichael Haubenwallner <haubi@gentoo.org>
Mon, 13 Mar 2017 10:02:44 +0000 (11:02 +0100)
committerMichael Haubenwallner <haubi@gentoo.org>
Mon, 13 Mar 2017 10:02:44 +0000 (11:02 +0100)
profiles/prefix/sunos/solaris/5.10/profile.bashrc [new file with mode: 0644]

diff --git a/profiles/prefix/sunos/solaris/5.10/profile.bashrc b/profiles/prefix/sunos/solaris/5.10/profile.bashrc
new file mode 100644 (file)
index 0000000..1999762
--- /dev/null
@@ -0,0 +1,10 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [[ ${EBUILD_PHASE} == setup ]] ; then
+       if [[ ${CATEGORY}/${PN} == sys-devel/flex ]] ; then
+               # Solaris 10's <stdbool.h> requires the C99 standard
+               [[ " ${CFLAGS} "   == *" -std=c99 "* ]] || CFLAGS="-std=c99 ${CFLAGS}"
+               [[ " ${CXXFLAGS} " == *" -std=c99 "* ]] || CXXFLAGS="-std=c99 ${CXXFLAGS}"
+       fi
+fi