From 228a77e52c4e858775b10c4bce6f242327df786f Mon Sep 17 00:00:00 2001 From: "Jory A. Pratt" Date: Wed, 31 May 2017 15:43:43 -0500 Subject: [PATCH] eclass/mozcoreconf-v5: Work around the default optimization level of -Os Signed-off-by: Jory A. Pratt --- eclass/mozcoreconf-v5.eclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eclass/mozcoreconf-v5.eclass b/eclass/mozcoreconf-v5.eclass index 4ecfbd8..a769547 100644 --- a/eclass/mozcoreconf-v5.eclass +++ b/eclass/mozcoreconf-v5.eclass @@ -178,8 +178,12 @@ mozconfig_init() { mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2 fi else - # Enable Mozilla's default - mozconfig_annotate "mozilla default" --enable-optimize + if [[ $(gcc-major-version) -ge 7 ]]; then + mozconfig_annotate "Work around broken gcc-7" --enable-optimize=-O2 + else + # Enable Mozilla's default + mozconfig_annotate "mozilla default" --enable-optimize + fi fi # Strip optimization so it does not end up in compile string -- 2.13.0