aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Chupin <pavel.v.chupin@intel.com>2013-01-30 12:43:15 +0400
committerPavel Chupin <pavel.v.chupin@intel.com>2013-01-30 18:51:01 +0400
commit1104ace93b96fa87752eb8198a772592c0846bdd (patch)
tree7a499c4c38715cd7acfd091b0dfc3392ebbd5861
parentde36c1312eaf8d1b23a8d79244675f395c361e73 (diff)
downloadbuild-1104ace93b96fa87752eb8198a772592c0846bdd.tar.gz
Define correct default gcc target march/mtune/mfpmath flags for x86
This is required to enforce correct x86 -march/-mtune flags which are currently hardcoded in gcc (see gcc/config/i386/gnu-user.h). The problem is that gcc hardcode doesn't work, it is overridden by generic values. It can be seen with -### option for any compilation. This patch adds correct configure flags and after it is merged -march/-mtune flags in gcc can be removed. Default -mfpmath can't be seen in -### but can be configured as well to eliminate hardcode. Also cleanup old flags which didn't work anyway. target_cpu is i686 and not x86. Change-Id: I43ea7034e855629933da2d1bede90cd74a238861 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
-rw-r--r--Makefile.in28
1 files changed, 2 insertions, 26 deletions
diff --git a/Makefile.in b/Makefile.in
index f55c7c3..c0c7ee2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -463,32 +463,8 @@ GCC_CONFIG_ARGS += $(GCC_CONFIG_LIBSTDCXX_V3) --disable-libssp \
CFLAGS_FOR_TARGET += -DTARGET_POSIX_IO -fno-short-enums
-ifeq ($(target_cpu),x86)
-# Options brought in from core/combo/* for IA
-CFLAGS_FOR_TARGET += \
- -DANDROID -D__ANDROID__ -Ulinux \
- -fPIC -Wa,--noexecstack -m32 -fstack-protector \
- -W -Wall -Werror=address -Werror=format-security -Werror=non-virtual-dtor -Werror=return-type \
- -Werror=sequence-point -Winit-self -Wno-multichar -Wno-unused -Wpointer-arith -Wstrict-aliasing=2 \
- -fexceptions -ffunction-sections -finline-functions \
- -finline-limit=300 -fmessage-length=0 -fno-inline-functions-called-once \
- -fno-strict-aliasing -frtti \
- -fstrict-aliasing -funswitch-loops -funwind-tables \
- -march=i686 -mtune=atom -mbionic -mfpmath=sse -mstackrealign -DUSE_SSE2
-
-LDFLAGS_FOR_TARGET += \
- -m32 -O2 -g -fPIC \
- -nostartfiles \
- -Wl,-z,noexecstack -Wl,--gc-sections -nostdlib \
- -fexceptions -frtti -fstrict-aliasing -ffunction-sections -finline-functions \
- -finline-limit=300 -fno-inline-functions-called-once \
- -funswitch-loops -funwind-tables -mstackrealign \
- -ffunction-sections -funwind-tables -fmessage-length=0 \
- -march=atom -mstackrealign -mfpmath=sse -mbionic \
- -Wno-multichar -Wl,-z,noexecstack -Werror=format-security -Wstrict-aliasing=2 \
- -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor \
- -Werror=address -Werror=sequence-point \
- -Werror=format-security -Wl,--no-undefined
+ifeq ($(target_cpu),i686)
+GCC_CONFIG_ARGS += --with-arch=i686 --with-tune=atom --with-fpmath=sse
endif
# ARM specific options.