1From 6d1c1350977d74fb2239f765bd92a5763cd3bb73 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
14Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
15
16---
17 Makefile.system | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/Makefile.system b/Makefile.system
21index 1e30d05a..04b0be16 100644
22--- a/Makefile.system
23+++ b/Makefile.system
24@@ -1216,11 +1216,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.26.2
40
41