[Buildroot] [PATCH] utils/genrandconfig: Add level 2 optimization option

Evgeniy Didin Evgeniy.Didin at synopsys.com
Mon Dec 3 17:54:30 UTC 2018

Currently all random defconfigs which are used in autobuilder 
use size optimizaion(-Os).
Adding "-O2" optimization will give better test coverage.
In many cases software gets built with speed optimization rather 
than size optimization. So let's add Level 2 optimizaion option 
to be genertated in random defconfigs, so we could be able to test
how packages are built with "-O2" in autobuilder.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin at synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: arc-buildroot at synopsys.com
 utils/genrandconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/genrandconfig b/utils/genrandconfig
index 1d6ff990f5..35c7cbd14c 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -366,6 +366,8 @@ def gen_config(args):
     if randint(0, 20) == 0:
+    if randint(0,5) == 0:
+	configlines.append("BR2_OPTIMIZE_2=y\n")
     # Write out the configuration file
     if not os.path.exists(args.outputdir):

More information about the buildroot mailing list