From: Dongkyun Son Date: Thu, 18 Jan 2024 08:02:38 +0000 (+0900) Subject: Base-Toolchain: optimize option O2 -> Os X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F304514%2F2;p=scm%2Fmeta%2Fqb.git Base-Toolchain: optimize option O2 -> Os Binary size and performance need to be evaluated with the change. -Os Optimize for size. -Os enables all -O2 optimizations except those that often increase code size: -falign-functions -falign-jumps -falign-labels -falign-loops -fprefetch-loop-arrays -freorder-blocks-algorithm=stc It also enables -finline-functions, causes the compiler to tune for code size rather than execution speed, and performs further optimizations designed to reduce code size. Change-Id: I5d7d0ebfa3f0d311439e0b67aa3def8e02fc52c6 Signed-off-by: Dongkyun Son --- diff --git a/TIZEN/Tizen/Tizen-Base-Toolchain/project_config b/TIZEN/Tizen/Tizen-Base-Toolchain/project_config index 73ede57..6c92223 100644 --- a/TIZEN/Tizen/Tizen-Base-Toolchain/project_config +++ b/TIZEN/Tizen/Tizen-Base-Toolchain/project_config @@ -244,7 +244,7 @@ Substitute: glibc-devel-32bit %endif ########## compilation flags ########## -%define __global_cflags -O2 -g2 -gdwarf-4 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -frecord-gcc-switches -Wl,-z,relro,--as-needed +%define __global_cflags -Os -g2 -gdwarf-4 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -frecord-gcc-switches -Wl,-z,relro,--as-needed Optflags: armv7l %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -D_FILE_OFFSET_BITS=64 Optflags: armv7hl %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -mthumb -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -D_FILE_OFFSET_BITS=64