From e932b203db3e7cb510a7bf862d4538d55b6c7271 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 29 Aug 2014 16:00:37 -0700 Subject: [PATCH] build: mips: add default compilation options MIPS targets should be compiled with no position independent code allowed, as the generated image often does not support short range components reference. BUG=chrome-os-partner:31438 TEST=with the rest of the patches included MIPS board urara builds successfully Change-Id: I637dd44eb565447c18b2c3cdb022d0933c52fd20 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/215677 Reviewed-by: Aaron Durbin --- util/xcompile/xcompile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 5215c48f58..f8f3869dcc 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -116,7 +116,8 @@ detect_special_flags() { testcc "$CC" "$CFLAGS" && CFLAGS="$CFLAGS" ;; mipsel ) - testcc "$CC" "$CFLAGS" + testcc "$CC" "$CFLAGS -mno-abicalls -fno-pic" && \ + CFLAGS+=" -mno-abicalls -fno-pic" ;; esac }