Browse Source

Merge remote branch 'origin/master' into nptl

Conflicts:
	libc/unistd/confstr.c

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley 14 years ago
parent
commit
6cc4f58c63

+ 1 - 1
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

+ 1 - 0
Makerules

@@ -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)

+ 1 - 1
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) \

+ 2 - 2
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))

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 1
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:

+ 0 - 7
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

+ 2 - 2
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;

+ 1 - 1
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;

+ 2 - 4
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)

+ 5 - 4
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

+ 4 - 2
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