summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/libstdcxx/Makefile3
-rw-r--r--target/arch.lst1
-rw-r--r--target/config/Config.in.cpu8
-rw-r--r--target/config/Config.in.libc.choice2
-rw-r--r--target/config/Config.in.libc.default2
-rw-r--r--target/config/Config.in.target2
-rw-r--r--target/config/Config.in.toolchain12
-rw-r--r--target/cris/Makefile9
-rw-r--r--target/cris/systems/toolchain-cris10
-rw-r--r--target/cris/uclibc.config251
-rw-r--r--target/linux/patches/3.16.2/cris-header.patch44
-rw-r--r--toolchain/gcc/Makefile.inc8
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-cross.patch825
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-m68k.patch11
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-mips64.patch14
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-ppc.patch155
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-sh.patch11
-rw-r--r--toolchain/gcc/patches/4.7.3/musl-sparc.patch24
-rw-r--r--toolchain/gcc/patches/4.7.4/armhf.patch (renamed from toolchain/gcc/patches/4.7.3/armhf.patch)0
-rw-r--r--toolchain/gcc/patches/4.7.4/cflags.patch (renamed from toolchain/gcc/patches/4.7.3/cflags.patch)0
-rw-r--r--toolchain/gcc/patches/4.7.4/openbsd-lto.patch (renamed from toolchain/gcc/patches/4.7.3/openbsd-lto.patch)0
-rw-r--r--toolchain/gcc/patches/4.7.4/ppc-uclibc-cmath.patch (renamed from toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch)0
-rw-r--r--toolchain/kernel-headers/Makefile7
-rw-r--r--toolchain/uclibc/patches/0.9.34-git/0002-nptl-remove-duplicate-vfork-in-libpthread.patch793
24 files changed, 358 insertions, 1834 deletions
diff --git a/package/libstdcxx/Makefile b/package/libstdcxx/Makefile
index 360163d43..b95cfcba2 100644
--- a/package/libstdcxx/Makefile
+++ b/package/libstdcxx/Makefile
@@ -12,6 +12,9 @@ endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
include ${ADK_TOPDIR}/toolchain/uclibc/Makefile.inc
endif
+ifeq ($(ADK_TARGET_LIB_UCLIBC_NG),y)
+include ${ADK_TOPDIR}/toolchain/uclibc-ng/Makefile.inc
+endif
PKG_NAME:= libstdcxx
PKG_DESCR:= c++ support library
diff --git a/target/arch.lst b/target/arch.lst
index 083acb83e..703793bb0 100644
--- a/target/arch.lst
+++ b/target/arch.lst
@@ -4,6 +4,7 @@ arc
arm
avr32
bfin
+cris
m68k
microblaze
mips
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index b39b5a65c..c191d9f37 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -46,6 +46,12 @@ config ADK_CPU_ATHLON
config ADK_CPU_ARC
boolean
+config ADK_CPU_CRIS_V10
+ boolean
+
+config ADK_CPU_CRIS_V32
+ boolean
+
config ADK_CPU_SH4
boolean
@@ -131,6 +137,8 @@ config ADK_TARGET_CPU_ARCH
default "arceb" if ADK_CPU_ARC && ADK_big
default "avr32" if ADK_CPU_AVR32
default "bfin" if ADK_CPU_BFIN
+ default "cris" if ADK_CPU_CRIS_V10
+ default "crisv32" if ADK_CPU_CRIS_V32
default "i486" if ADK_CPU_I486
default "i586" if ADK_CPU_I586
default "i686" if ADK_CPU_I686
diff --git a/target/config/Config.in.libc.choice b/target/config/Config.in.libc.choice
index 0a9f13be6..01391f453 100644
--- a/target/config/Config.in.libc.choice
+++ b/target/config/Config.in.libc.choice
@@ -42,6 +42,7 @@ config ADK_TARGET_LIB_GLIBC
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
depends on !ADK_LINUX_BFIN
+ depends on !ADK_LINUX_CRIS
depends on !ADK_LINUX_XTENSA
depends on !ADK_TARGET_UCLINUX
help
@@ -54,6 +55,7 @@ config ADK_TARGET_LIB_UCLIBC
depends on \
!ADK_LINUX_AARCH64 && \
!ADK_LINUX_ALPHA && \
+ !ADK_LINUX_CRIS && \
!ADK_LINUX_MICROBLAZE && \
!ADK_LINUX_SPARC64 && \
!ADK_LINUX_PPC64 && \
diff --git a/target/config/Config.in.libc.default b/target/config/Config.in.libc.default
index 04c6b4204..5f46ea41a 100644
--- a/target/config/Config.in.libc.default
+++ b/target/config/Config.in.libc.default
@@ -32,6 +32,8 @@ config ADK_LIBC_VERSION
config ADK_TARGET_WITH_NPTL
boolean
+ default n if ADK_TARGET_LIB_UCLIBC_NG && ADK_LINUX_CRIS
+ default n if ADK_TARGET_LIB_UCLIBC && ADK_LINUX_CRIS
default n if ADK_TARGET_LIB_UCLIBC_NG && ADK_LINUX_M68K
default n if ADK_TARGET_LIB_UCLIBC && ADK_LINUX_M68K
default y
diff --git a/target/config/Config.in.target b/target/config/Config.in.target
index ad1e8dfe0..764a3357b 100644
--- a/target/config/Config.in.target
+++ b/target/config/Config.in.target
@@ -3,6 +3,8 @@
config ADK_TARGET_CFLAGS
string
+ default "-march=v32" if ADK_CPU_CRIS_V32
+ default "-march=v10" if ADK_CPU_CRIS_V10
default "-mcpu=5208" if ADK_CPU_CF_5208
default "-mcpu=v7.10.d" if ADK_CPU_MICROBLAZE
default "-m4 -ml" if ADK_CPU_SH4 && ADK_little
diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain
index 23b348ecc..0fcdc442b 100644
--- a/target/config/Config.in.toolchain
+++ b/target/config/Config.in.toolchain
@@ -23,6 +23,11 @@ config ADK_TOOLCHAIN_GCC_4_5_4
boolean
depends on ADK_LINUX_BFIN
+config ADK_TOOLCHAIN_GCC_4_7_4
+ prompt "4.7.4"
+ boolean
+ depends on ADK_LINUX_CRIS
+
config ADK_TOOLCHAIN_GCC_4_8_0_ARC
prompt "4.8.0-arc"
boolean
@@ -35,6 +40,7 @@ config ADK_TOOLCHAIN_GCC_4_8_3
depends on !ADK_LINUX_AARCH64
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
+ depends on !ADK_LINUX_CRIS
config ADK_TOOLCHAIN_GCC_4_9_1
prompt "4.9.1"
@@ -42,6 +48,7 @@ config ADK_TOOLCHAIN_GCC_4_9_1
depends on !ADK_LINUX_BFIN
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
+ depends on !ADK_LINUX_CRIS
config ADK_TOOLCHAIN_GCC_GIT
prompt "git"
@@ -50,6 +57,7 @@ config ADK_TOOLCHAIN_GCC_GIT
depends on !ADK_LINUX_BFIN
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
+ depends on !ADK_LINUX_CRIS
endchoice
@@ -65,7 +73,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_20_1
config ADK_TOOLCHAIN_BINUTILS_2_22
prompt "2.22"
boolean
- depends on ADK_LINUX_BFIN
+ depends on ADK_LINUX_BFIN || ADK_LINUX_CRIS
config ADK_TOOLCHAIN_BINUTILS_2_23_ARC
prompt "2.23-arc"
@@ -78,6 +86,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_24
depends on !ADK_LINUX_BFIN
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
+ depends on !ADK_LINUX_CRIS
config ADK_TOOLCHAIN_BINUTILS_GIT
prompt "git"
@@ -86,6 +95,7 @@ config ADK_TOOLCHAIN_BINUTILS_GIT
depends on !ADK_LINUX_BFIN
depends on !ADK_LINUX_ARC
depends on !ADK_LINUX_AVR32
+ depends on !ADK_LINUX_CRIS
endchoice
diff --git a/target/cris/Makefile b/target/cris/Makefile
new file mode 100644
index 000000000..ebc17340e
--- /dev/null
+++ b/target/cris/Makefile
@@ -0,0 +1,9 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include $(ADK_TOPDIR)/mk/kernel.mk
+include $(ADK_TOPDIR)/mk/modules.mk
+include $(ADK_TOPDIR)/mk/kernel-build.mk
+include $(ADK_TOPDIR)/mk/image.mk
+
diff --git a/target/cris/systems/toolchain-cris b/target/cris/systems/toolchain-cris
new file mode 100644
index 000000000..765ba90df
--- /dev/null
+++ b/target/cris/systems/toolchain-cris
@@ -0,0 +1,10 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_CRIS
+ bool "Toolchain only"
+ select ADK_cris
+ select ADK_toolchain_cris
+ select ADK_CPU_CRIS_V32
+ select ADK_TARGET_TOOLCHAIN
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ CRIS toolchain.
+
diff --git a/target/cris/uclibc.config b/target/cris/uclibc.config
new file mode 100644
index 000000000..0b9aa4689
--- /dev/null
+++ b/target/cris/uclibc.config
@@ -0,0 +1,251 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# uClibc 0.9.34-git C Library Configuration
+#
+# TARGET_alpha is not set
+# TARGET_arc is not set
+# TARGET_arm is not set
+# TARGET_avr32 is not set
+# TARGET_bfin is not set
+# TARGET_c6x is not set
+TARGET_cris=y
+# TARGET_e1 is not set
+# TARGET_frv is not set
+# TARGET_h8300 is not set
+# TARGET_hppa is not set
+# TARGET_i386 is not set
+# TARGET_i960 is not set
+# TARGET_ia64 is not set
+# TARGET_m68k is not set
+# TARGET_metag is not set
+# TARGET_microblaze is not set
+# TARGET_mips is not set
+# TARGET_nios is not set
+# TARGET_nios2 is not set
+# TARGET_powerpc is not set
+# TARGET_sh is not set
+# TARGET_sh64 is not set
+# TARGET_sparc is not set
+# TARGET_v850 is not set
+# TARGET_vax is not set
+# TARGET_x86_64 is not set
+# TARGET_xtensa is not set
+
+#
+# Target Architecture Features and Options
+#
+TARGET_ARCH="cris"
+FORCE_OPTIONS_FOR_ARCH=y
+# CONFIG_AVR32_AP7 is not set
+CONFIG_CRIS=y
+# CONFIG_CRISV32 is not set
+TARGET_SUBARCH=""
+
+#
+# Using ELF file format
+#
+ARCH_HAS_DEPRECATED_SYSCALLS=y
+ARCH_LITTLE_ENDIAN=y
+
+#
+# Using Little Endian
+#
+ARCH_HAS_MMU=y
+ARCH_USE_MMU=y
+UCLIBC_HAS_FLOATS=y
+UCLIBC_HAS_FPU=y
+DO_C99_MATH=y
+# DO_XSI_MATH is not set
+UCLIBC_HAS_FENV=y
+KERNEL_HEADERS=""
+HAVE_DOT_CONFIG=y
+
+#
+# General Library Settings
+#
+DOPIC=y
+HAVE_SHARED=y
+FORCE_SHAREABLE_TEXT_SEGMENTS=y
+LDSO_LDD_SUPPORT=y
+LDSO_CACHE_SUPPORT=y
+# LDSO_PRELOAD_ENV_SUPPORT is not set
+# LDSO_PRELOAD_FILE_SUPPORT is not set
+LDSO_BASE_FILENAME="ld.so"
+# LDSO_STANDALONE_SUPPORT is not set
+# LDSO_PRELINK_SUPPORT is not set
+# UCLIBC_STATIC_LDCONFIG is not set
+LDSO_RUNPATH=y
+LDSO_SAFE_RUNPATH=y
+LDSO_SEARCH_INTERP_PATH=y
+LDSO_LD_LIBRARY_PATH=y
+# LDSO_NO_CLEANUP is not set
+UCLIBC_CTOR_DTOR=y
+# LDSO_GNU_HASH_SUPPORT is not set
+# HAS_NO_THREADS is not set
+LINUXTHREADS_OLD=y
+# LINUXTHREADS_NEW is not set
+# UCLIBC_HAS_THREADS_NATIVE is not set
+UCLIBC_HAS_THREADS=y
+# PTHREADS_DEBUG_SUPPORT is not set
+UCLIBC_HAS_SYSLOG=y
+UCLIBC_HAS_LFS=y
+# MALLOC is not set
+# MALLOC_SIMPLE is not set
+MALLOC_STANDARD=y
+MALLOC_GLIBC_COMPAT=y
+UCLIBC_HAS_OBSTACK=y
+UCLIBC_DYNAMIC_ATEXIT=y
+COMPAT_ATEXIT=y
+UCLIBC_SUSV2_LEGACY=y
+UCLIBC_SUSV3_LEGACY=y
+# UCLIBC_SUSV3_LEGACY_MACROS is not set
+UCLIBC_SUSV4_LEGACY=y
+# UCLIBC_STRICT_HEADERS is not set
+# UCLIBC_HAS_STUBS is not set
+UCLIBC_HAS_SHADOW=y
+UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
+UCLIBC_HAS___PROGNAME=y
+UCLIBC_HAS_PTY=y
+ASSUME_DEVPTS=y
+UNIX98PTY_ONLY=y
+UCLIBC_HAS_GETPT=y
+UCLIBC_HAS_LIBUTIL=y
+UCLIBC_HAS_TM_EXTENSIONS=y
+UCLIBC_HAS_TZ_CACHING=y
+UCLIBC_HAS_TZ_FILE=y
+UCLIBC_HAS_TZ_FILE_READ_MANY=y
+UCLIBC_TZ_FILE_PATH="/etc/TZ"
+UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y
+
+#
+# Advanced Library Settings
+#
+UCLIBC_PWD_BUFFER_SIZE=256
+UCLIBC_GRP_BUFFER_SIZE=256
+
+#
+# Support various families of functions
+#
+UCLIBC_LINUX_MODULE_26=y
+# UCLIBC_LINUX_MODULE_24 is not set
+UCLIBC_LINUX_SPECIFIC=y
+UCLIBC_HAS_GNU_ERROR=y
+UCLIBC_BSD_SPECIFIC=y
+UCLIBC_HAS_BSD_ERR=y
+UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
+# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
+# UCLIBC_NTP_LEGACY is not set
+UCLIBC_SV4_DEPRECATED=y
+UCLIBC_HAS_REALTIME=y
+UCLIBC_HAS_ADVANCED_REALTIME=y
+UCLIBC_HAS_EPOLL=y
+UCLIBC_HAS_XATTR=y
+# UCLIBC_HAS_PROFILING is not set
+UCLIBC_HAS_CRYPT_IMPL=y
+# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set
+# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set
+UCLIBC_HAS_CRYPT=y
+UCLIBC_HAS_NETWORK_SUPPORT=y
+UCLIBC_HAS_SOCKET=y
+UCLIBC_HAS_IPV4=y
+UCLIBC_HAS_IPV6=y
+# UCLIBC_HAS_RPC is not set
+UCLIBC_USE_NETLINK=y
+UCLIBC_SUPPORT_AI_ADDRCONFIG=y
+UCLIBC_HAS_BSD_RES_CLOSE=y
+UCLIBC_HAS_COMPAT_RES_STATE=y
+# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
+UCLIBC_HAS_RESOLVER_SUPPORT=y
+UCLIBC_HAS_LIBRESOLV_STUB=y
+UCLIBC_HAS_LIBNSL_STUB=y
+
+#
+# String and Stdio Support
+#
+UCLIBC_HAS_STRING_GENERIC_OPT=y
+UCLIBC_HAS_STRING_ARCH_OPT=y
+UCLIBC_HAS_CTYPE_TABLES=y
+UCLIBC_HAS_CTYPE_SIGNED=y
+# UCLIBC_HAS_CTYPE_UNSAFE is not set
+UCLIBC_HAS_CTYPE_CHECKED=y
+# UCLIBC_HAS_CTYPE_ENFORCED is not set
+UCLIBC_HAS_WCHAR=y
+# UCLIBC_HAS_LOCALE is not set
+UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
+# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
+UCLIBC_HAS_STDIO_BUFSIZ_4096=y
+# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
+UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
+# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
+UCLIBC_HAS_STDIO_GETC_MACRO=y
+UCLIBC_HAS_STDIO_PUTC_MACRO=y
+UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
+# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
+UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
+# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set
+UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
+UCLIBC_HAS_PRINTF_M_SPEC=y
+UCLIBC_HAS_ERRNO_MESSAGES=y
+# UCLIBC_HAS_SYS_ERRLIST is not set
+UCLIBC_HAS_SIGNUM_MESSAGES=y
+# UCLIBC_HAS_SYS_SIGLIST is not set
+UCLIBC_HAS_GNU_GETOPT=y
+UCLIBC_HAS_GNU_GETSUBOPT=y
+
+#
+# Big and Tall
+#
+UCLIBC_HAS_REGEX=y
+# UCLIBC_HAS_REGEX_OLD is not set
+UCLIBC_HAS_FNMATCH=y
+# UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
+UCLIBC_HAS_NFTW=y
+UCLIBC_HAS_FTW=y
+UCLIBC_HAS_FTS=y
+UCLIBC_HAS_GLOB=y
+UCLIBC_HAS_GNU_GLOB=y
+UCLIBC_HAS_UTMPX=y
+
+#
+# Library Installation Options
+#
+RUNTIME_PREFIX="/"
+DEVEL_PREFIX="/usr/"
+MULTILIB_DIR="lib"
+HARDWIRED_ABSPATH=y
+
+#
+# Security options
+#
+UCLIBC_HAS_ARC4RANDOM=y
+# ARC4RANDOM_USES_NODEV is not set
+# UCLIBC_HAS_SSP is not set
+UCLIBC_BUILD_RELRO=y
+UCLIBC_BUILD_NOW=y
+UCLIBC_BUILD_NOEXECSTACK=y
+
+#
+# Development/debugging options
+#
+CROSS_COMPILER_PREFIX=""
+UCLIBC_EXTRA_CFLAGS=""
+# DODEBUG is not set
+# DODEBUG_PT is not set
+# DOSTRIP is not set
+# DOASSERTS is not set
+# SUPPORT_LD_DEBUG is not set
+# SUPPORT_LD_DEBUG_EARLY is not set
+# UCLIBC_MALLOC_DEBUGGING is not set
+# UCLIBC_HAS_BACKTRACE is not set
+WARNINGS="-Wall"
+# EXTRA_WARNINGS is not set
+# DOMULTI is not set
+# UCLIBC_MJN3_ONLY is not set
diff --git a/target/linux/patches/3.16.2/cris-header.patch b/target/linux/patches/3.16.2/cris-header.patch
new file mode 100644
index 000000000..9eed4630d
--- /dev/null
+++ b/target/linux/patches/3.16.2/cris-header.patch
@@ -0,0 +1,44 @@
+diff -Nur linux-3.16.2.orig/arch/cris/include/arch-v32/arch/Kbuild linux-3.16.2/arch/cris/include/arch-v32/arch/Kbuild
+--- linux-3.16.2.orig/arch/cris/include/arch-v32/arch/Kbuild 2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/arch/cris/include/arch-v32/arch/Kbuild 2014-09-26 10:30:42.000000000 +0200
+@@ -1 +1,2 @@
+ # CRISv32 arch
++header-y += ptrace.h
+diff -Nur linux-3.16.2.orig/arch/cris/include/asm/Kbuild linux-3.16.2/arch/cris/include/asm/Kbuild
+--- linux-3.16.2.orig/arch/cris/include/asm/Kbuild 2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/arch/cris/include/asm/Kbuild 2014-09-26 10:29:56.000000000 +0200
+@@ -1,8 +1,3 @@
+-
+-header-y += arch-v10/
+-header-y += arch-v32/
+-
+-
+ generic-y += barrier.h
+ generic-y += clkdev.h
+ generic-y += cputime.h
+diff -Nur linux-3.16.2.orig/arch/cris/include/uapi/asm/Kbuild linux-3.16.2/arch/cris/include/uapi/asm/Kbuild
+--- linux-3.16.2.orig/arch/cris/include/uapi/asm/Kbuild 2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/arch/cris/include/uapi/asm/Kbuild 2014-09-26 10:29:56.000000000 +0200
+@@ -1,8 +1,8 @@
+ # UAPI Header export list
+ include include/uapi/asm-generic/Kbuild.asm
+
+-header-y += arch-v10/
+-header-y += arch-v32/
++header-y += ../arch-v10/arch/
++header-y += ../arch-v32/arch/
+ header-y += auxvec.h
+ header-y += bitsperlong.h
+ header-y += byteorder.h
+diff -Nur linux-3.16.2.orig/scripts/headers.sh linux-3.16.2/scripts/headers.sh
+--- linux-3.16.2.orig/scripts/headers.sh 2014-09-06 01:37:11.000000000 +0200
++++ linux-3.16.2/scripts/headers.sh 2014-09-26 10:29:56.000000000 +0200
+@@ -19,8 +19,6 @@
+ case ${arch} in
+ um) # no userspace export
+ ;;
+- cris) # headers export are known broken
+- ;;
+ *)
+ if [ -d ${srctree}/arch/${arch} ]; then
+ do_command $1 ${arch}
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index 86d03b58a..2a616adbd 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/toolchain/gcc/Makefile.inc
@@ -27,6 +27,14 @@ PKG_SITES:= http://www.openadk.org/distfiles/
PKG_RELEASE:= 1
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-arc.tar.xz
endif
+ifeq ($(ADK_TOOLCHAIN_GCC_4_7_4),y)
+PKG_VERSION:= 4.7.4
+PKG_MD5SUM:= e2c60f5ef918be2db08df96c7d97d0c4
+PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/}
+PKG_RELEASE:= 1
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+LIBSTDCXXVER:= 17
+endif
ifeq ($(ADK_TOOLCHAIN_GCC_4_5_4),y)
PKG_VERSION:= 4.5.4
PKG_MD5SUM:= e2c60f5ef918be2db08df96c7d97d0c4
diff --git a/toolchain/gcc/patches/4.7.3/musl-cross.patch b/toolchain/gcc/patches/4.7.3/musl-cross.patch
deleted file mode 100644
index 453ba9aec..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-cross.patch
+++ /dev/null
@@ -1,825 +0,0 @@
-diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub
---- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200
-+++ gcc-4.7.3/config.sub 2013-09-16 15:39:42.000000000 +0200
-@@ -4,7 +4,7 @@
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- # 2011 Free Software Foundation, Inc.
-
--timestamp='2011-10-29'
-+timestamp='2011-03-23'
-
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
-@@ -125,6 +125,7 @@
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-+ linux-musl* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
-@@ -251,17 +252,13 @@
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-- | be32 | be64 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
-- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
-- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
-@@ -295,7 +292,7 @@
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
-- | rl78 | rx \
-+ | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
-@@ -304,7 +301,7 @@
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
-- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-+ | v850 | v850e \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
-@@ -361,7 +358,6 @@
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
-- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
-@@ -370,10 +366,8 @@
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
-- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-@@ -407,7 +401,7 @@
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
-- | rl78-* | romp-* | rs6000-* | rx-* \
-+ | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-@@ -415,11 +409,10 @@
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-- | tile*-* \
-+ | tile-* | tilegx-* \
- | tron-* \
- | ubicom32-* \
-- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-- | vax-* \
-+ | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
-@@ -820,10 +813,6 @@
- basic_machine=i370-ibm
- os=-mvs
- ;;
-- nacl)
-- basic_machine=le32-unknown
-- os=-nacl
-- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
-@@ -1132,8 +1121,13 @@
- basic_machine=t90-cray
- os=-unicos
- ;;
-+ # This must be matched before tile*.
-+ tilegx*)
-+ basic_machine=tilegx-unknown
-+ os=-linux-gnu
-+ ;;
- tile*)
-- basic_machine=$basic_machine-unknown
-+ basic_machine=tile-unknown
- os=-linux-gnu
- ;;
- tx39)
-@@ -1346,6 +1340,7 @@
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh
---- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200
-+++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-09-16 15:39:42.000000000 +0200
-@@ -20,7 +20,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
-diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h
---- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100
-+++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-09-16 15:39:42.000000000 +0200
-@@ -64,6 +64,23 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-
-+/* For ARM musl currently supports two dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI.
-+ musl does not support the legacy OABI (i.e. broken) mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, but this can be overridden by changing both
-+ MUSL_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-musl-arm.so.1"
-+#define MUSL_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-musl-armhf.so.1"
-+#define MUSL_DYNAMIC_LINKER_DEFAULT MUSL_DYNAMIC_LINKER_SOFT_FLOAT
-+
-+#define MUSL_DYNAMIC_LINKER \
-+ "%{mfloat-abi=hard:" MUSL_DYNAMIC_LINKER_HARD_FLOAT "} \
-+ %{mfloat-abi=soft*:" MUSL_DYNAMIC_LINKER_SOFT_FLOAT "} \
-+ %{!mfloat-abi=*:" MUSL_DYNAMIC_LINKER_DEFAULT "}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h
---- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200
-+++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-09-16 15:39:42.000000000 +0200
-@@ -31,3 +31,7 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h
---- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200
-+++ gcc-4.7.3/gcc/config/i386/linux.h 2013-09-16 15:39:42.000000000 +0200
-@@ -22,3 +22,4 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h
---- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200
-+++ gcc-4.7.3/gcc/config/linux.h 2013-09-16 15:39:42.000000000 +0200
-@@ -33,10 +33,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -85,21 +90,21 @@
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Determine whether the entire c99 runtime
- is present in the runtime library. */
- #undef TARGET_C99_FUNCTIONS
--#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL)
-
- /* Whether we have sincos that follows the GNU extension. */
- #undef TARGET_HAS_SINCOS
-@@ -108,3 +113,74 @@
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt
---- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200
-+++ gcc-4.7.3/gcc/config/linux.opt 2013-09-16 15:39:42.000000000 +0200
-@@ -30,3 +30,7 @@
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h
---- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200
-+++ gcc-4.7.3/gcc/config/mips/linux.h 2013-09-16 15:39:43.000000000 +0200
-@@ -19,3 +19,5 @@
- <http://www.gnu.org/licenses/>. */
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h
---- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100
-+++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-09-16 15:39:43.000000000 +0200
-@@ -362,17 +362,21 @@
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
-
- #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
-diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h
---- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200
-+++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-09-16 15:39:43.000000000 +0200
-@@ -804,15 +808,18 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc
---- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100
-+++ gcc-4.7.3/gcc/config.gcc 2013-09-16 15:39:43.000000000 +0200
-@@ -522,7 +522,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # Common parts for widely ported systems.
- case ${target} in
-@@ -625,6 +625,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2092,6 +2095,10 @@
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-diff -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure
---- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100
-+++ gcc-4.7.3/gcc/configure 2013-09-16 15:39:43.000000000 +0200
-@@ -26815,7 +26815,8 @@
- gcc_cv_libc_provides_ssp=yes
- fi
- ;;
-- *-*-gnu*)
-+ *-*-gnu* | \
-+ *-linux-musl*)
- # Avoid complicated tests (see
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
-@@ -26902,6 +26903,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -Nur gcc-4.7.3.orig/gcc/configure.ac gcc-4.7.3/gcc/configure.ac
---- gcc-4.7.3.orig/gcc/configure.ac 2013-02-06 16:23:55.000000000 +0100
-+++ gcc-4.7.3/gcc/configure.ac 2013-09-16 15:39:43.000000000 +0200
-@@ -4692,7 +4692,8 @@
- gcc_cv_libc_provides_ssp=yes
- fi]
- ;;
-- *-*-gnu*)
-+ *-*-gnu* | \
-+ *-linux-musl*)
- # Avoid complicated tests (see
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
-@@ -4762,6 +4763,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h
---- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100
-+++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-09-16 15:39:43.000000000 +0200
-@@ -184,6 +184,7 @@
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +201,7 @@
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -215,6 +217,7 @@
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
-diff -Nur gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c
---- gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c 2012-10-06 23:55:06.000000000 +0200
-+++ gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c 2013-09-16 15:39:43.000000000 +0200
-@@ -47,28 +47,13 @@
- #include "unwind-compat.h"
- #include "gthr.h"
-
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__FreeBSD__) && __FreeBSD__ >= 7
--# define ElfW __ElfN
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(__OpenBSD__)
--# define ElfW(type) Elf_##type
--# define USE_PT_GNU_EH_FRAME
--#endif
--
--#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-- && defined(TARGET_DL_ITERATE_PHDR) \
-- && defined(__sun__) && defined(__svr4__)
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
- # define USE_PT_GNU_EH_FRAME
-+# ifdef __OpenBSD__
-+# define ElfW(type) Elf_##typ
-+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
-+# define ElfW __ElfN
-+# endif
- #endif
-
- #if defined(USE_PT_GNU_EH_FRAME)
-diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c
---- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200
-+++ gcc-4.7.3/libgomp/config/posix/time.c 2013-09-16 15:39:43.000000000 +0200
-@@ -28,6 +28,8 @@
- The following implementation uses the most simple POSIX routines.
- If present, POSIX 4 clocks should be used instead. */
-
-+#define _POSIX_C_SOURCE 199309L /* for clocks */
-+
- #include "libgomp.h"
- #include <unistd.h>
- #if TIME_WITH_SYS_TIME
-diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc
---- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100
-+++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-09-16 15:39:43.000000000 +0200
-@@ -40,7 +40,11 @@
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h
---- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100
-+++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-09-16 15:39:43.000000000 +0200
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-diff -Nur gcc-4.7.3.orig/libssp/configure gcc-4.7.3/libssp/configure
---- gcc-4.7.3.orig/libssp/configure 2012-08-06 16:34:27.000000000 +0200
-+++ gcc-4.7.3/libssp/configure 2013-09-16 15:39:43.000000000 +0200
-@@ -626,6 +626,8 @@
- ssp_have_usable_vsnprintf
- EGREP
- GREP
-+LIBSSP_IN_LIBC_FALSE
-+LIBSSP_IN_LIBC_TRUE
- LIBSSP_USE_SYMVER_SUN_FALSE
- LIBSSP_USE_SYMVER_SUN_TRUE
- LIBSSP_USE_SYMVER_GNU_FALSE
-@@ -735,6 +737,7 @@
- enable_multilib
- enable_dependency_tracking
- enable_symvers
-+enable_ssp_in_libc
- enable_shared
- enable_static
- with_pic
-@@ -1374,6 +1377,7 @@
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --disable-symvers disable symbol versioning for libssp
-+ --enable-ssp-in-libc do not build SSP, as it is in libc
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
-@@ -4206,6 +4210,36 @@
- fi
-
-
-+# musl provides libssp in libc
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssp is provided in libc" >&5
-+$as_echo_n "checking whether libssp is provided in libc... " >&6; }
-+# Check whether --enable-ssp_in_libc was given.
-+if test "${enable_ssp_in_libc+set}" = set; then :
-+ enableval=$enable_ssp_in_libc; ssp_in_libc=$enableval
-+else
-+ ssp_in_libc=check
-+fi
-+
-+if test "x$ssp_in_libc" = "xcheck"; then
-+ case "$host" in
-+ *-musl*)
-+ ssp_in_libc=yes
-+ ;;
-+
-+ *)
-+ ssp_in_libc=no
-+ ;;
-+ esac
-+fi
-+ if test "x$ssp_in_libc" = xyes; then
-+ LIBSSP_IN_LIBC_TRUE=
-+ LIBSSP_IN_LIBC_FALSE='#'
-+else
-+ LIBSSP_IN_LIBC_TRUE='#'
-+ LIBSSP_IN_LIBC_FALSE=
-+fi
-+
-+
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
- $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-@@ -10650,7 +10684,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10653 "configure"
-+#line 10687 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -10756,7 +10790,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10759 "configure"
-+#line 10793 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11185,6 +11219,10 @@
- as_fn_error "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined.
- Usually this means the macro was only invoked conditionally." "$LINENO" 5
- fi
-+if test -z "${LIBSSP_IN_LIBC_TRUE}" && test -z "${LIBSSP_IN_LIBC_FALSE}"; then
-+ as_fn_error "conditional \"LIBSSP_IN_LIBC\" was never defined.
-+Usually this means the macro was only invoked conditionally." "$LINENO" 5
-+fi
-
- : ${CONFIG_STATUS=./config.status}
- ac_write_fail=0
-diff -Nur gcc-4.7.3.orig/libssp/configure.ac gcc-4.7.3/libssp/configure.ac
---- gcc-4.7.3.orig/libssp/configure.ac 2012-05-31 20:59:34.000000000 +0200
-+++ gcc-4.7.3/libssp/configure.ac 2013-09-16 15:39:43.000000000 +0200
-@@ -114,6 +114,26 @@
- AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu])
- AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun])
-
-+# musl provides libssp in libc
-+AC_MSG_CHECKING([whether libssp is provided in libc])
-+AC_ARG_ENABLE(ssp_in_libc,
-+AC_HELP_STRING([--enable-ssp-in-libc],
-+ [do not build SSP, as it is in libc]),
-+ssp_in_libc=$enableval,
-+ssp_in_libc=check)
-+if test "x$ssp_in_libc" = "xcheck"; then
-+ case "$host" in
-+ *-musl*)
-+ ssp_in_libc=yes
-+ ;;
-+
-+ *)
-+ ssp_in_libc=no
-+ ;;
-+ esac
-+fi
-+AM_CONDITIONAL(LIBSSP_IN_LIBC, [test "x$ssp_in_libc" = xyes])
-+
- AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h)
-
- if test x$gcc_no_link = xyes; then
-diff -Nur gcc-4.7.3.orig/libssp/Makefile.am gcc-4.7.3/libssp/Makefile.am
---- gcc-4.7.3.orig/libssp/Makefile.am 2010-12-06 01:50:04.000000000 +0100
-+++ gcc-4.7.3/libssp/Makefile.am 2013-09-16 15:39:43.000000000 +0200
-@@ -36,7 +36,11 @@
-
- AM_CFLAGS = -Wall
-
-+if LIBSSP_IN_LIBC
-+toolexeclib_LTLIBRARIES = libssp_nonshared.la
-+else
- toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
-+endif
-
- target_noncanonical = @target_noncanonical@
- libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
-diff -Nur gcc-4.7.3.orig/libssp/Makefile.in gcc-4.7.3/libssp/Makefile.in
---- gcc-4.7.3.orig/libssp/Makefile.in 2011-02-13 12:45:53.000000000 +0100
-+++ gcc-4.7.3/libssp/Makefile.in 2013-09-16 15:39:43.000000000 +0200
-@@ -93,12 +93,17 @@
- libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@
-+@LIBSSP_IN_LIBC_FALSE@am_libssp_la_rpath = -rpath $(toolexeclibdir)
- am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo
- libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS)
- libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(libssp_nonshared_la_CFLAGS) $(CFLAGS) \
- $(libssp_nonshared_la_LDFLAGS) $(LDFLAGS) -o $@
-+@LIBSSP_IN_LIBC_FALSE@am_libssp_nonshared_la_rpath = -rpath \
-+@LIBSSP_IN_LIBC_FALSE@ $(toolexeclibdir)
-+@LIBSSP_IN_LIBC_TRUE@am_libssp_nonshared_la_rpath = -rpath \
-+@LIBSSP_IN_LIBC_TRUE@ $(toolexeclibdir)
- DEFAULT_INCLUDES = -I.@am__isrc@
- depcomp = $(SHELL) $(top_srcdir)/../depcomp
- am__depfiles_maybe = depfiles
-@@ -258,7 +263,8 @@
- @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map
- @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun
- AM_CFLAGS = -Wall
--toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
-+@LIBSSP_IN_LIBC_FALSE@toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
-+@LIBSSP_IN_LIBC_TRUE@toolexeclib_LTLIBRARIES = libssp_nonshared.la
- libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
- nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
- libssp_la_SOURCES = \
-@@ -414,9 +420,9 @@
- rm -f "$${dir}/so_locations"; \
- done
- libssp.la: $(libssp_la_OBJECTS) $(libssp_la_DEPENDENCIES)
-- $(libssp_la_LINK) -rpath $(toolexeclibdir) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS)
-+ $(libssp_la_LINK) $(am_libssp_la_rpath) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS)
- libssp_nonshared.la: $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_DEPENDENCIES)
-- $(libssp_nonshared_la_LINK) -rpath $(toolexeclibdir) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS)
-+ $(libssp_nonshared_la_LINK) $(am_libssp_nonshared_la_rpath) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS)
-
- mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host
---- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100
-+++ gcc-4.7.3/libstdc++-v3/configure.host 2013-09-16 15:39:43.000000000 +0200
-@@ -243,6 +243,13 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
-+
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
-@@ -251,6 +258,9 @@
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
diff --git a/toolchain/gcc/patches/4.7.3/musl-m68k.patch b/toolchain/gcc/patches/4.7.3/musl-m68k.patch
deleted file mode 100644
index 54c7e0eef..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-m68k.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur gcc-4.7.3.orig/gcc/config/m68k/linux.h gcc-4.7.3/gcc/config/m68k/linux.h
---- gcc-4.7.3.orig/gcc/config/m68k/linux.h 2011-11-27 00:57:37.000000000 +0100
-+++ gcc-4.7.3/gcc/config/m68k/linux.h 2013-09-28 22:37:22.000000000 +0200
-@@ -73,6 +73,7 @@
- done. */
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m m68kelf %{shared} \
diff --git a/toolchain/gcc/patches/4.7.3/musl-mips64.patch b/toolchain/gcc/patches/4.7.3/musl-mips64.patch
deleted file mode 100644
index 671ba9f28..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-mips64.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h
---- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200
-+++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-09-17 09:24:36.000000000 +0200
-@@ -28,6 +28,9 @@
- #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/toolchain/gcc/patches/4.7.3/musl-ppc.patch b/toolchain/gcc/patches/4.7.3/musl-ppc.patch
deleted file mode 100644
index f4211ee73..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-ppc.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h
---- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100
-+++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200
-@@ -27,7 +27,6 @@
- #define R_CR2 70
- #define R_VR0 77
- #define R_VRSAVE 109
--#define R_VSCR 110
-
- struct gcc_vregs
- {
-@@ -176,38 +175,6 @@
- }
- #endif
-
--/* Find an entry in the process auxiliary vector. The canonical way to
-- test for VMX is to look at AT_HWCAP. */
--
--static long
--ppc_linux_aux_vector (long which)
--{
-- /* __libc_stack_end holds the original stack passed to a process. */
-- extern long *__libc_stack_end;
-- long argc;
-- char **argv;
-- char **envp;
-- struct auxv
-- {
-- long a_type;
-- long a_val;
-- } *auxp;
--
-- /* The Linux kernel puts argc first on the stack. */
-- argc = __libc_stack_end[0];
-- /* Followed by argv, NULL terminated. */
-- argv = (char **) __libc_stack_end + 1;
-- /* Followed by environment string pointers, NULL terminated. */
-- envp = argv + argc + 1;
-- while (*envp++)
-- continue;
-- /* Followed by the aux vector, zero terminated. */
-- for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp)
-- if (auxp->a_type == which)
-- return auxp->a_val;
-- return 0;
--}
--
- /* Do code reading to identify a signal frame, and set the frame
- state data appropriately. See unwind-dw2.c for the structs. */
-
-@@ -217,8 +184,8 @@
- ppc_fallback_frame_state (struct _Unwind_Context *context,
- _Unwind_FrameState *fs)
- {
-- static long hwcap = 0;
- struct gcc_regs *regs = get_regs (context);
-+ struct gcc_vregs *vregs;
- long new_cfa;
- int i;
-
-@@ -230,12 +197,15 @@
- fs->regs.cfa_reg = STACK_POINTER_REGNUM;
- fs->regs.cfa_offset = new_cfa - (long) context->cfa;
-
-- for (i = 0; i < 32; i++)
-- if (i != STACK_POINTER_REGNUM)
-- {
-- fs->regs.reg[i].how = REG_SAVED_OFFSET;
-- fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
-- }
-+#ifdef __powerpc64__
-+ fs->regs.reg[2].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[2].loc.offset = (long) &regs->gpr[2] - new_cfa;
-+#endif
-+ for (i = 14; i < 32; i++)
-+ {
-+ fs->regs.reg[i].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
-+ }
-
- fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET;
- /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit
-@@ -251,57 +221,35 @@
- fs->retaddr_column = ARG_POINTER_REGNUM;
- fs->signal_frame = 1;
-
-- if (hwcap == 0)
-+ /* If we have a FPU... */
-+ for (i = 14; i < 32; i++)
- {
-- hwcap = ppc_linux_aux_vector (16);
-- /* These will already be set if we found AT_HWCAP. A nonzero
-- value stops us looking again if for some reason we couldn't
-- find AT_HWCAP. */
--#ifdef __powerpc64__
-- hwcap |= 0xc0000000;
--#else
-- hwcap |= 0x80000000;
--#endif
-+ fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
- }
-
-- /* If we have a FPU... */
-- if (hwcap & 0x08000000)
-- for (i = 0; i < 32; i++)
-- {
-- fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
-- fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
-- }
--
- /* If we have a VMX unit... */
-- if (hwcap & 0x10000000)
-- {
-- struct gcc_vregs *vregs;
- #ifdef __powerpc64__
-- vregs = regs->vp;
-+ vregs = regs->vp;
- #else
-- vregs = &regs->vregs;
-+ vregs = &regs->vregs;
- #endif
-- if (regs->msr & (1 << 25))
-+ if (regs->msr & (1 << 25))
-+ {
-+ for (i = 20; i < 32; i++)
- {
-- for (i = 0; i < 32; i++)
-- {
-- fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
-- fs->regs.reg[i + R_VR0].loc.offset
-- = (long) &vregs->vr[i] - new_cfa;
-- }
--
-- fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET;
-- fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa;
-+ fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa;
- }
--
-- fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
-- fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
- }
-
-+ fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
-+
- /* If we have SPE register high-parts... we check at compile-time to
- avoid expanding the code for all other PowerPC. */
- #ifdef __SPE__
-- for (i = 0; i < 32; i++)
-+ for (i = 14; i < 32; i++)
- {
- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET;
- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset
diff --git a/toolchain/gcc/patches/4.7.3/musl-sh.patch b/toolchain/gcc/patches/4.7.3/musl-sh.patch
deleted file mode 100644
index fbf06082a..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-sh.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h
---- gcc-4.7.3.orig/gcc/config/sh/linux.h 2013-03-25 23:55:56.000000000 +0100
-+++ gcc-4.7.3/gcc/config/sh/linux.h 2013-09-26 21:16:39.000000000 +0200
-@@ -46,6 +46,7 @@
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
diff --git a/toolchain/gcc/patches/4.7.3/musl-sparc.patch b/toolchain/gcc/patches/4.7.3/musl-sparc.patch
deleted file mode 100644
index 7c9214f07..000000000
--- a/toolchain/gcc/patches/4.7.3/musl-sparc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/linux64.h
---- gcc-4.7.3.orig/gcc/config/sparc/linux64.h 2011-11-12 02:05:07.000000000 +0100
-+++ gcc-4.7.3/gcc/config/sparc/linux64.h 2013-09-19 11:37:50.000000000 +0200
-@@ -95,6 +95,9 @@
-
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1"
-+
-
- #ifdef SPARC_BI_ARCH
-
-diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/linux.h
---- gcc-4.7.3.orig/gcc/config/sparc/linux.h 2011-11-12 02:05:07.000000000 +0100
-+++ gcc-4.7.3/gcc/config/sparc/linux.h 2013-09-19 11:37:12.000000000 +0200
-@@ -85,6 +85,7 @@
- done. */
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
diff --git a/toolchain/gcc/patches/4.7.3/armhf.patch b/toolchain/gcc/patches/4.7.4/armhf.patch
index 4c0bf744d..4c0bf744d 100644
--- a/toolchain/gcc/patches/4.7.3/armhf.patch
+++ b/toolchain/gcc/patches/4.7.4/armhf.patch
diff --git a/toolchain/gcc/patches/4.7.3/cflags.patch b/toolchain/gcc/patches/4.7.4/cflags.patch
index a9ccdcbc8..a9ccdcbc8 100644
--- a/toolchain/gcc/patches/4.7.3/cflags.patch
+++ b/toolchain/gcc/patches/4.7.4/cflags.patch
diff --git a/toolchain/gcc/patches/4.7.3/openbsd-lto.patch b/toolchain/gcc/patches/4.7.4/openbsd-lto.patch
index 8a94971b7..8a94971b7 100644
--- a/toolchain/gcc/patches/4.7.3/openbsd-lto.patch
+++ b/toolchain/gcc/patches/4.7.4/openbsd-lto.patch
diff --git a/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch b/toolchain/gcc/patches/4.7.4/ppc-uclibc-cmath.patch
index 0e64e8d0e..0e64e8d0e 100644
--- a/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch
+++ b/toolchain/gcc/patches/4.7.4/ppc-uclibc-cmath.patch
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 80d376cdf..d13822b6e 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -57,6 +57,13 @@ $(WRKBUILD)/.headers: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_
${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
headers_install
+ifeq ($(ADK_TARGET_ARCH),cris)
+ifeq ($(ADK_TARGET_CPU_ARCH),crisv32)
+ cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v32/arch arch
+else
+ cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v10/arch arch
+endif
+endif
@-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
@-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
touch $@
diff --git a/toolchain/uclibc/patches/0.9.34-git/0002-nptl-remove-duplicate-vfork-in-libpthread.patch b/toolchain/uclibc/patches/0.9.34-git/0002-nptl-remove-duplicate-vfork-in-libpthread.patch
deleted file mode 100644
index d6a49484c..000000000
--- a/toolchain/uclibc/patches/0.9.34-git/0002-nptl-remove-duplicate-vfork-in-libpthread.patch
+++ /dev/null
@@ -1,793 +0,0 @@
-From c0cdfbcfd4ca6f86eae5f189290cbc1be891a398 Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Thu, 4 Sep 2014 15:23:36 +0200
-Subject: [PATCH 2/6] nptl: remove duplicate vfork() in libpthread
-
-Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>:
-sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' $(git grep -l pt-vfork libpthread/nptl/sysdeps)
-find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \;
-
-Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
----
- .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S | 42 --------------
- .../nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S | 7 ---
- .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S | 37 ------------
- .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 67 ----------------------
- .../sysdeps/unix/sysv/linux/metag/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S | 51 ----------------
- .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S | 37 ------------
- .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 3 +-
- .../unix/sysv/linux/powerpc/powerpc32/pt-vfork.S | 48 ----------------
- .../unix/sysv/linux/powerpc/powerpc64/pt-vfork.S | 48 ----------------
- .../sysdeps/unix/sysv/linux/powerpc/pt-vfork.S | 5 --
- .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S | 64 ---------------------
- .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 44 --------------
- .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 3 +-
- .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 32 -----------
- 21 files changed, 9 insertions(+), 500 deletions(-)
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
- delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
-
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
-deleted file mode 100644
-index a6005c1..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
-+++ /dev/null
-@@ -1,42 +0,0 @@
--/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#include <tcb-offsets.h>
--
--#undef PSEUDO_PREPARE_ARGS
--#define PSEUDO_PREPARE_ARGS \
-- /* Load the current cached pid value across the vfork. */ \
-- rduniq; \
-- ldl a2, PID_OFFSET(v0); \
-- mov v0, a1; \
-- /* Write back its negation, to indicate that the pid value is \
-- uninitialized in the the child, and in the window between \
-- here and the point at which we restore the value. */ \
-- negl a2, t0; \
-- stl t0, PID_OFFSET(v0);
--
--PSEUDO (__vfork, vfork, 0)
--
-- /* If we're back in the parent, restore the saved pid. */
-- beq v0, 1f
-- stl a2, PID_OFFSET(a1)
--1: ret
--
--PSEUDO_END (__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
-index 25e6fad..658aa6c 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S
-+libpthread_linux_arch_SSRC =
- libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c
-
-@@ -17,7 +17,6 @@ CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
-
- ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
- ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S
-deleted file mode 100644
-index f222dca..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S
-+++ /dev/null
-@@ -1,7 +0,0 @@
--/*
-- * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
-- *
-- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
-- */
--
--#include "vfork.S"
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-index 329d8a9..6f05b7d 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S
-+libpthread_linux_arch_SSRC =
- libpthread_linux_arch_CSRC = pthread_once.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
- lowlevellock.c
-@@ -19,7 +19,6 @@ CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -marm
-
- ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
- CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
-deleted file mode 100644
-index df18f03..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
-+++ /dev/null
-@@ -1,37 +0,0 @@
--/* Copyright (C) 2005 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <tcb-offsets.h>
--
--/* Save the PID value. */
--#define SAVE_PID \
-- str lr, [sp, #-4]!; /* Save LR. */ \
-- mov r0, #0xffff0fff; /* Point to the high page. */ \
-- mov lr, pc; /* Save our return address. */ \
-- sub pc, r0, #31; /* Jump to the TLS entry. */ \
-- ldr lr, [sp], #4; /* Restore LR. */ \
-- mov r2, r0; /* Save the TLS addr in r2. */ \
-- ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
-- rsb r0, r3, #0; /* Negate it. */ \
-- str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
--
--/* Restore the old PID value in the parent. */
--#define RESTORE_PID \
-- cmp r0, #0; /* If we are the parent... */ \
-- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
--
--#include "../../../../../../../libc/sysdeps/linux/arm/vfork.S"
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
-index 9a34595..94fc03a 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S
-+libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S
- libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
-
- libc_linux_arch_CSRC = fork.c
-@@ -14,7 +14,6 @@ libc_linux_arch_SSRC = clone.S vfork.S
- ASFLAGS += -DUSE___THREAD
-
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
-deleted file mode 100644
-index 5bba782..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
-+++ /dev/null
-@@ -1,67 +0,0 @@
--/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Andreas Schwab <schwab@gnu.org>.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#define _ERRNO_H 1
--#include <bits/errno.h>
--#include <bits/kernel-features.h>
--#include <tcb-offsets.h>
--
--/* Save the PID value. */
--#define SAVE_PID \
-- movl %gs:PID, %edx; \
-- movl %edx, %eax; \
-- negl %eax; \
-- movl %eax, %gs:PID
--
--/* Restore the old PID value in the parent. */
--#define RESTORE_PID \
-- testl %eax, %eax; \
-- je 1f; \
-- movl %edx, %gs:PID; \
--1:
--
--/* Clone the calling process, but without copying the whole address space.
-- The calling process is suspended until the new process exits or is
-- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
-- and the process ID of the new process to the old process. */
--
--ENTRY (__vfork)
-- /* Pop the return PC value into ECX. */
-- popl %ecx
--
-- SAVE_PID
--
-- /* Stuff the syscall number in EAX and enter into the kernel. */
-- movl $SYS_ify (vfork), %eax
-- int $0x80
--
-- RESTORE_PID
--
-- /* Jump to the return PC. Don't jump directly since this
-- disturbs the branch target cache. Instead push the return
-- address back on the stack. */
-- pushl %ecx
--
-- cmpl $-4095, %eax
-- jae SYSCALL_ERROR_LABEL /* Branch forward if it failed. */
--L(pseudo_end):
-- ret
--PSEUDO_END (__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
-index df98875..99dec6b 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S
-+libpthread_linux_arch_SSRC =
- libpthread_linux_arch_CSRC = pthread_once.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
- lowlevellock.c
-@@ -22,7 +22,6 @@ CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
- ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
- ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
-
- ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
- CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S
-deleted file mode 100644
-index 489c749..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S
-+++ /dev/null
-@@ -1,51 +0,0 @@
--/* Copyright (C) 2005 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, write to the Free
-- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-- 02111-1307 USA. */
--
--#include <tcb-offsets.h>
--#include <asm/unistd.h>
--
--#ifdef __PIC__
--#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
--#else
--#define __VFORK_METAG_LOAD_TP ___metag_load_tp
--#endif
--
--/* Save the PID value. */
--#define SAVE_PID \
-- SETL [A0StP++], D0FrT, D1RtP; \
-- CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
-- SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
-- GETD D0FrT, [D0Re0 + #PID]; \
-- NEG D0FrT, D0FrT; \
-- SETD [D0Re0 + #PID], D0FrT; \
-- GETL D0FrT, D1RtP, [--A0StP];
--
--#define RESTORE_PID \
-- CMP D0Re0, #0; \
-- BEQ 1f; \
-- MSETL [A0StP++], D0Re0, D0FrT; \
-- CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
-- SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
-- GETD D0FrT, [D0Re0 + #PID]; \
-- NEG D0FrT, D0FrT; \
-- SETD [D0Re0 + #PID], D0FrT; \
-- GETL D0FrT, D1RtP, [--A0StP]; \
-- GETL D0Re0, D1Re0, [--A0StP]; \
--1:
--
--#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
-index fc26a8e..a453b6b 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S clone.S
-+libpthread_linux_arch_SSRC = clone.S
- libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c
-
- libc_linux_arch_CSRC = fork.c
-@@ -21,7 +21,6 @@ CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
- endif
- CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
-
- ASFLAGS-clone.S = -D_LIBC_REENTRANT
- ASFLAGS-vfork.S = -D_LIBC_REENTRANT
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
-deleted file mode 100644
-index 52fbde3..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
-+++ /dev/null
-@@ -1,37 +0,0 @@
--/* Copyright (C) 2005 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <features.h>
--#include <tls.h>
--
--/* Save the PID value. */
--#define SAVE_PID \
-- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
-- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
-- subu a2, $0, a2; /* Negate it. */ \
-- sw a2, PID_OFFSET(v1); /* Store the temporary PID. */
--
--/* Restore the old PID value in the parent. */
--#define RESTORE_PID \
-- beqz v0, 1f; /* If we are the parent... */ \
-- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
-- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
-- subu a2, $0, a2; /* Re-negate it. */ \
-- sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
--1:
--
--#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S>
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
-index 8581aea..215c2aa 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S
-+libpthread_linux_arch_SSRC =
- libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c
-
- libc_linux_arch_CSRC = fork.c
-@@ -19,7 +19,6 @@ ASFLAGS += -DUSE___THREAD
- CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- #ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-
- #ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
-deleted file mode 100644
-index 2f82504..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* Copyright (C) 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#define _ERRNO_H 1
--#include <bits/errno.h>
--#include <bits/kernel-features.h>
--#include <tcb-offsets.h>
--
--/* Clone the calling process, but without copying the whole address space.
-- The calling process is suspended until the new process exits or is
-- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
-- and the process ID of the new process to the old process. */
--
--ENTRY (__vfork)
-- lwz 0,PID(2)
-- neg 0,0
-- stw 0,PID(2)
--
-- DO_CALL (SYS_ify (vfork))
--
-- cmpwi 1,3,0
-- beqlr- 1
--
-- lwz 0,PID(2)
-- neg 0,0
-- stw 0,PID(2)
--
-- PSEUDO_RET
--
--PSEUDO_END (__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
-deleted file mode 100644
-index 12e47b3..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* Copyright (C) 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#define _ERRNO_H 1
--#include <bits/errno.h>
--#include <bits/kernel-features.h>
--#include <tcb-offsets.h>
--
--/* Clone the calling process, but without copying the whole address space.
-- The calling process is suspended until the new process exits or is
-- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
-- and the process ID of the new process to the old process. */
--
--ENTRY (__vfork)
-- lwz 0,PID(13)
-- neg 0,0
-- stw 0,PID(13)
--
-- DO_CALL (SYS_ify (vfork))
--
-- cmpwi 1,3,0
-- beqlr- 1
--
-- lwz 0,PID(13)
-- neg 0,0
-- stw 0,PID(13)
--
-- PSEUDO_RET
--
--PSEUDO_END (__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
-deleted file mode 100644
-index 0225219..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
-+++ /dev/null
-@@ -1,5 +0,0 @@
--#if defined __powerpc64__
--# include "powerpc64/pt-vfork.S"
--#else
--# include "powerpc32/pt-vfork.S"
--#endif
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
-index a8249e0..9ebbda5 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \
-+libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \
- pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \
- lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \
- pthread_cond_broadcast.S pthread_cond_signal.S \
-@@ -17,7 +17,6 @@ libc_linux_arch_SSRC = libc-lowlevellock.S clone.S vfork.S
-
- ASFLAGS += -DUSE___THREAD
-
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-pthread_once.S = -D_LIBC_REENTRANT
- ASFLAGS-pthread_rwlock_wrlock.S = -D_LIBC_REENTRANT
- ASFLAGS-pthread_rwlock_rdlock.S = -D_LIBC_REENTRANT
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
-deleted file mode 100644
-index 56aa6d0..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
-+++ /dev/null
-@@ -1,64 +0,0 @@
--/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#define _ERRNO_H 1
--#include <bits/errno.h>
--#include <tcb-offsets.h>
--
--/* Clone the calling process, but without copying the whole address space.
-- The calling process is suspended until the new process exits or is
-- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
-- and the process ID of the new process to the old process. */
--
--ENTRY (__vfork)
-- /* Save the PID value. */
-- stc gbr, r2
-- mov.w .L2, r0
-- mov.l @(r0,r2), r4
-- neg r4, r1
-- mov.l r1, @(r0,r2)
--
-- mov.w .L1, r3
-- trapa #0x10
-- mov r0, r1
--
-- /* Restore the old PID value in the parent. */
-- tst r0, r0
-- bt/s 2f
-- stc gbr, r2
-- mov.w .L2, r0
-- mov.l r4, @(r0,r2)
-- mov r1, r0
--2:
-- mov #-12, r2
-- shad r2, r1
-- not r1, r1 // r1=0 means r0 = -1 to -4095
-- tst r1, r1 // i.e. error in linux
-- bf .Lpseudo_end
-- SYSCALL_ERROR_HANDLER
--.Lpseudo_end:
-- rts
-- nop
--.L1:
-- .word __NR_vfork
--.L2:
-- .word PID - TLS_PRE_TCB_SIZE
--
--PSEUDO_END (__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
-index 102c0da..aedad2c 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S clone.S
-+libpthread_linux_arch_SSRC = clone.S
- libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
- pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
- pt-__syscall_error.c
-@@ -17,7 +17,6 @@ librt_linux_arch_CSRC = pt-__syscall_error.c
-
- ASFLAGS += -DUSE___THREAD
-
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
-deleted file mode 100644
-index 37231a8..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
-+++ /dev/null
-@@ -1,44 +0,0 @@
--/* Copyright (C) 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <sysdep.h>
--#include <tcb-offsets.h>
--
-- .text
-- .globl __syscall_error
--ENTRY(__vfork)
-- ld [%g7 + PID], %o5
-- sub %g0, %o5, %o4
-- st %o4, [%g7 + PID]
--
-- LOADSYSCALL(vfork)
-- ta 0x10
-- bcc 2f
-- mov %o7, %g1
-- st %o5, [%g7 + PID]
-- call __syscall_error
-- mov %g1, %o7
--2: sub %o1, 1, %o1
-- andcc %o0, %o1, %o0
-- bne,a 1f
-- st %o5, [%g7 + PID]
--1: retl
-- nop
--END(__vfork)
--
--weak_alias (__vfork, vfork)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
-index 71df986..7c2505f 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
-
--libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \
-+libpthread_linux_arch_SSRC = clone.S pthread_once.S \
- lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \
- sem_post.S sem_timedwait.S lowlevelrobustlock.S \
- sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
-@@ -21,7 +21,6 @@ librt_linux_arch_SSRC = librt-cancellation.S
- ASFLAGS += -DUSE___THREAD
-
- CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
--ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
- ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
-deleted file mode 100644
-index 08a085c..0000000
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
-+++ /dev/null
-@@ -1,32 +0,0 @@
--/* Copyright (C) 2004 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- The GNU C Library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <http://www.gnu.org/licenses/>. */
--
--#include <tcb-offsets.h>
--
--#define SAVE_PID \
-- movl %fs:PID, %esi; \
-- movl %esi, %edx; \
-- negl %edx; \
-- movl %edx, %fs:PID
--
--#define RESTORE_PID \
-- testq %rax, %rax; \
-- je 1f; \
-- movl %esi, %fs:PID; \
--1:
--
--#include <../../../../../../../libc/sysdeps/linux/x86_64/vfork.S>
---
-1.8.5.2 (Apple Git-48)
-