summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Makefile10
-rw-r--r--toolchain/binutils/Makefile2
-rw-r--r--toolchain/eglibc/Makefile99
-rw-r--r--toolchain/eglibc/Makefile.inc34
-rw-r--r--toolchain/eglibc/eglibc.config47
-rw-r--r--toolchain/eglibc/patches/cygwin.patch9
-rw-r--r--toolchain/eglibc/patches/eglibc-cross.patch80
-rw-r--r--toolchain/eglibc/patches/sparc64.patch21
-rw-r--r--toolchain/gcc/Makefile41
-rw-r--r--toolchain/gdb/Makefile4
-rw-r--r--toolchain/glibc/Makefile7
-rw-r--r--toolchain/glibc/Makefile.inc10
-rw-r--r--toolchain/musl/Makefile23
-rw-r--r--toolchain/uClibc/Makefile7
14 files changed, 51 insertions, 343 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile
index b61133b28..db5f65fd5 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -10,7 +10,7 @@
# 6) build and install initial static gcc
# 7) build and install full libc
# 8) build and install full shared gcc
-# 9) rebuild and install full libc (in case of musl)
+# 9) rebuild and install full libc (in case of musl/uclibc)
# 10) build and install gdb debugger
include $(TOPDIR)/rules.mk
@@ -20,10 +20,6 @@ ifeq ($(ADK_TARGET_LIB_GLIBC),y)
TARGETS+=glibc
LIBC:=glibc
endif
-ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
-TARGETS+=eglibc
-LIBC:=eglibc
-endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
TARGETS+=uClibc
LIBC:=uClibc
@@ -60,8 +56,8 @@ endif
$(STAGING_HOST_DIR):
@mkdir -p $(STAGING_HOST_DIR)/lib
@mkdir -p $(STAGING_HOST_DIR)/include
- @mkdir -p $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)
- @ln -sf ../lib $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ @mkdir -p $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)
+ @ln -sf ../lib $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/lib
%-download:
$(TRACE) toolchain/$(patsubst %-download,%,$@)/download
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 201f8538c..8ebbea53c 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -29,7 +29,7 @@ $(WRKBUILD)/.configured:
(cd $(WRKBUILD); \
$(WRKBUILD)/configure \
--prefix=$(STAGING_HOST_DIR) \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--with-sysroot=$(STAGING_TARGET_DIR) \
--disable-multilib \
--disable-dependency-tracking \
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
deleted file mode 100644
index e2028dcd4..000000000
--- a/toolchain/eglibc/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include $(TOPDIR)/rules.mk
-include ../rules.mk
-
-# eglibc does not compile with Os on some architectures
-ifeq ($(ADK_LINUX_SPARC),y)
-TARGET_CFLAGS_LIBC:= $(subst Os,O2,$(TARGET_CFLAGS))
-endif
-ifeq ($(ADK_LINUX_MICROBLAZE),y)
-TARGET_CFLAGS_LIBC:= $(subst Os,O2,$(TARGET_CFLAGS))
-endif
-ifeq ($(ADK_LINUX_PPC64),y)
-TARGET_CFLAGS_LIBC:= $(subst Os,O2,$(TARGET_CFLAGS))
-endif
-
-# ssp not supported
-TARGET_CFLAGS_LIBC:= $(filter-out -fstack-protector,$(TARGET_CFLAGS_LIBC))
-
-include Makefile.inc
-include ${TOPDIR}/mk/buildhlp.mk
-
-EGLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers
-EGLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
-
-$(WRKBUILD)/.headers_configure:
- mkdir -p $(EGLIBC_BUILD_DIR_INITIAL)
- $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(WRKBUILD)/libc/option-groups.config
- (cd $(EGLIBC_BUILD_DIR_INITIAL); \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
- $(WRKBUILD)/libc/configure \
- --prefix=$(STAGING_TARGET_DIR)/usr \
- --with-headers=$(STAGING_TARGET_DIR)/usr/include \
- --host=$(REAL_GNU_TARGET_NAME) \
- ${EGLIBC_CONFOPTS} \
- );
- touch $@
-
-$(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
- (cd $(EGLIBC_BUILD_DIR_INITIAL); \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
- $(MAKE) install-headers install-bootstrap-headers=yes cross-compiling=yes \
- );
- 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 $@
-
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
-EGLIBC_ENV+= libc_cv_ssp=yes
-else
-EGLIBC_ENV+= libc_cv_ssp=no
-endif
-
-$(WRKBUILD)/.configured:
- mkdir -p $(EGLIBC_BUILD_DIR_FINAL)
- $(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(EGLIBC_BUILD_DIR_FINAL)/option-groups.config
- (cd $(EGLIBC_BUILD_DIR_FINAL); \
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
- $(WRKBUILD)/libc/configure \
- --prefix=/usr \
- --enable-shared \
- --enable-stackguard-randomization \
- --host=$(REAL_GNU_TARGET_NAME) \
- ${EGLIBC_CONFOPTS} \
- );
- touch $@
-
-$(EGLIBC_BUILD_DIR_FINAL)/libc.so:
-$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
- $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL) cross-compiling=yes all
- touch $@
-
-$(WRKBUILD)/.installed: $(EGLIBC_BUILD_DIR_FINAL)/libc.so
- ${EGLIBC_ENV} \
- CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
- $(MAKE) -C $(EGLIBC_BUILD_DIR_FINAL) install_root=$(STAGING_TARGET_DIR) install
- ${INSTALL_DIR} ${STAGING_TARGET_DIR}/etc
- ${INSTALL_DATA} ${WRKBUILD}/libc/posix/gai.conf ${STAGING_TARGET_DIR}/etc/
- ${INSTALL_DATA} ${WRKBUILD}/libc/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc/
- touch $@
-
-$(WRKBUILD)/.fixup:
- -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
- -find $(STAGING_TARGET_DIR) -type -f -name \*_pic\* -delete
- rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n
- rm -rf $(STAGING_TARGET_DIR)/usr/lib/gconv
- PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
- debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
- touch $@
-
-include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc
deleted file mode 100644
index 1ac72ef54..000000000
--- a/toolchain/eglibc/Makefile.inc
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-PKG_NAME:= eglibc
-PKG_VERSION:= 2.19
-PKG_RELEASE:= 1
-PKG_MD5SUM:= b54dfce017ee3132f7b2a8d8f46067cf
-PKG_SITES:= http://openadk.org/distfiles/
-EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
- --without-cvs \
- --disable-profile \
- --disable-debug \
- --enable-kernel=2.6.32 \
- --without-gd \
- --disable-nscd \
- --with-__thread \
- --with-tls \
- --disable-obsolete-rpc \
- --enable-add-ons \
- --disable-nls
-EGLIBC_ENV:= PATH='${TARGET_PATH}' \
- BUILD_CC=${CC_FOR_BUILD} \
- GCC_HONOUR_COPTS=s \
- CFLAGS="$(TARGET_CFLAGS_LIBC)" \
- CC=${REAL_GNU_TARGET_NAME}-gcc \
- CXX=${REAL_GNU_TARGET_NAME}-g++ \
- AR=${REAL_GNU_TARGET_NAME}-ar \
- RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
- libc_cv_cc_with_libunwind=no \
- libc_cv_forced_unwind=yes \
- libc_cv_c_cleanup=yes \
- libc_cv_gnu99_inline=yes \
- libc_cv_initfini_array=yes \
- libc_cv_slibdir="/lib"
diff --git a/toolchain/eglibc/eglibc.config b/toolchain/eglibc/eglibc.config
deleted file mode 100644
index f0304ff85..000000000
--- a/toolchain/eglibc/eglibc.config
+++ /dev/null
@@ -1,47 +0,0 @@
-# This file sets default values for all option group variables
-# mentioned in option-groups.def; see that file for a description of
-# each option group.
-#
-# Subdirectory makefiles include this file before including the user's
-# settings from option-groups.config at the top of the build tree;
-# that file need only refer to those options whose default settings
-# are to be changed.
-#
-# By default, all option groups are enabled.
-OPTION_EGLIBC_ADVANCED_INET6 = y
-OPTION_EGLIBC_BACKTRACE = y
-OPTION_EGLIBC_BIG_MACROS = y
-OPTION_EGLIBC_BSD = y
-OPTION_EGLIBC_CXX_TESTS = n
-OPTION_EGLIBC_CATGETS = y
-OPTION_EGLIBC_CHARSETS = n
-OPTION_EGLIBC_CRYPT = y
-OPTION_EGLIBC_CRYPT_UFC = y
-OPTION_EGLIBC_DB_ALIASES = n
-OPTION_EGLIBC_ENVZ = y
-OPTION_EGLIBC_FCVT = y
-OPTION_EGLIBC_FMTMSG = y
-OPTION_EGLIBC_FSTAB = y
-OPTION_EGLIBC_FTRAVERSE = y
-OPTION_EGLIBC_GETLOGIN = y
-OPTION_EGLIBC_IDN = n
-OPTION_EGLIBC_INET = y
-OPTION_EGLIBC_INET_ANL = y
-OPTION_EGLIBC_LIBM = y
-OPTION_EGLIBC_LOCALES = y
-OPTION_EGLIBC_LOCALE_CODE = y
-OPTION_EGLIBC_MEMUSAGE = y
-OPTION_EGLIBC_NIS = n
-OPTION_EGLIBC_NSSWITCH = y
-OPTION_EGLIBC_RCMD = y
-OPTION_EGLIBC_RTLD_DEBUG = y
-OPTION_EGLIBC_SPAWN = y
-OPTION_EGLIBC_STREAMS = y
-OPTION_EGLIBC_SUNRPC = n
-OPTION_EGLIBC_UTMP = y
-OPTION_EGLIBC_UTMPX = y
-OPTION_EGLIBC_WORDEXP = y
-OPTION_POSIX_C_LANG_WIDE_CHAR = y
-OPTION_POSIX_REGEXP = y
-OPTION_POSIX_REGEXP_GLIBC = y
-OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
diff --git a/toolchain/eglibc/patches/cygwin.patch b/toolchain/eglibc/patches/cygwin.patch
deleted file mode 100644
index 647d27a25..000000000
--- a/toolchain/eglibc/patches/cygwin.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -Nur eglibc-2.17.orig/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c eglibc-2.17/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c
---- eglibc-2.17.orig/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c 2013-05-08 14:27:27.000000000 +0200
-+++ eglibc-2.17/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c 2013-07-10 12:48:57.000000000 +0200
-@@ -20,4 +20,4 @@
- /* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
- it will resolve to this very file. Using "sysdeps/.." as reference to the
- top level directory does the job. */
--#include <sysdeps/../nptl/pthread_spin_lock.c>
-+#include <../sysdeps/../nptl/pthread_spin_lock.c>
diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch
deleted file mode 100644
index 6d74ec327..000000000
--- a/toolchain/eglibc/patches/eglibc-cross.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc/types.h eglibc-2.18/libc/sunrpc/rpc/types.h
---- eglibc-2.18.orig/libc/sunrpc/rpc/types.h 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc/types.h 2014-01-25 13:23:20.000000000 +0100
-@@ -70,6 +70,7 @@
- #endif
-
- #ifndef __u_char_defined
-+#if !defined(__APPLE__) && !defined(__BSD__)
- typedef __u_char u_char;
- typedef __u_short u_short;
- typedef __u_int u_int;
-@@ -79,11 +80,14 @@
- typedef __fsid_t fsid_t;
- # define __u_char_defined
- #endif
-+#endif
- #ifndef __daddr_t_defined
-+#if !defined(__APPLE__) && !defined(__BSD__)
- typedef __daddr_t daddr_t;
- typedef __caddr_t caddr_t;
- # define __daddr_t_defined
- #endif
-+#endif
-
- #include <sys/time.h>
- #include <sys/param.h>
-diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_main.c
---- eglibc-2.18.orig/libc/sunrpc/rpc_main.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_main.c 2014-01-25 09:57:31.000000000 +0100
-@@ -38,7 +38,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
--#include <libintl.h>
- #include <locale.h>
- #include <ctype.h>
- #include <sys/types.h>
-@@ -51,6 +50,8 @@
- #include "rpc_scan.h"
- #include "proto.h"
-
-+#define gettext(X) (X)
-+
- #include "../version.h"
- #define PACKAGE _libc_intl_domainname
-
-@@ -958,10 +959,12 @@
- abort ();
- temp = rindex (cmd->infile, '.');
- cp = stpcpy (mkfilename, "Makefile.");
-- if (temp != NULL)
-- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
-- else
-+ if (temp != NULL) {
-+ strncpy (cp, cmd->infile, temp - cmd->infile);
-+ cp[temp - cmd->infile - 1] = '\0';
-+ } else {
- stpcpy (cp, cmd->infile);
-+ }
-
- }
- else
-diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_scan.c eglibc-2.18/libc/sunrpc/rpc_scan.c
---- eglibc-2.18.orig/libc/sunrpc/rpc_scan.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2014-01-25 09:57:31.000000000 +0100
-@@ -37,12 +37,13 @@
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
--#include <libintl.h>
- #include "rpc_scan.h"
- #include "rpc_parse.h"
- #include "rpc_util.h"
- #include "proto.h"
-
-+#define gettext(X) (X)
-+
- #define startcomment(where) (where[0] == '/' && where[1] == '*')
- #define endcomment(where) (where[-1] == '*' && where[0] == '/')
-
diff --git a/toolchain/eglibc/patches/sparc64.patch b/toolchain/eglibc/patches/sparc64.patch
deleted file mode 100644
index 1fa281a9a..000000000
--- a/toolchain/eglibc/patches/sparc64.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Nur eglibc-2.12.1.orig/libc/sysdeps/sparc/sparc64/Makefile eglibc-2.12.1/libc/sysdeps/sparc/sparc64/Makefile
---- eglibc-2.12.1.orig/libc/sysdeps/sparc/sparc64/Makefile 2010-09-28 19:13:11.000000000 +0200
-+++ eglibc-2.12.1/libc/sysdeps/sparc/sparc64/Makefile 2011-01-02 12:43:41.009426907 +0100
-@@ -1,3 +1,5 @@
-+sysdep-CFLAGS += -mcpu=v9 -Wa,-Av9a
-+
- ifeq ($(subdir),csu)
- sysdep_routines += hp-timing
- elide-routines.os += hp-timing
-@@ -10,3 +12,11 @@
- ifeq ($(subdir),string)
- sysdep_routines += align-cpy
- endif
-+
-+ASFLAGS-.o += -Wa,-Av9a
-+ASFLAGS-.os += -Wa,-Av9a
-+ASFLAGS-.op += -Wa,-Av9a
-+ASFLAGS-.og += -Wa,-Av9a
-+ASFLAGS-.ob += -Wa,-Av9a
-+ASFLAGS-.oS += -Wa,-Av9a
-+
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 4b0212f77..bbbd3d09c 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -12,7 +12,7 @@ GCC_CONFOPTS= --prefix=$(STAGING_HOST_DIR) \
--with-bugurl="http://www.openadk.org/" \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--with-gmp=$(STAGING_HOST_DIR) \
--with-mpfr=$(STAGING_HOST_DIR) \
--with-libelf=$(STAGING_HOST_DIR) \
@@ -122,10 +122,10 @@ GCC_BUILD_DIR_FINAL:= $(WRKBUILD)-final
$(GCC_BUILD_DIR_MINIMAL)/.configured:
mkdir -p $(GCC_BUILD_DIR_MINIMAL)
# these symlinks are very important, do not remove
- rm -rf $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- ln -sf ${STAGING_TARGET_DIR}/usr/include $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- rm -rf ${STAGING_HOST_DIR}/$(REAL_GNU_TARGET_NAME)/lib
- ln -sf ${STAGING_TARGET_DIR}/lib $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ rm -rf $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/sys-include
+ ln -sf ${STAGING_TARGET_DIR}/usr/include $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/sys-include
+ rm -rf ${STAGING_HOST_DIR}/$(GNU_TARGET_NAME)/lib
+ ln -sf ${STAGING_TARGET_DIR}/lib $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/lib
ifeq ($(ADK_LINUX_SH),y)
(cd ${STAGING_TARGET_DIR}/ && ln -sf . m4 && ln -sf . m4-nofpu)
endif
@@ -182,38 +182,33 @@ $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured
$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
PATH='$(TARGET_PATH)' $(MAKE) -C $(GCC_BUILD_DIR_FINAL) install
- # Set up the symlinks to enable lying about target name
- set -e; \
- cd $(STAGING_HOST_DIR); \
- ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
- cd bin; \
- for app in $(REAL_GNU_TARGET_NAME)-* ; do \
- ln -sf $${app} \
- $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \
- done;
# remove duplicate tools, convert hardlinks to symlinks
set -e; \
cd $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/bin; \
for app in ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip; do \
- ln -sf ../../bin/$(REAL_GNU_TARGET_NAME)-$${app} $${app}; \
+ ln -sf ../../bin/$(GNU_TARGET_NAME)-$${app} $${app}; \
done;
(cd $(STAGING_HOST_DIR)/bin && \
- ln -sf $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-gcc-${PKG_VERSION})
+ ln -sf $(GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc-${PKG_VERSION})
# setup symlink, so that gcc/g++ find cc1plus
- (cd $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/ && \
+ (cd $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/ && \
ln -sf ../libexec .)
# setup symlink, so that gcc/g++ find stddef.h
- (cd $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib/ && \
- ln -sf ../../host_${CPU_ARCH}_${ADK_TARGET_SUFFIX}_${ADK_TARGET_LIBC}/lib/gcc .)
+ (cd $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/lib/ && \
+ ln -sf ../../host_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_SUFFIX}/lib/gcc .)
# fix linking g++ apps with libtool
@-test -d $(STAGING_TARGET_DIR)/lib32 && \
cd $(STAGING_TARGET_DIR)/lib32 && \
- ln -sf libstdc++.so.6.0.17 libstdc++.so && \
- ln -sf libstdc++.so.6.0.17 libstdc++.so.6
+ ln -sf libstdc++.so.6.0.18 libstdc++.so && \
+ ln -sf libstdc++.so.6.0.18 libstdc++.so.6
+ @-test -d $(STAGING_TARGET_DIR)/libx32 && \
+ cd $(STAGING_TARGET_DIR)/libx32 && \
+ ln -sf libstdc++.so.6.0.18 libstdc++.so && \
+ ln -sf libstdc++.so.6.0.18 libstdc++.so.6
@-test -d $(STAGING_TARGET_DIR)/lib64 && \
cd $(STAGING_TARGET_DIR)/lib64 && \
- ln -sf libstdc++.so.6.0.17 libstdc++.so && \
- ln -sf libstdc++.so.6.0.17 libstdc++.so.6
+ ln -sf libstdc++.so.6.0.18 libstdc++.so && \
+ ln -sf libstdc++.so.6.0.18 libstdc++.so.6
# cleanup unneeded docs
rm -rf $(STAGING_HOST_DIR)/share
touch $@
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index c56ed99f9..a66e3fe7d 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -18,7 +18,7 @@ $(WRKBUILD)/.configured:
--prefix=$(STAGING_HOST_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--disable-dependency-tracking \
--without-uiout \
--enable-gdbmi \
@@ -41,8 +41,6 @@ $(WRKBUILD)/.compiled:
$(WRKBUILD)/.installed:
install -c $(WRKBUILD)/gdb/gdb $(TARGET_CROSS)gdb
- cd $(STAGING_HOST_DIR)/bin && \
- ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb
touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index 00bd67cbc..41987bada 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -73,8 +73,11 @@ $(WRKBUILD)/.fixup:
-find $(STAGING_TARGET_DIR) -type f -name \*_pic\* -delete
rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n
rm -rf $(STAGING_TARGET_DIR)/usr/lib/gconv
- PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
- debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)/bin $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/
+ifeq ($(ADK_TOOLCHAIN),y)
+ # strip target libs and host tools for toolchain builds
+ PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+ debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)/bin $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/
+endif
touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index e28405643..3c1a3167d 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -7,7 +7,7 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= 5374d29864b583622b62bfc6b8429418
PKG_SITES:= ${MASTER_SITE_GNU:=glibc/}
GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
- --host=$(REAL_GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
--with-headers=$(STAGING_TARGET_DIR)/usr/include \
--disable-sanity-checks \
--disable-nls \
@@ -23,10 +23,10 @@ GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
GLIBC_ENV:= PATH='${TARGET_PATH}' \
BUILD_CC=${CC_FOR_BUILD} \
CFLAGS="$(TARGET_CFLAGS_LIBC)" \
- CC=${REAL_GNU_TARGET_NAME}-gcc \
- CXX=${REAL_GNU_TARGET_NAME}-g++ \
- AR=${REAL_GNU_TARGET_NAME}-ar \
- RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
+ CC=${GNU_TARGET_NAME}-gcc \
+ CXX=${GNU_TARGET_NAME}-g++ \
+ AR=${GNU_TARGET_NAME}-ar \
+ RANLIB=${GNU_TARGET_NAME}-ranlib \
libc_cv_forced_unwind=yes \
libc_cv_cc_with_libunwind=yes \
libc_cv_c_cleanup=yes \
diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile
index b94c4e916..d675dc4cc 100644
--- a/toolchain/musl/Makefile
+++ b/toolchain/musl/Makefile
@@ -7,25 +7,25 @@ include Makefile.inc
include ${TOPDIR}/mk/buildhlp.mk
ifeq ($(CPU_ARCH),ppc)
-REAL_GNU_TARGET_NAME:= $(subst ppc,powerpc,$(REAL_GNU_TARGET_NAME))
+GNU_TARGET_NAME:= $(subst ppc,powerpc,$(GNU_TARGET_NAME))
endif
ifeq ($(CPU_ARCH),mips64el)
-REAL_GNU_TARGET_NAME:= $(subst mips64el,mips,$(REAL_GNU_TARGET_NAME))
+GNU_TARGET_NAME:= $(subst mips64el,mips,$(GNU_TARGET_NAME))
endif
ifeq ($(CPU_ARCH),mips64)
-REAL_GNU_TARGET_NAME:= $(subst mips64,mips,$(REAL_GNU_TARGET_NAME))
+GNU_TARGET_NAME:= $(subst mips64,mips,$(GNU_TARGET_NAME))
endif
ifeq ($(CPU_ARCH),microblazeel)
-REAL_GNU_TARGET_NAME:= $(subst microblazeel,microblaze,$(REAL_GNU_TARGET_NAME))
+GNU_TARGET_NAME:= $(subst microblazeel,microblaze,$(GNU_TARGET_NAME))
endif
ifeq ($(CPU_ARCH),sh4)
-REAL_GNU_TARGET_NAME:= $(subst sh4,sh,$(REAL_GNU_TARGET_NAME))
+GNU_TARGET_NAME:= $(subst sh4,sh,$(GNU_TARGET_NAME))
endif
$(WRKBUILD)/.headers:
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
./configure --prefix=/usr \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
$(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install-headers
@@ -37,7 +37,7 @@ $(WRKBUILD)/.compiled:
$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) clean
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
./configure --prefix=/usr \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
@@ -52,15 +52,18 @@ $(WRKBUILD)/.fixup:
$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) clean
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
./configure --prefix=/usr \
- --target=$(REAL_GNU_TARGET_NAME) \
+ --target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
$(MAKE) CFLAGS='$(TARGET_CFLAGS)' -C $(WRKBUILD) all
$(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install
# cleanup toolchain
-find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
- PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
- debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+ifeq ($(ADK_TOOLCHAIN),y)
+ # strip target libs and host tools for toolchain builds
+ PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+ debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+endif
touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 7e53b5d21..4ee9af510 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -120,8 +120,11 @@ endif
ln -s libc.so.0 $(STAGING_TARGET_DIR)/lib/libc.so
# cleanup toolchain
-find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
- PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
- debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+ifeq ($(ADK_TOOLCHAIN),y)
+ # strip target libs and host tools for toolchain builds
+ PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+ debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+endif
touch $@
include ${TOPDIR}/mk/toolchain.mk