[xulrunner] Build with -fpermissive
Christopher Aillon
caillon at fedoraproject.org
Tue Jan 25 20:13:56 UTC 2011
commit 361738c81f7c9e18a64b3da45b1169987da5b68a
Author: Christopher Aillon <caillon at redhat.com>
Date: Tue Jan 25 09:06:35 2011 -0800
Build with -fpermissive
GCC 4.6 got stricter. Enable this for now so we can build.
Also, fix up the comment about exceptions.
xulrunner.spec | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/xulrunner.spec b/xulrunner.spec
index 21b0d87..3c4294a 100644
--- a/xulrunner.spec
+++ b/xulrunner.spec
@@ -196,11 +196,16 @@ cd %{tarballdir}
INTERNAL_GECKO=%{version_internal}
MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO}
+
+# -fpermissive is needed to build with gcc 4.6+ which has become stricter
+#
# Mozilla builds with -Wall with exception of a few warnings which show up
# everywhere in the code; so, don't override that.
-# and disable C++ exceptions
-MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | \
- %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
+#
+# Disable C++ exceptions since Mozilla code is not exception-safe
+#
+MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \
+ %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
export CFLAGS=$MOZ_OPT_FLAGS
export CXXFLAGS=$MOZ_OPT_FLAGS
More information about the scm-commits
mailing list