diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | Makerules | 1 | ||||
-rw-r--r-- | extra/config/Makefile | 2 | ||||
-rw-r--r-- | include/libc-symbols.h | 4 | ||||
-rw-r--r-- | ldso/ldso/arm/elfinterp.c | 2 | ||||
-rw-r--r-- | ldso/ldso/i386/elfinterp.c | 2 | ||||
-rw-r--r-- | ldso/ldso/mips/elfinterp.c | 2 | ||||
-rw-r--r-- | ldso/ldso/sh/dl-sysdep.h | 7 | ||||
-rw-r--r-- | ldso/ldso/sh/elfinterp.c | 4 | ||||
-rw-r--r-- | ldso/ldso/sparc/elfinterp.c | 2 | ||||
-rw-r--r-- | libc/inet/resolv.c | 6 | ||||
-rw-r--r-- | libc/unistd/confstr.c | 9 | ||||
-rw-r--r-- | utils/.gitignore | 6 |
13 files changed, 22 insertions, 27 deletions
diff --git a/Makefile.in b/Makefile.in index 412826f3b..691a59741 100644 --- a/Makefile.in +++ b/Makefile.in @@ -433,7 +433,7 @@ defconfig: $(top_builddir)extra/config/conf -D extra/Configs/defconfigs/$(ARCH) menuconfig-clean-y: - $(Q)$(MAKE) -C extra/config menuconfig_clean + $(Q)$(MAKE) -C extra/config CLEAN_extra/config include_clean: $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h @@ -309,6 +309,7 @@ endef CFLAGS-.os+=$(PICFLAG) CFLAGS-.oS+=$(PICFLAG) -DSHARED +$(top_srcdir)%.i: | pregen $(top_builddir)%.o: $(top_srcdir)%.c FORCE ; $(compile.c) $(top_builddir)%.os: $(top_srcdir)%.c FORCE ; $(compile.c) $(top_builddir)%.oS: $(top_srcdir)%.c FORCE ; $(compile.c) diff --git a/extra/config/Makefile b/extra/config/Makefile index ce406adc2..800f750d3 100644 --- a/extra/config/Makefile +++ b/extra/config/Makefile @@ -73,7 +73,7 @@ $(obj)/%:: $(top_srcdir)$(src)/%_shipped @$(disp_gen) $(Q)cat $< > $@ endif -menuconfig_clean: +CLEAN_extra/config menuconfig_clean: $(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o) distclean: clean $(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \ diff --git a/include/libc-symbols.h b/include/libc-symbols.h index b2e0771fc..2800fe25c 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -86,9 +86,9 @@ #endif #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -# define attribute_optimize(lvl) __attribute__ ((optimize(x))) +# define attribute_optimize(x) __attribute__ ((optimize(x))) #else -# define attribute_optimize(lvl) +# define attribute_optimize(x) #endif #define attribute_unused __attribute__ ((unused)) diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c index bf7426790..9bbf92c8c 100644 --- a/ldso/ldso/arm/elfinterp.c +++ b/ldso/ldso/arm/elfinterp.c @@ -276,7 +276,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, _dl_memcpy((void *) reloc_addr, (void *) symbol_addr, symtab[symtab_index].st_size); break; -#if USE_TLS +#if defined USE_TLS && USE_TLS case R_ARM_TLS_DTPMOD32: *reloc_addr = def_mod->l_tls_modid; break; diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c index 649c207f9..a01c1d020 100644 --- a/ldso/ldso/i386/elfinterp.c +++ b/ldso/ldso/i386/elfinterp.c @@ -228,7 +228,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope, symtab[symtab_index].st_size); } break; -#if USE_TLS +#if defined USE_TLS && USE_TLS case R_386_TLS_DTPMOD32: *reloc_addr = tls_tpnt->l_tls_modid; break; diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c index 149fc5674..b6e0932c7 100644 --- a/ldso/ldso/mips/elfinterp.c +++ b/ldso/ldso/mips/elfinterp.c @@ -201,7 +201,7 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt, } switch (reloc_type) { -#if USE_TLS +#if defined USE_TLS && USE_TLS # if _MIPS_SIM == _MIPS_SIM_ABI64 case R_MIPS_TLS_DTPMOD64: case R_MIPS_TLS_DTPREL64: diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h index 56e1820f3..21244ec1f 100644 --- a/ldso/ldso/sh/dl-sysdep.h +++ b/ldso/ldso/sh/dl-sysdep.h @@ -6,7 +6,6 @@ /* Define this if the system uses RELOCA. */ #define ELF_USES_RELOCA #include <elf.h> -#include <tls.h> /* * Initialization sequence for a GOT. */ @@ -89,17 +88,11 @@ _dl_urem(unsigned int n, unsigned int base) define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ -#if defined USE_TLS # define elf_machine_type_class(type) \ ((((type) == R_SH_JMP_SLOT || (type) == R_SH_TLS_DTPMOD32 \ || (type) == R_SH_TLS_DTPOFF32 || (type) == R_SH_TLS_TPOFF32) \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY)) -#else -#define elf_machine_type_class(type) \ - ((((type) == R_SH_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY)) -#endif /* Return the link-time address of _DYNAMIC. Conveniently, this is the first element of the GOT. This must be inlined in a function which diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index 10b944380..715eadc15 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -192,7 +192,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, old_val = *reloc_addr; #endif -#if USE_TLS +#if defined USE_TLS && USE_TLS /* In case of a TLS reloc, tls_tpnt NULL means we have an 'anonymous' symbol. This is the case for a static tls variable, so the lookup module is just that one is referencing the tls variable. */ @@ -225,7 +225,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, case R_SH_RELATIVE: *reloc_addr = (unsigned long) tpnt->loadaddr + rpnt->r_addend; break; -#if USE_TLS +#if defined USE_TLS && USE_TLS case R_SH_TLS_DTPMOD32: *reloc_addr = tls_tpnt->l_tls_modid; break; diff --git a/ldso/ldso/sparc/elfinterp.c b/ldso/ldso/sparc/elfinterp.c index 75e77772c..56335cb5c 100644 --- a/ldso/ldso/sparc/elfinterp.c +++ b/ldso/ldso/sparc/elfinterp.c @@ -272,7 +272,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope, } else _dl_dprintf(_dl_debug_file, "no symbol_addr to copy !?\n"); break; -#if USE_TLS +#if defined USE_TLS && USE_TLS case R_SPARC_TLS_DTPMOD32: *reloc_addr = tls_tpnt->l_tls_modid; break; diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 9459199da..84289a619 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -905,8 +905,8 @@ __UCLIBC_MUTEX_INIT(__resolv_lock, PTHREAD_MUTEX_INITIALIZER); /* Protected by __resolv_lock */ void (*__res_sync)(void); /*uint32_t __resolv_opts; */ -uint8_t __resolv_timeout; -uint8_t __resolv_attempts; +uint8_t __resolv_timeout = RES_TIMEOUT; +uint8_t __resolv_attempts = RES_DFLRETRY; unsigned __nameservers; unsigned __searchdomains; sockaddr46_t *__nameserver; @@ -1062,8 +1062,6 @@ void attribute_hidden __open_nameservers(void) if (p == NULL || (p1 = strchr(p, ':')) == NULL) continue; *p1++ = '\0'; - if (p1 == NULL) - continue; if (strcmp(p, "timeout") == 0) what = &__resolv_timeout; else if (strcmp(p, "attempts") == 0) diff --git a/libc/unistd/confstr.c b/libc/unistd/confstr.c index 8cd4ac59e..fc0bd599e 100644 --- a/libc/unistd/confstr.c +++ b/libc/unistd/confstr.c @@ -24,7 +24,6 @@ #define CS_PATH "/bin:/usr/bin" -#define QUOTEME(x) #x /* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes of BUF with the value corresponding to NAME and zero-terminate BUF. @@ -53,11 +52,13 @@ size_t confstr (int name, char *buf, size_t len) string_len = sizeof("linuxthreads-x.xx"); # elif defined __UCLIBC_HAS_THREADS_NATIVE__ # define __NPTL_VERSION ("NPTL " \ - QUOTEME(__UCLIBC_MAJOR__) "." \ - QUOTEME(__UCLIBC_MINOR__) "." \ - QUOTEME(__UCLIBC_SUBLEVEL__) ) + __stringify(__UCLIBC_MAJOR__) "." \ + __stringify(__UCLIBC_MINOR__) "." \ + __stringify(__UCLIBC_SUBLEVEL__)) string = __NPTL_VERSION; string_len = sizeof(__NPTL_VERSION); +# else +# error unable to determine thread impl # endif break; #endif diff --git a/utils/.gitignore b/utils/.gitignore index a0ce36637..7cdfa90c1 100644 --- a/utils/.gitignore +++ b/utils/.gitignore @@ -1,9 +1,11 @@ +getconf +getconf.host +iconv +iconv.host ldconfig ldconfig.host ldd ldd.host -iconv -iconv.host locale locale.host getconf |