summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-10-14 11:59:46 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-10-14 11:59:46 +0200
commit47113d6f632cdbf53b495905f9433040dccd80d6 (patch)
tree7327028a212bc2f3d9710660b7bb8ad6d6ed6775 /toolchain
parent02ac3b4c45f696aca0472a3b6a8347466de263b1 (diff)
parente0bc31d6aeddd5cae6dd5f4726defb2370d7df26 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/eglibc/Makefile97
-rw-r--r--toolchain/eglibc/Makefile.multilib47
-rw-r--r--toolchain/gcc/Makefile11
-rw-r--r--toolchain/glibc/Makefile87
-rw-r--r--toolchain/glibc/Makefile.multilib16
5 files changed, 8 insertions, 250 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 76b09237d..b9be77579 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -4,7 +4,6 @@
include $(TOPDIR)/rules.mk
include ../rules.mk
include Makefile.inc
-include Makefile.multilib
include ${TOPDIR}/mk/buildhlp.mk
# ssp partially supported
@@ -17,36 +16,6 @@ endif
EGLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers
EGLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-$(WRKBUILD)/.headers_configure:
- for abi in $(TABI); do \
- mkdir -p $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}/option-groups.config; \
- (cd $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \
- $(WRKBUILD)/libc/configure \
- --prefix=$(STAGING_TARGET_DIR)-$${abi/*:/}/usr \
- --with-headers=$(STAGING_TARGET_DIR)-$${abi/*:/}/usr/include \
- --host=$${abi/:*/} \
- ${EGLIBC_CONFOPTS} \
- ); \
- done
- touch $@
-
-$(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
- for abi in $(TABI); do \
- (cd $(EGLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \
- $(MAKE) install-headers install-bootstrap-headers=yes cross-compiling=yes \
- ); \
- touch $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/include/gnu/stubs.h; \
- touch $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/include/gnu/stubs-{32,x32,64,o32,n32}.h; \
- done
- touch $@
-else
$(WRKBUILD)/.headers_configure:
mkdir -p $(EGLIBC_BUILD_DIR_INITIAL)
$(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
@@ -71,7 +40,6 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,o32,n32,soft,hard}.h
touch $@
-endif
ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
EGLIBC_ENV+= libc_cv_ssp=yes
@@ -79,56 +47,6 @@ else
EGLIBC_ENV+= libc_cv_ssp=no
endif
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-$(WRKBUILD)/.configured:
- for abi in $(TABI); do \
- mkdir -p $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/} ;\
- $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/}/option-groups.config ;\
- (cd $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/}; \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc ${TCFLAGS}$${abi/*:/}" \
- $(WRKBUILD)/libc/configure \
- --prefix=/usr \
- --enable-shared \
- --enable-stackguard-randomization \
- --host=$${abi/:*/} \
- ${EGLIBC_CONFOPTS} \
- ); \
- done
- touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- for abi in $(TABI); do \
- ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/} cross-compiling=yes all ;\
- done
- touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- for abi in $(TABI); do \
- ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-$${abi/*:/} install_root=$(STAGING_TARGET_DIR)-$${abi/*:/} install ;\
- done
- # default libgcc searching for 64 bit libraries
- ${EGLIBC_ENV} $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL)-64 install_root=$(STAGING_TARGET_DIR) install
- touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
- touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,o32,n32}.h
- # for libgcc build we need C library files, 64 bit default
- mkdir -p $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2 ; \
- $(CP) $(STAGING_TARGET_DIR)-64/lib/* $(STAGING_TARGET_DIR)-64/usr/lib/* \
- $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/; \
- rm $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/libc.so ; \
- for abi in $(TABI); do \
- mkdir -p $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/} ; \
- $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/* $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/lib/* \
- $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/} ; \
- rm $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/}/libc.so ; \
- done
- ${INSTALL_DIR} ${STAGING_TARGET_DIR}/etc
- ${INSTALL_DATA} ${WRKBUILD}/libc/posix/gai.conf ${STAGING_TARGET_DIR}/etc/
- ${INSTALL_DATA} ${WRKBUILD}/libc/nscd/nscd.conf ${STAGING_TARGET_DIR}/etc/
- ${INSTALL_DATA} ${WRKBUILD}/libc/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc/
- touch $@
-else
$(WRKBUILD)/.configured:
mkdir -p $(EGLIBC_BUILD_DIR_FINAL)
$(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
@@ -161,23 +79,8 @@ $(WRKBUILD)/.installed: $(EGLIBC_BUILD_DIR_FINAL)/libc.so
${INSTALL_DATA} ${WRKBUILD}/libc/nscd/nscd.conf ${STAGING_TARGET_DIR}/etc/
${INSTALL_DATA} ${WRKBUILD}/libc/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc/
touch $@
-endif
$(WRKBUILD)/.fixup:
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-ifeq ($(ADK_TARGET_ABI_64),y)
- ${CP} $(STAGING_TARGET_DIR)-64/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-64/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-ifeq ($(ADK_TARGET_ABI_32),y)
- ${CP} $(STAGING_TARGET_DIR)-32/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-ifeq ($(ADK_TARGET_ABI_X32),y)
- ${CP} $(STAGING_TARGET_DIR)-x32/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-x32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-endif
touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/eglibc/Makefile.multilib b/toolchain/eglibc/Makefile.multilib
deleted file mode 100644
index 825f5d63d..000000000
--- a/toolchain/eglibc/Makefile.multilib
+++ /dev/null
@@ -1,47 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-# multilib support
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-TABI:=
-TCFLAGS:=
-ifeq ($(ADK_TARGET_MULTILIB_X86_X32),y)
-TABI+=x86_64-openadk-linux-gnu:x32
-TCFLAGS:=-m
-endif
-ifeq ($(ADK_TARGET_MULTILIB_X86_32),y)
-TABI+=i486-openadk-linux-gnu:32
-TCFLAGS:=-m
-endif
-ifeq ($(ADK_TARGET_MULTILIB_X86_64),y)
-TABI+=x86_64-openadk-linux-gnu:64
-TCFLAGS:=-m
-endif
-ifeq ($(ADK_TARGET_MULTILIB_MIPS_N32),y)
-ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y)
-TABI+=mips64el-openadk-linux-gnu:n32
-TCFLAGS:=-mabi=
-else
-TABI+=mips64-openadk-linux-gnu:n32
-TCFLAGS:=-mabi=
-endif
-endif
-ifeq ($(ADK_TARGET_MULTILIB_MIPS_O32),y)
-ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y)
-TABI+=mips64el-openadk-linux-gnu:32
-TCFLAGS:=-mabi=
-else
-TABI+=mips64-openadk-linux-gnu:32
-TCFLAGS:=-mabi=
-endif
-endif
-ifeq ($(ADK_TARGET_MULTILIB_MIPS_64),y)
-ifeq ($(ADK_KERNEL_CPU_LITTLE_ENDIAN),y)
-TABI+=mips64el-openadk-linux-gnu:64
-TCFLAGS:=-mabi=
-else
-TABI+=mips64-openadk-linux-gnu:64
-TCFLAGS:=-mabi=
-endif
-endif
-endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index d09264718..deef63a5c 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -33,11 +33,16 @@ else
GCC_CONFOPTS+= --disable-sjlj-exceptions
endif
+ifeq ($(ADK_LINUX_SH)$(ADK_LINUX_X86_64),)
+GCC_CONFOPTS+= --disable-biarch --disable-multilib
+endif
ifeq ($(ADK_LINUX_SH),y)
GCC_CONFOPTS+= --with-multilib-list=m4,m4-nofpu
-else
-GCC_CONFOPTS+= --disable-biarch \
- --disable-multilib
+endif
+ifeq ($(ADK_LINUX_X86_64),y)
+ifeq ($(ADK_x32),y)
+GCC_CONFOPTS+= --with-multilib-list=mx32
+endif
endif
ifeq ($(ADK_TOOLCHAIN_GCC_SSP),y)
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index f8f0080fc..306927fc6 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -12,10 +12,8 @@ endif
# ssp partially supported
TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS))
-#TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
include Makefile.inc
-include Makefile.multilib
include ${TOPDIR}/mk/buildhlp.mk
ifeq ($(ADK_TARGET_NO_FPU),y)
@@ -30,32 +28,6 @@ endif
GLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers
GLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-$(WRKBUILD)/.headers_configure:
- for abi in $(TABI); do \
- mkdir -p $(GLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- (cd $(GLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- ${GLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \
- $(WRKBUILD)/configure \
- --prefix=$(STAGING_TARGET_DIR)-$${abi/*:/}/usr \
- --with-sysroot=$(STAGING_TARGET_DIR)-$${abi/*:/} \
- --host=$${abi/:*/} \
- ${GLIBC_CONFOPTS} \
- ); \
- done
- touch $@
-
-$(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
- for abi in $(TABI); do \
- (cd $(GLIBC_BUILD_DIR_INITIAL)-$${abi/*:/}; \
- ${GLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \
- $(MAKE) ${GLIBC_MAKEOPTS} install-headers \
- ); \
- done
- touch $@
-else
$(WRKBUILD)/.headers_configure:
mkdir -p $(GLIBC_BUILD_DIR_INITIAL)
(cd $(GLIBC_BUILD_DIR_INITIAL); \
@@ -75,51 +47,7 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,soft,hard}.h
touch $@
-endif
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-$(WRKBUILD)/.configured:
- for abi in $(TABI); do \
- mkdir -p $(GLIBC_BUILD_DIR_FINAL)-$${abi/*:/} ;\
- (cd $(GLIBC_BUILD_DIR_FINAL)-$${abi/*:/}; \
- ${GLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc -m$${abi/*:/}" \
- $(WRKBUILD)/configure \
- --prefix=/usr \
- --enable-shared \
- --enable-stackguard-randomization \
- --host=$${abi/:*/} \
- ${GLIBC_CONFOPTS} \
- ); \
- done
- touch $@
-
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- for abi in $(TABI); do \
- ${GLIBC_ENV} $(MAKE) ${GLIBC_MAKEOPTS} -C $(GLIBC_BUILD_DIR_FINAL)-$${abi/*:/} all ;\
- done
- touch $@
-
-$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
- for abi in $(TABI); do \
- ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL)-$${abi/*:/} install_root=$(STAGING_TARGET_DIR)-$${abi/*:/} install ;\
- done
- # default libgcc searching for 64 bit libraries
- ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL)-64 install_root=$(STAGING_TARGET_DIR) install
- touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
- touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,soft,hard}.h
- for abi in $(TABI); do \
- mkdir -p $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/} ; \
- $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/* $(STAGING_TARGET_DIR)-$${abi/*:/}/usr/lib/* \
- $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/} ; \
- rm $(STAGING_TARGET_DIR)/lib/$(REAL_GNU_TARGET_NAME)/4.7.2/$${abi/*:/}/libc.so ; \
- done
- mkdir -p ${STAGING_TARGET_DIR}/etc
- ${INSTALL_DATA} ${WRKBUILD}/libc/posix/gai.conf ${STAGING_TARGET_DIR}/etc/
- ${INSTALL_DATA} ${WRKBUILD}/libc/nscd/nscd.conf ${STAGING_TARGET_DIR}/etc/
- ${INSTALL_DATA} ${WRKBUILD}/libc/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc/
- touch $@
-else
$(WRKBUILD)/.configured:
mkdir -p $(GLIBC_BUILD_DIR_FINAL)
(cd $(GLIBC_BUILD_DIR_FINAL); \
@@ -143,23 +71,8 @@ $(WRKBUILD)/.installed:
${INSTALL_DATA} ${WRKBUILD}/nscd/nscd.conf ${STAGING_TARGET_DIR}/etc
${INSTALL_DATA} ${WRKBUILD}/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc
touch $@
-endif
$(WRKBUILD)/.fixup:
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-ifeq ($(ADK_TARGET_ABI_64),y)
- ${CP} $(STAGING_TARGET_DIR)-64/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-64/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-ifeq ($(ADK_TARGET_ABI_32),y)
- ${CP} $(STAGING_TARGET_DIR)-32/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-ifeq ($(ADK_TARGET_ABI_X32),y)
- ${CP} $(STAGING_TARGET_DIR)-x32/lib/* $(STAGING_TARGET_DIR)/lib
- ${CP} $(STAGING_TARGET_DIR)-x32/usr/lib/* $(STAGING_TARGET_DIR)/usr/lib
-endif
-endif
touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/glibc/Makefile.multilib b/toolchain/glibc/Makefile.multilib
deleted file mode 100644
index 47cc0ff99..000000000
--- a/toolchain/glibc/Makefile.multilib
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-# multilib support
-ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
-TABI:=
-ifeq ($(ADK_TARGET_MULTILIB_X86_X32),y)
-TABI+=x86_64-openadk-linux-gnu:x32
-endif
-ifeq ($(ADK_TARGET_MULTILIB_X86_32),y)
-TABI+=i486-openadk-linux-gnu:32
-endif
-ifeq ($(ADK_TARGET_MULTILIB_X86_64),y)
-TABI+=x86_64-openadk-linux-gnu:64
-endif
-endif