Home
last modified time | relevance | path

Searched hist:ebc961da06680687c2e2d1334c5c090556014fb1 (Results 1 – 1 of 1) sorted by relevance

/optee_os/lib/libutils/isoc/newlib/
H A Dsub.mkebc961da06680687c2e2d1334c5c090556014fb1 Fri Sep 11 14:57:52 UTC 2020 Jerome Forissier <jerome@forissier.org> libutils: memset(): add -O2 only if optimization is -Os

Commit 5b2aaa117eee ("libutee: optimize memcpy() for speed") added -O2
to memset.c to exclude the slower implementation which would be selected
when level is -Os (in which case __OPTIMIZE_SIZE__ is defined).

Since the optimization level can now be selected globally with
CFG_CC_OPT_LEVEL, -O2 should not be forced unconditionally or it could
actually reduce the desired level (when CFG_CC_OPT_LEVEL=3).

Therefore, add -O2 only if the global optimization is -Os.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>