diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-04 15:18:54 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-04 15:18:54 +0200 |
commit | 36043b37739dffdaea8d31457570810e492268d7 (patch) | |
tree | 0045cba85b862ecca89cf7b5aff336bddbabad89 | |
parent | a5352e212fcd4da83c8ff4fe542ef23c8e3187f8 (diff) | |
parent | 6d550ddd129b18cf800eab604f74536754526cd8 (diff) |
Merge remote-tracking branch 'origin/upstream'
94 files changed, 814 insertions, 5938 deletions
@@ -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 @@ -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 */ |