diff options
| -rw-r--r-- | Makerules | 6 | ||||
| -rw-r--r-- | include/fcntl.h | 42 | ||||
| -rw-r--r-- | include/sys/resource.h | 8 | ||||
| -rw-r--r-- | include/sys/time.h | 31 | ||||
| -rw-r--r-- | libc/misc/utmp/utent.c | 7 | ||||
| -rw-r--r-- | libc/stdlib/random.c | 7 | ||||
| -rw-r--r-- | libc/stdlib/random_r.c | 129 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/getdents.c | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/getdents64.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/mmap64.c | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/hppa/bits/setjmp.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/mips/sys/tas.h | 33 | ||||
| -rw-r--r-- | libpthread/linuxthreads.old/Makefile.in | 23 | ||||
| -rw-r--r-- | libpthread/linuxthreads.old_db/Makefile.in | 6 | ||||
| -rw-r--r-- | libpthread/linuxthreads_db/Makefile.in | 20 | 
15 files changed, 187 insertions, 131 deletions
@@ -142,13 +142,13 @@ $(interp): $(top_builddir)lib/interp.c  	$(Q)$(STRIPTOOL) -x -R .note -R .comment $@  $(ldso): -	cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@)) +	@cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))  $(libc): -	cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@)) +	@cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))  $(headers_dep): -	cd $(top_builddir); $(MAKE) headers +	@cd $(top_builddir); $(MAKE) headers  #ifeq ($(HAVE_ELF),y)  CRT=crt1 diff --git a/include/fcntl.h b/include/fcntl.h index 444b359c0..b7b62ae33 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,1992,1994-2001,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1994-2001,2003,2004,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 @@ -55,6 +56,15 @@ __BEGIN_DECLS  # define SEEK_END	2	/* Seek from end of file.  */  #endif	/* XPG */ +#if 0 /*def __USE_GNU*/ +# define AT_FDCWD		-100	/* Special value used to indicate +					   openat should use the current +					   working directory. */ +# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */ +# define AT_REMOVEDIR		0x200	/* Remove directory instead of +					   unlinking file.  */ +#endif +  /* Do the file control operation described by CMD on FD.     The remaining arguments are interpreted depending on CMD. @@ -90,6 +100,32 @@ extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64)  extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));  #endif +#if 0 /*def __USE_GNU*/ +/* Similar to OPEN but a relative path name is interpreted relative to +   the directory for which FD is a descriptor. + +   NOTE: some other OPENAT implementation support additional functionality +   through this interface, especially using the O_XATTR flag.  This is not +   yet supported here. + +   This function is a cancellation point and therefore not marked with +   __THROW.  */ +# ifndef __USE_FILE_OFFSET64 +extern int openat (int __fd, __const char *__file, int __oflag, ...) +     __nonnull ((2)); +# else +#  ifdef __REDIRECT +extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag, +				...), openat64) __nonnull ((2)); +#  else +#   define openat openat64 +#  endif +# endif + +extern int openat64 (int __fd, __const char *__file, int __oflag, ...) +     __nonnull ((2)); +#endif +  /* Create and open FILE, with mode MODE.  This takes an `int' MODE     argument because that is what `mode_t' will be widened to. @@ -145,8 +181,8 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len);  extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,  			  int __advise) __THROW;  # else -# ifdef __REDIRECT -extern int __REDIRECT (posix_fadvise, (int __fd, __off64_t __offset, +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,  				       __off64_t __len, int __advise),  		       posix_fadvise64);  # else diff --git a/include/sys/resource.h b/include/sys/resource.h index 4f5dc9b84..391274137 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -51,8 +51,8 @@ typedef int __priority_which_t;  extern int getrlimit (__rlimit_resource_t __resource,  		      struct rlimit *__rlimits) __THROW;  #else -# ifdef __REDIRECT -extern int __REDIRECT (getrlimit, (__rlimit_resource_t __resource, +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,  				       struct rlimit *__rlimits), getrlimit64);  # else  #  define getrlimit getrlimit64 @@ -70,8 +70,8 @@ extern int getrlimit64 (__rlimit_resource_t __resource,  extern int setrlimit (__rlimit_resource_t __resource,  		      __const struct rlimit *__rlimits) __THROW;  #else -# ifdef __REDIRECT -extern int __REDIRECT (setrlimit, (__rlimit_resource_t __resource, +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,  				       __const struct rlimit *__rlimits),  			   setrlimit64);  # else diff --git a/include/sys/time.h b/include/sys/time.h index f051d58c4..66fb9e021 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1994,1996-2002,2003,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 @@ -70,13 +70,14 @@ typedef void *__restrict __timezone_ptr_t;     NOTE: This form of timezone information is obsolete.     Use the functions and variables declared in <time.h> instead.  */  extern int gettimeofday (struct timeval *__restrict __tv, -			 __timezone_ptr_t __tz) __THROW; +			 __timezone_ptr_t __tz) __THROW __nonnull ((1));  #ifdef __USE_BSD  /* Set the current time of day and timezone information.     This call is restricted to the super-user.  */  extern int settimeofday (__const struct timeval *__tv, -			 __const struct timezone *__tz) __THROW; +			 __const struct timezone *__tz) +     __THROW __nonnull ((1));  /* Adjust the current time of day by the amount in DELTA.     If OLDDELTA is not NULL, it is filled in with the amount @@ -132,10 +133,28 @@ extern int setitimer (__itimer_which_t __which,  		      __const struct itimerval *__restrict __new,  		      struct itimerval *__restrict __old) __THROW; -/* Change the access time of FILE to TVP[0] and -   the modification time of FILE to TVP[1].  */ +/* Change the access time of FILE to TVP[0] and the modification time of +   FILE to TVP[1].  If TVP is a null pointer, use the current time instead. +   Returns 0 on success, -1 on errors.  */  extern int utimes (__const char *__file, __const struct timeval __tvp[2]) -     __THROW; +     __THROW __nonnull ((1)); + +#if 0 /*def __USE_BSD*/ +/* Same as `utimes', but does not follow symbolic links.  */ +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) +     __THROW __nonnull ((1)); + +/* Same as `utimes', but takes an open file descriptor instead of a name.  */ +extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; +#endif + +#if 0 /*def __USE_GNU*/ +/* Change the access time of FILE relative to FD to TVP[0] and the +   modification time of FILE to TVP[1].  If TVP is a null pointer, use +   the current time instead.  Returns 0 on success, -1 on errors.  */ +extern int futimesat (int __fd, __const char *__file, +		      __const struct timeval __tvp[2]) __THROW; +#endif  #ifdef __USE_BSD diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index c1d8d6fa2..aa74cb544 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -108,7 +108,7 @@ struct utmp *getutent(void)  }  /* Locking is done in __getutent */ -struct utmp *getutid (const struct utmp *utmp_entry) +struct utmp attribute_hidden *__getutid (const struct utmp *utmp_entry)  {      struct utmp *lutmp; @@ -133,6 +133,7 @@ struct utmp *getutid (const struct utmp *utmp_entry)      return NULL;  } +strong_alias(__getutid,getutid)  /* Locking is done in __getutent */  struct utmp *getutline(const struct utmp *utmp_entry) @@ -150,6 +151,8 @@ struct utmp *getutline(const struct utmp *utmp_entry)      return NULL;  } +extern struct utmp *__getutid (__const struct utmp *__id) attribute_hidden; +  struct utmp *pututline (const struct utmp *utmp_entry)  {      LOCK; @@ -157,7 +160,7 @@ struct utmp *pututline (const struct utmp *utmp_entry)         the file pointer where they want it, everything will work out. */      lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR); -    if (getutid(utmp_entry) != NULL) { +    if (__getutid(utmp_entry) != NULL) {  	lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);  	if (write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))  	    return NULL; diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c index b0a00e15c..3ffa50690 100644 --- a/libc/stdlib/random.c +++ b/libc/stdlib/random.c @@ -22,6 +22,9 @@   * Rewritten to use reentrant functions by Ulrich Drepper, 1995.   */ +#define random_r __random_r +#define srandom_r __srandom_r +  #define _GNU_SOURCE  #include <features.h>  #include <limits.h> @@ -243,7 +246,7 @@ char * setstate (char *arg_state)     rear pointers can't wrap on the same call by not testing the rear     pointer if the front one has wrapped.  Returns a 31-bit random number.  */ -long int random () +long int attribute_hidden __random (void)  {    int32_t retval; @@ -252,4 +255,4 @@ long int random ()    __pthread_mutex_unlock(&lock);    return retval;  } - +strong_alias(__random,random) diff --git a/libc/stdlib/random_r.c b/libc/stdlib/random_r.c index fce3a98ab..9e203f0d5 100644 --- a/libc/stdlib/random_r.c +++ b/libc/stdlib/random_r.c @@ -123,6 +123,66 @@ static const struct random_poly_info random_poly_info = +/* If we are using the trivial TYPE_0 R.N.G., just do the old linear +   congruential bit.  Otherwise, we do our fancy trinomial stuff, which is the +   same in all the other cases due to all the global variables that have been +   set up.  The basic operation is to add the number at the rear pointer into +   the one at the front pointer.  Then both pointers are advanced to the next +   location cyclically in the table.  The value returned is the sum generated, +   reduced to 31 bits by throwing away the "least random" low bit. +   Note: The code takes advantage of the fact that both the front and +   rear pointers can't wrap on the same call by not testing the rear +   pointer if the front one has wrapped.  Returns a 31-bit random number.  */ + +int attribute_hidden __random_r(struct random_data *buf, int32_t *result) +{ +    int32_t *state; + +    if (buf == NULL || result == NULL) +	goto fail; + +    state = buf->state; + +    if (buf->rand_type == TYPE_0) +    { +	int32_t val = state[0]; +	val = ((state[0] * 1103515245) + 12345) & 0x7fffffff; +	state[0] = val; +	*result = val; +    } +    else +    { +	int32_t *fptr = buf->fptr; +	int32_t *rptr = buf->rptr; +	int32_t *end_ptr = buf->end_ptr; +	int32_t val; + +	val = *fptr += *rptr; +	/* Chucking least random bit.  */ +	*result = (val >> 1) & 0x7fffffff; +	++fptr; +	if (fptr >= end_ptr) +	{ +	    fptr = state; +	    ++rptr; +	} +	else +	{ +	    ++rptr; +	    if (rptr >= end_ptr) +		rptr = state; +	} +	buf->fptr = fptr; +	buf->rptr = rptr; +    } +    return 0; + +fail: +    __set_errno (EINVAL); +    return -1; +} +strong_alias(__random_r,random_r) +  /* Initialize the random number generator based on the given seed.  If the     type is the trivial no-state-information type, just remember the seed.     Otherwise, initializes state[] based on the given "seed" via a linear @@ -131,7 +191,7 @@ static const struct random_poly_info random_poly_info =     information a given number of times to get rid of any initial dependencies     introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]     for default usage relies on values produced by this routine.  */ -int srandom_r (unsigned int seed, struct random_data *buf) +int attribute_hidden __srandom_r (unsigned int seed, struct random_data *buf)  {      int type;      int32_t *state; @@ -176,7 +236,7 @@ int srandom_r (unsigned int seed, struct random_data *buf)      while (--kc >= 0)      {  	int32_t discard; -	(void) random_r (buf, &discard); +	(void) __random_r (buf, &discard);      }  done: @@ -185,6 +245,7 @@ done:  fail:      return -1;  } +strong_alias(__srandom_r,srandom_r)  /* Initialize the state information in the given array of N bytes for     future random number generation.  Based on the number of bytes we @@ -237,7 +298,7 @@ int initstate_r (seed, arg_state, n, buf)      buf->state = state; -    srandom_r (seed, buf); +    __srandom_r (seed, buf);      state[-1] = TYPE_0;      if (type != TYPE_0) @@ -301,65 +362,3 @@ fail:      __set_errno (EINVAL);      return -1;  } - -/* If we are using the trivial TYPE_0 R.N.G., just do the old linear -   congruential bit.  Otherwise, we do our fancy trinomial stuff, which is the -   same in all the other cases due to all the global variables that have been -   set up.  The basic operation is to add the number at the rear pointer into -   the one at the front pointer.  Then both pointers are advanced to the next -   location cyclically in the table.  The value returned is the sum generated, -   reduced to 31 bits by throwing away the "least random" low bit. -   Note: The code takes advantage of the fact that both the front and -   rear pointers can't wrap on the same call by not testing the rear -   pointer if the front one has wrapped.  Returns a 31-bit random number.  */ - -int random_r (buf, result) -     struct random_data *buf; -     int32_t *result; -{ -    int32_t *state; - -    if (buf == NULL || result == NULL) -	goto fail; - -    state = buf->state; - -    if (buf->rand_type == TYPE_0) -    { -	int32_t val = state[0]; -	val = ((state[0] * 1103515245) + 12345) & 0x7fffffff; -	state[0] = val; -	*result = val; -    } -    else -    { -	int32_t *fptr = buf->fptr; -	int32_t *rptr = buf->rptr; -	int32_t *end_ptr = buf->end_ptr; -	int32_t val; - -	val = *fptr += *rptr; -	/* Chucking least random bit.  */ -	*result = (val >> 1) & 0x7fffffff; -	++fptr; -	if (fptr >= end_ptr) -	{ -	    fptr = state; -	    ++rptr; -	} -	else -	{ -	    ++rptr; -	    if (rptr >= end_ptr) -		rptr = state; -	} -	buf->fptr = fptr; -	buf->rptr = rptr; -    } -    return 0; - -fail: -    __set_errno (EINVAL); -    return -1; -} - diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 623041866..876420664 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -26,7 +26,6 @@  #include <unistd.h>  #include <sys/param.h>  #include <sys/types.h> -#include "sysdep.h"  #include <sys/syscall.h> diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c index 7b4c0d4ce..e45d9d364 100644 --- a/libc/sysdeps/linux/common/getdents64.c +++ b/libc/sysdeps/linux/common/getdents64.c @@ -25,7 +25,6 @@  #include <stdint.h>  #include <string.h>  #include <unistd.h> -#include "sysdep.h"  #include <sys/param.h>  #include <sys/types.h>  #include <sys/syscall.h> @@ -110,4 +109,3 @@ ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes)      return(__getdents(fd, buf, nbytes));  }  #endif /* __UCLIBC_HAS_LFS__ */ - diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c index 969e1e227..7f329c6c9 100644 --- a/libc/sysdeps/linux/common/mmap64.c +++ b/libc/sysdeps/linux/common/mmap64.c @@ -22,7 +22,6 @@  #include <features.h>  #include <errno.h>  #include <unistd.h> -#include "sysdep.h"  #include <sys/mman.h> diff --git a/libc/sysdeps/linux/hppa/bits/setjmp.h b/libc/sysdeps/linux/hppa/bits/setjmp.h index 253e92603..4395b8f56 100644 --- a/libc/sysdeps/linux/hppa/bits/setjmp.h +++ b/libc/sysdeps/linux/hppa/bits/setjmp.h @@ -40,6 +40,6 @@ typedef double __jmp_buf[21];  /* Test if longjmp to JMPBUF would unwind the frame containing a local     variable at ADDRESS.  */  #define _JMPBUF_UNWINDS(_jmpbuf, _address)				\ -     ((void *)(_address) > (void *)(_jmpbuf[JB_SP])) +     ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))  #endif	/* bits/setjmp.h */ diff --git a/libc/sysdeps/linux/mips/sys/tas.h b/libc/sysdeps/linux/mips/sys/tas.h index 0c81dc2de..1183b867b 100644 --- a/libc/sysdeps/linux/mips/sys/tas.h +++ b/libc/sysdeps/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.     This file is part of the GNU C Library.     Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. @@ -22,7 +22,6 @@  #include <features.h>  #include <sgidefs.h> -#include <sys/sysmips.h>  __BEGIN_DECLS @@ -34,24 +33,26 @@ extern int _test_and_set (int *p, int v) __THROW;  #  define _EXTERN_INLINE extern __inline  # endif -# if (_MIPS_ISA >= _MIPS_ISA_MIPS2) -  _EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW +__NTH (_test_and_set (int *p, int v))  {    int r, t;    __asm__ __volatile__ -    ("1:\n\t" -     "ll	%0,%3\n\t" +    ("/* Inline test and set */\n" +     "1:\n\t"       ".set	push\n\t" -     ".set	noreorder\n\t" +#if _MIPS_SIM == _ABIO32 +     ".set	mips2\n\t" +#endif +     "ll	%0,%3\n\t" +     "move	%1,%4\n\t"       "beq	%0,%4,2f\n\t" -     " move	%1,%4\n\t" -     ".set	pop\n\t"       "sc	%1,%2\n\t" +     ".set	pop\n\t"       "beqz	%1,1b\n" -     "2:\n" +     "2:\n\t" +     "/* End test and set */"       : "=&r" (r), "=&r" (t), "=m" (*p)       : "m" (*p), "r" (v)       : "memory"); @@ -59,16 +60,6 @@ _test_and_set (int *p, int v) __THROW    return r;  } -# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - -_EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW -{ -  return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0); -} - -# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ -  #endif /* __USE_EXTERN_INLINES */  __END_DECLS diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in index 98ef6307b..79e47515c 100644 --- a/libpthread/linuxthreads.old/Makefile.in +++ b/libpthread/linuxthreads.old/Makefile.in @@ -50,7 +50,11 @@ endif  libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC)) -libpthread-a-y += $(libpthread_OBJ) +ifeq ($(DOPIC),y) +libpthread-a-y  += $(libpthread_OBJ:.o=.os) +else +libpthread-a-y  += $(libpthread_OBJ) +endif  libpthread-so-y += $(libpthread_OBJ:.o=.os)  libpthread-multi-y += $(libpthread_SRC) @@ -62,7 +66,11 @@ objclean-y += libpthread_clean  headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers  headers_clean-y += linuxthreads_headers_clean -$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a libc-y +ifeq ($(DOPIC),y) +$(top_builddir)lib/libpthread.so: $(top_builddir)lib/libpthread.a $(libc) +else +$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc) +endif  	$(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))  $(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y) @@ -74,14 +82,14 @@ else  endif  	$(do_ar) -ifeq ($(DOPIC),y) -$(top_builddir)lib/libpthread.a: $(libpthread-a-y:.o=.os) -else  $(top_builddir)lib/libpthread.a: $(libpthread-a-y) -endif  	$(Q)$(INSTALL) -d $(dir $@)  	$(Q)$(RM) $@ +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +	$(do_strip:-x=-X --strip-debug) +else  	$(do_strip) +endif  	$(do_ar)  linuxthreads_headers: @@ -90,9 +98,8 @@ linuxthreads_headers:  	$(INSTALL) -d $(top_builddir)include/bits  	$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/ -  linuxthreads_headers_clean: -	$(RM)	$(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \ +	$(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \  		$(top_builddir)include/bits/pthreadtypes.h  libpthread_clean: diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in index bad600d89..c203232e7 100644 --- a/libpthread/linuxthreads.old_db/Makefile.in +++ b/libpthread/linuxthreads.old_db/Makefile.in @@ -21,12 +21,12 @@ libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)  libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC)) +libthread_db-so-y := $(libthread_db_OBJ:.o=.os)  ifeq ($(DOPIC),y) -libthread_db-a-y := $(libthread_db_OBJ:.o=.os) +libthread_db-a-y  := $(libthread_db-so-y)  else -libthread_db-a-y := $(libthread_db_OBJ) +libthread_db-a-y  := $(libthread_db_OBJ)  endif -libthread_db-so-y := $(libthread_db_OBJ:.o=.os)  libthread_db-multi-y := $(libthread_db_SRC) diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in index c80e32c53..7833e1bad 100644 --- a/libpthread/linuxthreads_db/Makefile.in +++ b/libpthread/linuxthreads_db/Makefile.in @@ -22,8 +22,12 @@ libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)  libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC)) -libthread_db-a-y := $(libthread_db_OBJ)  libthread_db-so-y := $(libthread_db_OBJ:.o=.os) +ifeq ($(DOPIC),y) +libthread_db-a-y  := $(libthread_db-so-y) +else +libthread_db-a-y  := $(libthread_db_OBJ) +endif  libthread_db-multi-y := $(libthread_db_SRC) @@ -33,7 +37,11 @@ objclean-y += libthread_db_clean  headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers  headers_clean-y += linuxthreads_db_headers_clean -$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a libc-y +ifeq ($(DOPIC),y) +$(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc) +else +$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc) +endif  	$(call link.so,$(libthread_db_FULL_NAME),1)  $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y) @@ -41,16 +49,10 @@ $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)  	$(do_strip)  	$(do_ar) -ifeq ($(DOPIC),y) -$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y:.o=.os) -else -$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) $(libthread_db_OUT)/libthread_db_so.a -endif +$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)  	$(Q)$(INSTALL) -d $(dir $@)  	$(Q)$(RM) $@ -ifneq ($(DOPIC),y)  	$(do_strip) -endif  	$(do_ar)  linuxthreads_db_headers:  | 
