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.
This commit is contained in:
Christopher Aillon 2011-01-29 14:49:17 -08:00
parent 67c9b696e1
commit 7ea5b261d9
3 changed files with 14 additions and 7 deletions

View File

@ -15,7 +15,7 @@ ac_add_options --with-pthreads
ac_add_options --disable-tests ac_add_options --disable-tests
ac_add_options --disable-debug ac_add_options --disable-debug
ac_add_options --disable-installer 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-xinerama
ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-xprint ac_add_options --disable-xprint

View File

@ -1,5 +1,5 @@
# For mozilla's debuginfo: # For mozilla's debuginfo:
export CFLAGS="-gdwarf-2" export CFLAGS="$CFLAGS -gdwarf-2"
export CXXFLAGS="-gdwarf-2" export CXXFLAGS="$CXXFLAGS -gdwarf-2"
export MOZ_DEBUG_SYMBOLS=1 export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-crashreporter ac_add_options --enable-crashreporter

View File

@ -195,11 +195,18 @@ cd %{tarballdir}
INTERNAL_GECKO=%{version_internal} INTERNAL_GECKO=%{version_internal}
MOZ_APP_DIR=%{mozappdir} MOZ_APP_DIR=%{mozappdir}
# Build with -Os as it helps the browser; also, don't override mozilla's warning # -fpermissive is needed to build with gcc 4.6+ which has become stricter
# 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//') # 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 PREFIX='%{_prefix}'
export LIBDIR='%{_libdir}' export LIBDIR='%{_libdir}'