summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-04 15:18:54 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-04 15:18:54 +0200
commit36043b37739dffdaea8d31457570810e492268d7 (patch)
tree0045cba85b862ecca89cf7b5aff336bddbabad89
parenta5352e212fcd4da83c8ff4fe542ef23c8e3187f8 (diff)
parent6d550ddd129b18cf800eab604f74536754526cd8 (diff)
Merge remote-tracking branch 'origin/upstream'
-rw-r--r--Makerules4
-rw-r--r--Rules.mak7
-rw-r--r--extra/Configs/Config.sparc6
-rw-r--r--extra/scripts/none.lds13
-rw-r--r--ldso/ldso/dl-elf.c2
-rw-r--r--libc/stdlib/system.c13
-rw-r--r--libc/string/sparc/sparc64/memchr.S258
-rw-r--r--libc/string/sparc/sparc64/memcpy.S922
-rw-r--r--libc/string/sparc/sparc64/memset.S316
-rw-r--r--libc/string/sparc/sparc64/sparcv9b/memcpy.S611
-rw-r--r--libc/string/sparc/sparc64/stpcpy.S270
-rw-r--r--libc/string/sparc/sparc64/strcat.S338
-rw-r--r--libc/string/sparc/sparc64/strchr.S485
-rw-r--r--libc/string/sparc/sparc64/strcmp.S278
-rw-r--r--libc/string/sparc/sparc64/strcpy.S244
-rw-r--r--libc/string/sparc/sparc64/strlen.S172
-rw-r--r--libc/sysdeps/linux/m68k/bits/huge_vall.h2
-rw-r--r--libc/sysdeps/linux/sparc/bits/setjmp.h31
-rw-r--r--libc/sysdeps/linux/sparc/bits/sigcontext.h35
-rw-r--r--libc/sysdeps/linux/sparc/crt1.S11
-rw-r--r--libc/sysdeps/linux/sparc/fork.S2
-rw-r--r--libc/sysdeps/linux/sparc/jmpbuf-unwind.h25
-rw-r--r--libc/sysdeps/linux/sparc/pipe.S2
-rw-r--r--libc/sysdeps/linux/sparc/qp_ops.c8
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/clone.S101
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/rem.S20
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/sdiv.S18
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/udiv.S15
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/umul.S15
-rw-r--r--libc/sysdeps/linux/sparc/sparcv9/urem.S17
-rw-r--r--libc/sysdeps/linux/sparc/sys/procfs.h88
-rw-r--r--libc/sysdeps/linux/sparc/vfork.S2
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/pt-machine.h86
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h82
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h104
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/pspinlock.c95
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/pt-machine.h86
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c87
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h82
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c93
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c92
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h104
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h100
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c1
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h99
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S63
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h102
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/vfork.S (renamed from libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S)0
-rw-r--r--libpthread/nptl/sysdeps/jmpbuf-unwind.h (renamed from libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h)0
-rw-r--r--libpthread/nptl/sysdeps/pthread_spin_lock.c (renamed from libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c)0
-rw-r--r--libpthread/nptl/sysdeps/pthread_spin_trylock.c (renamed from libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c)0
-rw-r--r--libpthread/nptl/sysdeps/pthreaddef.h (renamed from libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h)0
-rw-r--r--libpthread/nptl/sysdeps/sparc/Makefile.arch3
-rw-r--r--libpthread/nptl/sysdeps/sparc/jmpbuf-unwind.h32
-rw-r--r--libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c (renamed from libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c)17
-rw-r--r--libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c (renamed from libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c)7
-rw-r--r--libpthread/nptl/sysdeps/sparc/pthreaddef.h44
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c38
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c1
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c1
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h27
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c29
-rw-r--r--libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h39
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/clone.S7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S49
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c94
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c (renamed from libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c)0
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (renamed from libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c)0
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_trywait.c (renamed from libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c)0
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c (renamed from libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c)0
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S44
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c93
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h111
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S48
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S44
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h109
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S48
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h114
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/vfork.S53
-rw-r--r--test/Makefile2
-rw-r--r--test/README5
-rw-r--r--test/librt/Makefile.in4
-rw-r--r--test/math/Makefile.in3
-rw-r--r--test/nptl/tst-cancel4.c28
-rw-r--r--test/nptl/tst-sem3.c33
-rw-r--r--test/nptl/tst-sem4.c7
-rw-r--r--test/time/Makefile.in2
94 files changed, 814 insertions, 5938 deletions
diff --git a/Makerules b/Makerules
index 5030205c4..05d9548cb 100644
--- a/Makerules
+++ b/Makerules
@@ -240,7 +240,7 @@ cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) \
cmd_compile.i = $(cmd_compile.c:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)
cmd_compile.s = $(cmd_compile.c:-c=-S)
cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
-cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
+cmd_compile.S = $(filter-out -std=%, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
cmd_compile.mi= $(cmd_compile.m:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS)
@@ -303,7 +303,7 @@ define create-lds
$(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \
-Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
-Wl,--verbose 2>&1 | LC_ALL=C \
- sed -e '/^=========/,/^=========/!d;/^=========/d' \
+ $(SED) -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
endef
diff --git a/Rules.mak b/Rules.mak
index 19cc38a1e..cb657008c 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -201,7 +201,7 @@ check_as=$(shell \
if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \
then echo "-Wa,$(1)"; fi)
check_ld=$(shell \
- if $(CC) $(LDFLAG-fuse-ld) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \
+ if $(CC) $(LDFLAG-fuse-ld) $(CFLAG_-Wl--no-warn-mismatch) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \
then echo "$(1)"; fi)
# Use variable indirection here so that we can have variable
@@ -254,8 +254,11 @@ ARFLAGS:=cr
# Note: The check for -nostdlib has to be before all calls to check_ld
$(eval $(call check-gcc-var,-nostdlib))
-LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(EXTRA_UCLIBC_FLAGS))
# deliberately not named CFLAG-fuse-ld since unchecked and from user
+LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(EXTRA_UCLIBC_FLAGS))
+# failed to merge target specific data of file /dev/null
+# Could use -Wl,--script,$(top_srcdir)extra/scripts/none.lds as well.
+$(eval $(call check-ld-var,--no-warn-mismatch))
# Flags in OPTIMIZATION are used only for non-debug builds
diff --git a/extra/Configs/Config.sparc b/extra/Configs/Config.sparc
index c6180c831..47c8ac289 100644
--- a/extra/Configs/Config.sparc
+++ b/extra/Configs/Config.sparc
@@ -26,10 +26,4 @@ config CONFIG_SPARC_V7
config CONFIG_SPARC_V8
bool "SPARC v8"
-config CONFIG_SPARC_V9
- bool "SPARC v9"
-
-config CONFIG_SPARC_V9B
- bool "SPARC v9b"
-
endchoice
diff --git a/extra/scripts/none.lds b/extra/scripts/none.lds
new file mode 100644
index 000000000..d6bd05afc
--- /dev/null
+++ b/extra/scripts/none.lds
@@ -0,0 +1,13 @@
+/* GNU ld script
+ * Used by the build system to probe flags.
+ * Discards all output to avoid error
+ * "failed to merge target specific data of file %B". */
+TARGET(binary)
+INPUT(/dev/null)
+/* We could as well omit the whole SECTIONS block.
+ * This redundancy is just for clarity. */
+SECTIONS
+{
+ /DISCARD/ : { *(*) }
+}
+
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index 1b06bc172..54501d143 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -728,7 +728,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags,
void *new_addr;
new_addr = map_writeable (infile, ppnt, piclib, flags, libaddr);
if (!new_addr) {
- _dl_dprintf(_dl_debug_file, "Can't modify %s's text section.",
+ _dl_dprintf(2, "Can't modify %s's text section.",
libname);
_dl_exit(1);
}
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 151a229c6..8c5d25d51 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -18,13 +18,14 @@
#include <sysdep-cancel.h>
#endif
-extern __typeof(system) __libc_system;
-
-/* TODO: the cancellable version breaks on sparc currently,
- * need to figure out why still
- */
-#if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
+#if !defined __UCLIBC_HAS_THREADS_NATIVE__
+/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
+#include <sys/syscall.h>
+#ifndef __NR_vfork
+# define vfork fork
+#endif
+extern __typeof(system) __libc_system;
int __libc_system(const char *command)
{
int wait_val, pid;
diff --git a/libc/string/sparc/sparc64/memchr.S b/libc/string/sparc/sparc64/memchr.S
deleted file mode 100644
index 6467f7fff..000000000
--- a/libc/string/sparc/sparc64/memchr.S
+++ /dev/null
@@ -1,258 +0,0 @@
-/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less
- than N.
- For SPARC v9.
- Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jan Vondrak <jvon4518@ss1000.ms.mff.cuni.cz> and
- Jakub Jelinek <jj@ultra.linux.cz>.
- This version is developed using the same algorithm as the fast C
- version which carries the following introduction:
- Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
- with help from Dan Sahlin (dan@sics.se) and
- commentary by Jim Blandy (jimb@ai.mit.edu);
- adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
- and implemented by Roland McGrath (roland@ai.mit.edu).
-
- 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 <asm/asi.h>
-#ifndef XCC
-#define XCC xcc
-#define USE_BPR
- .register %g2, #scratch
- .register %g3, #scratch
-#endif
-
- /* Normally, this uses
- ((xword - 0x0101010101010101) & 0x8080808080808080) test
- to find out if any byte in xword could be zero. This is fast, but
- also gives false alarm for any byte in range 0x81-0xff. It does
- not matter for correctness, as if this test tells us there could
- be some zero byte, we check it byte by byte, but if bytes with
- high bits set are common in the strings, then this will give poor
- performance. You can #define EIGHTBIT_NOT_RARE and the algorithm
- will use one tick slower, but more precise test
- ((xword - 0x0101010101010101) & (~xword) & 0x8080808080808080),
- which does not give any false alarms (but if some bits are set,
- one cannot assume from it which bytes are zero and which are not).
- It is yet to be measured, what is the correct default for glibc
- in these days for an average user.
- */
-
- .text
- .align 32
-ENTRY(memchr)
- and %o1, 0xff, %o1 /* IEU0 Group */
-#ifdef USE_BPR
- brz,pn %o2, 12f /* CTI+IEU1 */
-#else
- tst %o2 /* IEU1 */
- be,pn %XCC, 12f /* CTI */
-#endif
- sll %o1, 8, %g3 /* IEU0 Group */
- add %o0, %o2, %o2 /* IEU1 */
-
- sethi %hi(0x01010101), %g1 /* IEU0 Group */
- or %g3, %o1, %g3 /* IEU1 */
- ldub [%o0], %o3 /* Load */
- sllx %g3, 16, %g5 /* IEU0 Group */
-
- or %g1, %lo(0x01010101), %g1 /* IEU1 */
- sllx %g1, 32, %g2 /* IEU0 Group */
- or %g3, %g5, %g3 /* IEU1 */
- sllx %g3, 32, %g5 /* IEU0 Group */