From patchwork Tue Jul 28 13:32:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 501221 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 4A9E4140D25 for ; Tue, 28 Jul 2015 23:32:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5C97595518; Tue, 28 Jul 2015 13:32:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z15EYFokS95M; Tue, 28 Jul 2015 13:32:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C2DA495501; Tue, 28 Jul 2015 13:32:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CC43F1C2131 for ; Tue, 28 Jul 2015 13:32:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C2DA091950 for ; Tue, 28 Jul 2015 13:32:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OPUR1MW6fc2D for ; Tue, 28 Jul 2015 13:32:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.47.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8637591943 for ; Tue, 28 Jul 2015 13:32:41 +0000 (UTC) Received: from us02secmta1.synopsys.com (us02secmta1.synopsys.com [10.12.235.96]) by smtprelay.synopsys.com (Postfix) with ESMTP id B067024E125C; Tue, 28 Jul 2015 06:32:40 -0700 (PDT) Received: from us02secmta1.internal.synopsys.com (us02secmta1.internal.synopsys.com [127.0.0.1]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id ADF844E229; Tue, 28 Jul 2015 06:32:40 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 59FA94E228; Tue, 28 Jul 2015 06:32:40 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 3E70DC52; Tue, 28 Jul 2015 06:32:40 -0700 (PDT) Received: from abrodkin-e7440l.internal.synopsys.com (unknown [10.225.15.67]) by mailhost.synopsys.com (Postfix) with ESMTP id 10D09C3A; Tue, 28 Jul 2015 06:32:37 -0700 (PDT) From: Alexey Brodkin To: buildroot@busybox.net Date: Tue, 28 Jul 2015 16:32:33 +0300 Message-Id: <1438090353-30077-1-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.4.3 Cc: Thomas Petazzoni , Alexey Brodkin Subject: [Buildroot] [PATCH] uclibc: arc-2015.06 - add patches on top of release X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This commit adds 2 patches on top of arc-2015.06 release: 0001-nptl-remove-duplicate-vfork-in-libpthread.patch 0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch The first patch fixes multiple build issues when using static build like http://autobuild.buildroot.net/results/b704016acfa38e7998739a2c70bcf6020c59bda8/ The second patch allows for building uClibc for ARCv2 based CPUs that doesn't have 64-bit load/store capabilities. Both patches should be a part of the next release/update of ARC GNU tools so then they should be removed from Buildroot. Signed-off-by: Alexey Brodkin Cc: Thomas Petazzoni Cc: Peter Korsgaard --- ...nptl-remove-duplicate-vfork-in-libpthread.patch | 722 +++++++++++++++++++++ ...e-memset-so-it-could-be-used-without-doub.patch | 81 +++ 2 files changed, 803 insertions(+) create mode 100644 package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch create mode 100644 package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch diff --git a/package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch b/package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch new file mode 100644 index 0000000..6b609af --- /dev/null +++ b/package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch @@ -0,0 +1,722 @@ +From a22a0030f32b828c0f2e804d1ed1fe567ddab680 Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sat, 20 Sep 2014 22:09:00 +0200 +Subject: [PATCH] nptl: remove duplicate vfork() in libpthread + +Automatic patching via two oneliners by Bernhard Reutner-Fischer : +sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' -e '/^ASFLAGS-pt-vfork\./d' $(git grep -l pt-vfork libpthread/nptl/sysdeps) +find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \; + +Reported-By: Thomas Petazzoni +Tested-by: Thomas Petazzoni +Signed-off-by: Waldemar Brodkorb +--- + .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S | 42 -------------- + .../nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S | 7 --- + .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S | 37 ------------ + .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 67 ---------------------- + .../sysdeps/unix/sysv/linux/metag/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S | 51 ---------------- + .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S | 37 ------------ + .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 2 +- + .../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 | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S | 64 --------------------- + .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 44 -------------- + .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 32 ----------- + 21 files changed, 9 insertions(+), 491 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 +- . */ +- +-#include +-#include +- +-#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 8e3c7b0..3b9db6a 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 + +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 c8d5d4a..e61072e 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 +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 +- . */ +- +-#include +- +-/* 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 fff0dae..9dc878c 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 +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 . +- +- 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 +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* 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 4d02d0c..ddc7680 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 +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 +-#include +- +-#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 4a3d0f2..f87dedc 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 +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 +- . */ +- +-#include +-#include +- +-/* 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 21b9b72..df4bb69 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 +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 , 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 +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* 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 , 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 +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* 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 154dd6e..908d9e1 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 \ +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 +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +- +-/* 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 2b2b5f5..01a9e87 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 +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 , 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 +- . */ +- +-#include +-#include +- +- .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 ebd5060..af14164 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 \ +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 +- . */ +- +-#include +- +-#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> +-- +2.4.3 + diff --git a/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch b/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch new file mode 100644 index 0000000..647f97e --- /dev/null +++ b/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch @@ -0,0 +1,81 @@ +From 9b79d39b027f0a44215c4c13f7fd23b710727c37 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Thu, 16 Jul 2015 11:38:29 +0300 +Subject: [PATCH] ARCv2: update memset() so it could be used without double + load/stores + +Existing version of memset() relies on existence of 64-bit load/stores. +While ARC HS38 may not have those instructions implemented in SoC. + +Proposed implementation checks if "-mno-ll64" option was passed to gcc +(for ARCv2 "-mll64" is set implicitly by default) by checking __LL64__ +definition and if it is not defined uses 32-bit load/stores. + +Signed-off-by: Claudiu Zissulescu +Signed-off-by: Alexey Brodkin +Cc: Vineet Gupta +--- + libc/string/arc/arcv2/memset.S | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/libc/string/arc/arcv2/memset.S b/libc/string/arc/arcv2/memset.S +index d076ad1..0918d37 100644 +--- a/libc/string/arc/arcv2/memset.S ++++ b/libc/string/arc/arcv2/memset.S +@@ -52,6 +52,7 @@ ENTRY(memset) + lpnz @.Lset64bytes + ;; LOOP START + PREWRITE(r3, 64) ;Prefetch the next write location ++#ifdef __LL64__ + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] +@@ -60,16 +61,45 @@ ENTRY(memset) + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] ++#else ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++#endif + .Lset64bytes: + + lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes + lpnz .Lset32bytes + ;; LOOP START + prefetchw [r3, 32] ;Prefetch the next write location ++#ifdef __LL64__ + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] ++#else ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++#endif + .Lset32bytes: + + and.f lp_count, r2, 0x1F ;Last remaining 31 bytes +-- +2.4.3 +