1From 89648b76e35dc4657942c861ed9dbfbfe5a3df28 Mon Sep 17 00:00:00 2001
2From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
3Date: Fri, 5 Mar 2021 14:09:23 +0100
4Subject: [PATCH] Makefile.system: don't specify optimization level
5 [buildroot-specific]
6
7Buildroot will pass an optimization level, but it is ignored because the
8openblas makefiles _append_ to the flags passed on the command-line.
9
10The CFLAGS/FFLAGS would e.g. contain '-Os -O2' in which -O2 survives.
11
12Remove the optimization level specified in openblas itself.
13
14Upstream: N/A, not upstreamable
15Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
16---
17 Makefile.system | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/Makefile.system b/Makefile.system
21index 343b94bb3..c355ca5d9 100644
22--- a/Makefile.system
23+++ b/Makefile.system
24@@ -1585,11 +1585,11 @@ FCOMMON_OPT += -g
25 endif
26
27 ifndef COMMON_OPT
28-COMMON_OPT = -O2
29+COMMON_OPT =
30 endif
31
32 ifndef FCOMMON_OPT
33-FCOMMON_OPT = -O2 -frecursive
34+FCOMMON_OPT = -frecursive
35 endif
36
37 override CFLAGS     += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
38--
392.40.1
40
41