summaryrefslogtreecommitdiff
path: root/scripts/Makefile.toolchain.gccarmemb
diff options
context:
space:
mode:
authorKumar Gala <kumar.gala@linaro.org>2016-06-29 14:47:21 -0500
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2016-07-21 02:42:56 +0000
commit1c0bcc8cc5ab126b57d906d02f49646fb9836a47 (patch)
tree87fba1ec1c248cdd84194c2926e8d71c88c936bb /scripts/Makefile.toolchain.gccarmemb
parentcad05129b9f4b456df078f5b74382c46e36b2091 (diff)
toolchain.gccarmemb: Simplify setting of libgcc include path
Utilize the gcc -print-libgcc-file-name to determine the path to libgcc.a. Using this also resolve issues if we are building with floating point and the various ABIs to pickup the right lib. We can also simply a few Makefiles and remove the need to export _CROSS_COMPILE_arm_isa. Change-Id: I293394c921c18fa4984173ba51825d6f9a333697 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Diffstat (limited to 'scripts/Makefile.toolchain.gccarmemb')
-rw-r--r--scripts/Makefile.toolchain.gccarmemb3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.toolchain.gccarmemb b/scripts/Makefile.toolchain.gccarmemb
index fc2d85377..6271aa7ff 100644
--- a/scripts/Makefile.toolchain.gccarmemb
+++ b/scripts/Makefile.toolchain.gccarmemb
@@ -11,8 +11,9 @@ CROSS_COMPILE_TARGET = ${CROSS_COMPILE_TARGET_${ARCH}}
CROSS_COMPILE_version = ${CROSS_COMPILE_${ARCH}_version}
TOOLCHAIN_LIBS = gcc
+LIBGCC_DIR = $(shell dirname `$(CROSS_COMPILE_arm)gcc ${KBUILD_CFLAGS} -print-libgcc-file-name`)
-LIB_INCLUDE_DIR += -L ${GCCARMEMB_TOOLCHAIN_PATH}/lib/gcc/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_version}/${_CROSS_COMPILE_arm_isa}
+LIB_INCLUDE_DIR += -L ${LIBGCC_DIR}
TOOLCHAIN_CFLAGS = -I${GCCARMEMB_TOOLCHAIN_PATH}/arm-none-eabi/include
export CROSS_COMPILE TOOLCHAIN_LIBS TOOLCHAIN_CFLAGS LIB_INCLUDE_DIR