summaryrefslogtreecommitdiff
path: root/mk/vars.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/vars.mk')
-rw-r--r--mk/vars.mk15
1 files changed, 8 insertions, 7 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index e22a46beb..e84e8b86b 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -16,7 +16,7 @@ BUILD_DIR:= ${BASE_DIR}/build_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIB
BUILD_DIR_PFX:= $(BASE_DIR)/build_*
STAGING_PKG_DIR:= ${BASE_DIR}/pkg_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC}
STAGING_PKG_DIR_PFX:= ${BASE_DIR}/pkg_*
-STAGING_HOST_DIR:= ${BASE_DIR}/host_${CPU_ARCH}_${ADK_TARGET_LIBC}
+STAGING_HOST_DIR:= ${BASE_DIR}/host_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}
STAGING_HOST_DIR_PFX:= ${BASE_DIR}/host_*
STAGING_JAVA_HOST_DIR:= ${BASE_DIR}/jhost
# use headers and foo-config from system
@@ -24,15 +24,15 @@ ifeq ($(ADK_NATIVE),y)
STAGING_TARGET_DIR:=
SCRIPT_TARGET_DIR:= /usr/bin
else
-STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC}
+STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}
SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts
endif
-STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC}
+STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}
STAGING_TARGET_DIR_PFX:=${BASE_DIR}/target_*
# relation from STAGING_HOST_DIR to STAGING_TARGET_DIR (for gcc to find
# its sysroot while staying relocatable)
-STAGING_HOST2TARGET:= ../target_${CPU_ARCH}_${ADK_TARGET_LIBC}
-TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH}_${ADK_TARGET_LIBC}
+STAGING_HOST2TARGET:= ../target_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}
+TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}
TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_*
TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build
JTOOLS_BUILD_DIR= $(BASE_DIR)/jtools_build
@@ -99,7 +99,7 @@ TARGET_LD:= ${TARGET_COMPILER_PREFIX}ld
TARGET_CPPFLAGS:=
TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(ADK_TARGET_ABI_CFLAGS)
-TARGET_CFLAGS_LIBC:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(TARGET_OPTIMIZATION) -fPIC
+TARGET_CFLAGS_LIBC:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(TARGET_OPTIMIZATION)
TARGET_CXXFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident
TARGET_LDFLAGS:= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib \
-Wl,-O2 -Wl,-rpath -Wl,/usr/lib \
@@ -167,7 +167,8 @@ TARGET_CONFIGURE_OPTS= PATH='${TARGET_PATH}' \
CC='$(TARGET_CC)' \
GCC='$(TARGET_CC)' \
CXX='$(TARGET_CXX)' \
- CROSS='$(TARGET_CROSS)'
+ CROSS='$(TARGET_CROSS)' \
+ ARCH=${ARCH}
HOST_CONFIGURE_OPTS= CC_FOR_BUILD='${CC_FOR_BUILD}' \
CPPFLAGS_FOR_BUILD='${CPPFLAGS_FOR_BUILD}' \