summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorIsmael Luceno2019-07-17 10:38:50 +0200
committerIsmael Luceno2019-07-17 20:30:39 +0200
commit327c7ca852b931540314f3071f3e6363b48c57c8 (patch)
tree93647ab22a2e5416205ef9139c961d7429e55fb1 /gnu
parent01239b9310496576212cb37ca52d9f4e94aa0838 (diff)
gcc: Use -O1 for older GCC only
Diffstat (limited to 'gnu')
-rwxr-xr-xgnu/gcc/BUILD4
-rw-r--r--gnu/gcc/HISTORY3
2 files changed, 6 insertions, 1 deletions
diff --git a/gnu/gcc/BUILD b/gnu/gcc/BUILD
index 700f161480..c579bc6ea0 100755
--- a/gnu/gcc/BUILD
+++ b/gnu/gcc/BUILD
@@ -37,7 +37,9 @@ if [[ "$ARCHITECTURE" == "pentium4" ||
fi &&
# fixes seg-fault on libiberty/splay.c in v 4.3.2
-CFLAGS="-O1 $CFLAGS" &&
+if is_version_less $(installed_version $SPELL) 5.0.0; then
+ CFLAGS="-O1 $CFLAGS"
+fi &&
if [[ $CROSS_INSTALL == on ]]; then
OPTS="--host=$HOST $OPTS"
diff --git a/gnu/gcc/HISTORY b/gnu/gcc/HISTORY
index c33f8cbbb9..1bc34d9bfc 100644
--- a/gnu/gcc/HISTORY
+++ b/gnu/gcc/HISTORY
@@ -1,3 +1,6 @@
+2019-07-17 Ismael Luceno <ismael@sourcemage.org>
+ * BUILD: Use -O1 for older GCC only
+
2019-05-28 Ismael Luceno <ismael@sourcemage.org>
* BUILD: Disabled multilib unconditionally for musl