[thunderbird] Don't overwrite CFLAGS/CXXFLAGS
Christopher Aillon
caillon at fedoraproject.org
Sat Jan 29 22:56:56 UTC 2011
commit 7ea5b261d908e75c59ce892d2785db10776c43c4
Author: Christopher Aillon <caillon at redhat.com>
Date: Sat Jan 29 14:49:17 2011 -0800
Don't overwrite CFLAGS/CXXFLAGS
The -debuginfo mozconfig was stomping on our CFLAGS/CXXFLAGS.
Stop passing them in via the configure flag and just pass them
via their environment variables.
thunderbird-mozconfig | 2 +-
thunderbird-mozconfig-debuginfo | 4 ++--
thunderbird.spec | 15 +++++++++++----
3 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/thunderbird-mozconfig b/thunderbird-mozconfig
index e338eda..e1e915d 100644
--- a/thunderbird-mozconfig
+++ b/thunderbird-mozconfig
@@ -15,7 +15,7 @@ ac_add_options --with-pthreads
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-installer
-ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
+ac_add_options --enable-optimize
ac_add_options --enable-xinerama
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-xprint
diff --git a/thunderbird-mozconfig-debuginfo b/thunderbird-mozconfig-debuginfo
index 5fb7e30..4dd2427 100644
--- a/thunderbird-mozconfig-debuginfo
+++ b/thunderbird-mozconfig-debuginfo
@@ -1,5 +1,5 @@
# For mozilla's debuginfo:
-export CFLAGS="-gdwarf-2"
-export CXXFLAGS="-gdwarf-2"
+export CFLAGS="$CFLAGS -gdwarf-2"
+export CXXFLAGS="$CXXFLAGS -gdwarf-2"
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-crashreporter
diff --git a/thunderbird.spec b/thunderbird.spec
index 9a84043..d0672ed 100644
--- a/thunderbird.spec
+++ b/thunderbird.spec
@@ -195,11 +195,18 @@ cd %{tarballdir}
INTERNAL_GECKO=%{version_internal}
MOZ_APP_DIR=%{mozappdir}
-# Build with -Os as it helps the browser; also, don't override mozilla's warning
-# level; they use -Wall but disable a few warnings that show up _everywhere_
-MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-O2/-Os/' -e 's/-Wall//')
+# -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.
+#
+# 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
-export RPM_OPT_FLAGS=$MOZ_OPT_FLAGS
export PREFIX='%{_prefix}'
export LIBDIR='%{_libdir}'
More information about the scm-commits
mailing list