From 6c6720bb831b14c77d3eb8f5f7061e095df6ea47 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 15 Dec 2010 18:00:16 +0100 Subject: sh_fpu: Do not allow inclusion of fpu_control on not SH4 core Instead of emitting a warning even when compiling for SH4, stop compilation with an #error directive when not on SH4 core. Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/sh/fpu_control.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/sh/fpu_control.h b/libc/sysdeps/linux/sh/fpu_control.h index cbd889ece..da01725cb 100644 --- a/libc/sysdeps/linux/sh/fpu_control.h +++ b/libc/sysdeps/linux/sh/fpu_control.h @@ -20,7 +20,9 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H -#warning This file is only correct for sh4 +#ifndef __SH4__ +#error This file is only correct for sh4 +#endif /* masking of interrupts */ #define _FPU_MASK_VM 0x0800 /* Invalid operation */ -- cgit v1.2.3 From 5a1453f20c9ba7023f1836bdcd5ab06963f927a1 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Fri, 17 Dec 2010 08:11:12 +0100 Subject: libm_sh: Move fenv functions into sh4 sub-folder Indeed fenv funxtions are SH4 specific, so move them into an SH4 specific sub-folder. Signed-off-by: Carmelo Amoroso --- libm/Makefile.in | 7 +++++++ libm/sh/Makefile.arch | 21 --------------------- libm/sh/feholdexcpt.c | 29 ----------------------------- libm/sh/fesetenv.c | 26 -------------------------- libm/sh/sh4/Makefile.arch | 22 ++++++++++++++++++++++ libm/sh/sh4/feholdexcpt.c | 29 +++++++++++++++++++++++++++++ libm/sh/sh4/fesetenv.c | 26 ++++++++++++++++++++++++++ 7 files changed, 84 insertions(+), 76 deletions(-) delete mode 100644 libm/sh/Makefile.arch delete mode 100644 libm/sh/feholdexcpt.c delete mode 100644 libm/sh/fesetenv.c create mode 100644 libm/sh/sh4/Makefile.arch create mode 100644 libm/sh/sh4/feholdexcpt.c create mode 100644 libm/sh/sh4/fesetenv.c diff --git a/libm/Makefile.in b/libm/Makefile.in index 6f66c5644..a0b247981 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -44,9 +44,15 @@ libm_ARCH_DIR:=$(libm_DIR)/$(TARGET_ARCH) libm_ARCH_OUT:=$(libm_OUT)/$(TARGET_ARCH) endif +ifneq ($(TARGET_SUBARCH),) +libm_SUBARCH_DIR:=$(libm_DIR)/$(TARGET_ARCH)/$(TARGET_SUBARCH) +libm_SUBARCH_OUT:=$(libm_OUT)/$(TARGET_ARCH)/$(TARGET_SUBARCH) +endif + ifeq ($(UCLIBC_HAS_FPU),y) ifeq ($(DO_C99_MATH),y) -include $(libm_ARCH_DIR)/Makefile.arch +-include $(libm_SUBARCH_DIR)/Makefile.arch endif endif @@ -223,6 +229,7 @@ ifeq ($(TARGET_ARCH)-$(CONFIG_E500),powerpc-y) CFLAGS-libm/$(TARGET_ARCH)/e500/ := $(CFLAGS-libm) else CFLAGS-libm/$(TARGET_ARCH)/ := $(CFLAGS-libm) +CFLAGS-libm/$(TARGET_ARCH)/$(TARGET_SUBARCH)/ := $(CFLAGS-libm) endif # remove generic sources, if arch specific version is present diff --git a/libm/sh/Makefile.arch b/libm/sh/Makefile.arch deleted file mode 100644 index 6425b3ede..000000000 --- a/libm/sh/Makefile.arch +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for uClibc -# -# Copyright (c) 2007 STMicroelectronics Ltd -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -ifeq ($(UCLIBC_HAS_FENV),y) -libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c) -libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC)) -endif - -libm_ARCH_OBJS:=$(libm_ARCH_OBJ) - -ifeq ($(DOPIC),y) -libm-a-y+=$(libm_ARCH_OBJS:.o=.os) -else -libm-a-y+=$(libm_ARCH_OBJS) -endif -libm-so-y+=$(libm_ARCH_OBJS:.o=.os) - diff --git a/libm/sh/feholdexcpt.c b/libm/sh/feholdexcpt.c deleted file mode 100644 index 70b51e8dd..000000000 --- a/libm/sh/feholdexcpt.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2007 STMicroelectronics Ltd - * Filippo Arcidiacono (filippo.arcidiacono@st.com) - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - * - * Taken from glibc 2.6 - * - */ - -#include -#include - -int -feholdexcept (fenv_t *envp) -{ - unsigned long int temp; - - /* Store the environment. */ - _FPU_GETCW (temp); - envp->__fpscr = temp; - - /* Now set all exceptions to non-stop. */ - temp &= ~FE_ALL_EXCEPT; - _FPU_SETCW (temp); - - return 1; -} diff --git a/libm/sh/fesetenv.c b/libm/sh/fesetenv.c deleted file mode 100644 index c5cfc1d51..000000000 --- a/libm/sh/fesetenv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Copyright (c) 2007 STMicroelectronics Ltd - * Filippo Arcidiacono (filippo.arcidiacono@st.com) - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - * - * Taken from glibc 2.6 - * - */ - -#include -#include - -int -fesetenv (const fenv_t *envp) -{ - if (envp == FE_DFL_ENV) - _FPU_SETCW (_FPU_DEFAULT); - else - { - unsigned long int temp = envp->__fpscr; - _FPU_SETCW (temp); - } - return 0; -} diff --git a/libm/sh/sh4/Makefile.arch b/libm/sh/sh4/Makefile.arch new file mode 100644 index 000000000..122d84da2 --- /dev/null +++ b/libm/sh/sh4/Makefile.arch @@ -0,0 +1,22 @@ +# Makefile for uClibc +# +# Copyright (c) 2007, 2010 STMicroelectronics Ltd +# +# Author(s): Carmelo Amoroso +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +ifeq ($(UCLIBC_HAS_FENV),y) +libm_ARCH_SRC:=$(wildcard $(libm_SUBARCH_DIR)/*.c) +libm_ARCH_OBJ:=$(patsubst $(libm_SUBARCH_DIR)/%.c,$(libm_SUBARCH_OUT)/%.o,$(libm_ARCH_SRC)) +endif + +libm_ARCH_OBJS:=$(libm_ARCH_OBJ) + +ifeq ($(DOPIC),y) +libm-a-y+=$(libm_ARCH_OBJS:.o=.os) +else +libm-a-y+=$(libm_ARCH_OBJS) +endif +libm-so-y+=$(libm_ARCH_OBJS:.o=.os) + diff --git a/libm/sh/sh4/feholdexcpt.c b/libm/sh/sh4/feholdexcpt.c new file mode 100644 index 000000000..70b51e8dd --- /dev/null +++ b/libm/sh/sh4/feholdexcpt.c @@ -0,0 +1,29 @@ +/* + * + * Copyright (c) 2007 STMicroelectronics Ltd + * Filippo Arcidiacono (filippo.arcidiacono@st.com) + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + * Taken from glibc 2.6 + * + */ + +#include +#include + +int +feholdexcept (fenv_t *envp) +{ + unsigned long int temp; + + /* Store the environment. */ + _FPU_GETCW (temp); + envp->__fpscr = temp; + + /* Now set all exceptions to non-stop. */ + temp &= ~FE_ALL_EXCEPT; + _FPU_SETCW (temp); + + return 1; +} diff --git a/libm/sh/sh4/fesetenv.c b/libm/sh/sh4/fesetenv.c new file mode 100644 index 000000000..c5cfc1d51 --- /dev/null +++ b/libm/sh/sh4/fesetenv.c @@ -0,0 +1,26 @@ +/* + * + * Copyright (c) 2007 STMicroelectronics Ltd + * Filippo Arcidiacono (filippo.arcidiacono@st.com) + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + * Taken from glibc 2.6 + * + */ + +#include +#include + +int +fesetenv (const fenv_t *envp) +{ + if (envp == FE_DFL_ENV) + _FPU_SETCW (_FPU_DEFAULT); + else + { + unsigned long int temp = envp->__fpscr; + _FPU_SETCW (temp); + } + return 0; +} -- cgit v1.2.3 From c61707353e16b8e22cab1a150cc3a6bf9b178e1c Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Fri, 17 Dec 2010 08:30:33 +0100 Subject: libm_powerpc: update buildsys to use TARGET_SUBARCH Update the powerpc buildsys of libm to use the TARGET_SUBARCH. Further fix the e500 Makefile.arch by adding the definition of libm_ARCH_fpu_DIR that was actually missing. Signed-off-by: Carmelo Amoroso --- libm/Makefile.in | 11 ----------- libm/powerpc/classic/Makefile.arch | 4 ++-- libm/powerpc/e500/Makefile.arch | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/libm/Makefile.in b/libm/Makefile.in index a0b247981..384365cac 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -34,15 +34,8 @@ libm_FULL_NAME := libm-$(VERSION).so libm_DIR:=$(top_srcdir)libm libm_OUT:=$(top_builddir)libm -# Fix builds for powerpc as there are different cores in this -# section now.` -ifeq ($(TARGET_ARCH)-$(CONFIG_E500),powerpc-y) -libm_ARCH_DIR:=$(libm_DIR)/$(TARGET_ARCH)/e500 -libm_ARCH_OUT:=$(libm_OUT)/$(TARGET_ARCH)/e500 -else libm_ARCH_DIR:=$(libm_DIR)/$(TARGET_ARCH) libm_ARCH_OUT:=$(libm_OUT)/$(TARGET_ARCH) -endif ifneq ($(TARGET_SUBARCH),) libm_SUBARCH_DIR:=$(libm_DIR)/$(TARGET_ARCH)/$(TARGET_SUBARCH) @@ -225,12 +218,8 @@ endif ifeq ($(UCLIBC_HAS_FPU),y) ifeq ($(DO_C99_MATH),y) ifneq ($(strip $(libm_ARCH_OBJS)),) -ifeq ($(TARGET_ARCH)-$(CONFIG_E500),powerpc-y) -CFLAGS-libm/$(TARGET_ARCH)/e500/ := $(CFLAGS-libm) -else CFLAGS-libm/$(TARGET_ARCH)/ := $(CFLAGS-libm) CFLAGS-libm/$(TARGET_ARCH)/$(TARGET_SUBARCH)/ := $(CFLAGS-libm) -endif # remove generic sources, if arch specific version is present ifneq ($(strip $(libm_ARCH_SRC)),) diff --git a/libm/powerpc/classic/Makefile.arch b/libm/powerpc/classic/Makefile.arch index 7c7600f80..53c6d2cac 100644 --- a/libm/powerpc/classic/Makefile.arch +++ b/libm/powerpc/classic/Makefile.arch @@ -5,8 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c) -libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC)) +libm_ARCH_SRC:=$(wildcard $(libm_SUBARCH_DIR)/*.c) +libm_ARCH_OBJ:=$(patsubst $(libm_SUBARCH_DIR)/%.c,$(libm_SUBARCH_OUT)/%.o,$(libm_ARCH_SRC)) libm_ARCH_OBJS:=$(libm_ARCH_OBJ) diff --git a/libm/powerpc/e500/Makefile.arch b/libm/powerpc/e500/Makefile.arch index bec21caef..912ce7f10 100644 --- a/libm/powerpc/e500/Makefile.arch +++ b/libm/powerpc/e500/Makefile.arch @@ -5,5 +5,6 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +libm_ARCH_fpu_DIR := $(libm_SUBARCH_DIR)/fpu -include $(libm_ARCH_fpu_DIR)/Makefile.arch -- cgit v1.2.3 From 6ac247452e646c2187f2f559143c8c087b0542e0 Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Fri, 17 Dec 2010 09:58:25 +0100 Subject: libm_sh: add optimised assembly implementation of lroundf and lrintf * libc/sysdeps/linux/sh/sysdep.h: Add LOCAL macro * libm/sh/sh4/Makefile.arch: Include asm source in the build * libm/sh/sh4/s_lrintf.S [NEW]: optimised asm lrintf * libm/sh/sh4/s_lroundf.S [NEW]: optimised asm lroundf Signed-off-by: Christian Bruel Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/sh/sysdep.h | 1 + libm/sh/sh4/Makefile.arch | 8 ++++--- libm/sh/sh4/s_lrintf.S | 52 ++++++++++++++++++++++++++++++++++++++++++ libm/sh/sh4/s_lroundf.S | 39 +++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 libm/sh/sh4/s_lrintf.S create mode 100644 libm/sh/sh4/s_lroundf.S diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h index 2ef0a3305..8b3c68220 100644 --- a/libc/sysdeps/linux/sh/sysdep.h +++ b/libc/sysdeps/linux/sh/sysdep.h @@ -26,6 +26,7 @@ /* Syntactic details of assembler. */ +#define LOCAL(X) .L_##X #define ALIGNARG(log2) log2 /* For ELF we need the `.type' directive to make shared libs work right. */ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,@##typearg; diff --git a/libm/sh/sh4/Makefile.arch b/libm/sh/sh4/Makefile.arch index 122d84da2..e38e99c15 100644 --- a/libm/sh/sh4/Makefile.arch +++ b/libm/sh/sh4/Makefile.arch @@ -7,11 +7,13 @@ # ifeq ($(UCLIBC_HAS_FENV),y) -libm_ARCH_SRC:=$(wildcard $(libm_SUBARCH_DIR)/*.c) -libm_ARCH_OBJ:=$(patsubst $(libm_SUBARCH_DIR)/%.c,$(libm_SUBARCH_OUT)/%.o,$(libm_ARCH_SRC)) +libm_ARCH_CSRC:=$(wildcard $(libm_SUBARCH_DIR)/*.c) +libm_ARCH_COBJ:=$(patsubst $(libm_SUBARCH_DIR)/%.c,$(libm_SUBARCH_OUT)/%.o,$(libm_ARCH_SRC)) +libm_ARCH_SSRC:=$(wildcard $(libm_SUBARCH_DIR)/*.S) +libm_ARCH_SOBJ:=$(patsubst $(libm_SUBARCH_DIR)/%.S,$(libm_SUBARCH_OUT)/%.o,$(libm_ARCH_SSRC)) endif -libm_ARCH_OBJS:=$(libm_ARCH_OBJ) +libm_ARCH_OBJS:=$(libm_ARCH_COBJ) $(libm_ARCH_SOBJ) ifeq ($(DOPIC),y) libm-a-y+=$(libm_ARCH_OBJS:.o=.os) diff --git a/libm/sh/sh4/s_lrintf.S b/libm/sh/sh4/s_lrintf.S new file mode 100644 index 000000000..d8cec329c --- /dev/null +++ b/libm/sh/sh4/s_lrintf.S @@ -0,0 +1,52 @@ +/* Round argument to nearest integer value. SH4 version. + * According to ISO/IEC 9899:1999. This version doesn't handle range error. + * If arg is not finite or if the result cannot be represented into a long, + * return an unspecified value. No exception raised. + * + * Copyright (C) 2010 STMicroelectronics Ltd. + * + * Author: Christian Bruel + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include + +ENTRY(lrintf) + mov #0,r0 + sts fpscr,r3 + lds r0,fpscr + flds fr5,fpul + mov.l LOCAL(mask),r1 + sts fpul,r2 + and r2,r1 + mov.l LOCAL(midway),r2 + or r1,r2 + lds r2,fpul + fsts fpul,fr2 + fadd fr2,fr5 + ftrc fr5,fpul + sts fpul,r0 + float fpul,fr2 + fcmp/eq fr5,fr2 + bf/s 0f + mov #1,r2 + tst r1,r1 + and r0,r2 + movt r1 + shal r1 + tst r2,r2 + add #-1,r1 + bt 0f + sub r1,r0 +0: + rts + lds r3,fpscr + + .align 2 +LOCAL(mask): + .long 0x80000000 +LOCAL(midway): + .long 1056964608 + +END(lrintf) diff --git a/libm/sh/sh4/s_lroundf.S b/libm/sh/sh4/s_lroundf.S new file mode 100644 index 000000000..fda3a4b91 --- /dev/null +++ b/libm/sh/sh4/s_lroundf.S @@ -0,0 +1,39 @@ +/* Round argument toward 0. SH4 version. + * According to ISO/IEC 9899:1999. This version doesn't handle range error. + * If arg is not finite or if the result cannot be represented into a long, + * return an unspecified value. No exception raised. + * + * Copyright (C) 2010 STMicroelectronics Ltd. + * + * Author: Christian Bruel + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include + +ENTRY(lroundf) + mov #0,r0 + sts fpscr,r3 + lds r0,fpscr + flds fr5,fpul + mov.l LOCAL(mask),r1 + sts fpul,r2 + and r2,r1 + mov.l LOCAL(midway),r2 + or r1,r2 + lds r2,fpul + fsts fpul,fr2 + fadd fr2,fr5 + ftrc fr5,fpul + sts fpul,r0 + rts + lds r3,fpscr + + .align 2 +LOCAL(mask): + .long 0x80000000 +LOCAL(midway): + .long 1056964608 + +END(lroundf) -- cgit v1.2.3 From f7222d84d3d5ae5d5efbf320ce9959020ec07993 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 17 Dec 2010 20:05:17 +0100 Subject: release 0.9.32-rc1 Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules.mak b/Rules.mak index ac8276757..ad396f4bd 100644 --- a/Rules.mak +++ b/Rules.mak @@ -106,7 +106,7 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR MAJOR_VERSION := 0 MINOR_VERSION := 9 SUBLEVEL := 32 -EXTRAVERSION :=-git +EXTRAVERSION :=-rc1 VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) ABI_VERSION := $(MAJOR_VERSION) ifneq ($(EXTRAVERSION),) -- cgit v1.2.3 From d3a751c8c067f55a1a88a1bda3b73d2b7617b0d6 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 17 Dec 2010 20:05:56 +0100 Subject: bump version to 0.9.32-rc1-git Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules.mak b/Rules.mak index ad396f4bd..eecdc6426 100644 --- a/Rules.mak +++ b/Rules.mak @@ -106,7 +106,7 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR MAJOR_VERSION := 0 MINOR_VERSION := 9 SUBLEVEL := 32 -EXTRAVERSION :=-rc1 +EXTRAVERSION :=-rc1-git VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) ABI_VERSION := $(MAJOR_VERSION) ifneq ($(EXTRAVERSION),) -- cgit v1.2.3 From fc91a4155d265a189ae6aa50b63640d8da7b3609 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 17 Dec 2010 00:54:50 -0800 Subject: install_headers: Fix the header installation when using out of source build ( O=/x/y/z ) Signed-off-by: Khem Raj --- Makefile.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 3399f8842..b4dcf6bfd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -291,7 +291,14 @@ endif install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include @$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include") $(Q)top_builddir=$(top_builddir) \ - $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include + $(top_srcdir)extra/scripts/install_headers.sh \ + include $(PREFIX)$(DEVEL_PREFIX)include +ifneq ($(O),) # only run this step in O is set i.e. make O=/my/builddir/ .. + @$(call disp_install,"$(top_builddir)/include -> $(PREFIX)$(DEVEL_PREFIX)include") + $(Q)top_builddir=$(top_builddir) \ + $(top_srcdir)extra/scripts/install_headers.sh \ + $(top_builddir)/include $(PREFIX)$(DEVEL_PREFIX)include +endif $(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -r $(HEADERS_RM-) ifeq ($(UCLIBC_HAS_WCHAR),) $(Q)cd $(PREFIX)$(DEVEL_PREFIX)include && mv -f wchar-stub.h wchar.h -- cgit v1.2.3 From f3a594f390abe7d4a3f1b544424b31613d559c88 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 18 Dec 2010 08:08:05 -0800 Subject: nptl: If DOPIC is set then we missed a rule to generate .os variants for pt-*.c files Signed-off-by: Khem Raj --- libpthread/nptl/sysdeps/pthread/Makefile.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in index 8ccf96d76..fc0c6ac3e 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile.in +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -95,6 +95,10 @@ $(patsubst %,$(libpthread_pthread_OUT)/pt-%.oS,$(pthread-lc-fwd)): $(libpthread_ $(compile.c) $(patsubst %,$(libpthread_pthread_OUT)/pt-%.o,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.o: $(libpthread_pthread_OUT)/pt-%.c $(compile.c) +ifeq ($(DOPIC),y) +$(patsubst %,$(libpthread_pthread_OUT)/pt-%.os,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.os: $(libpthread_pthread_OUT)/pt-%.c + $(compile.c) +endif objclean-y += CLEAN_libpthread/nptl/sysdeps/pthread -- cgit v1.2.3 From 9e5335ed874515b33aa296c1cd8e7a8b640472c9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 18 Dec 2010 08:09:25 -0800 Subject: sem_open.c/sem_unlink.c: Use INTUSE macro to get proper function call to __pthread_once We need to use __pthread_once_internal if available this macro is therefore used to notify that. Signed-off-by: Khem Raj --- libpthread/nptl/sem_open.c | 2 +- libpthread/nptl/sem_unlink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpthread/nptl/sem_open.c b/libpthread/nptl/sem_open.c index 28dd3aa90..71bebb00a 100644 --- a/libpthread/nptl/sem_open.c +++ b/libpthread/nptl/sem_open.c @@ -248,7 +248,7 @@ sem_open (const char *name, int oflag, ...) int fd; /* Determine where the shmfs is mounted. */ - __pthread_once (&__namedsem_once, __where_is_shmfs); + INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs); /* If we don't know the mount points there is nothing we can do. Ever. */ if (mountpoint.dir == NULL) diff --git a/libpthread/nptl/sem_unlink.c b/libpthread/nptl/sem_unlink.c index beed02ee5..f3e7f1a70 100644 --- a/libpthread/nptl/sem_unlink.c +++ b/libpthread/nptl/sem_unlink.c @@ -33,7 +33,7 @@ sem_unlink ( size_t namelen; /* Determine where the shmfs is mounted. */ - __pthread_once (&__namedsem_once, __where_is_shmfs); + INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs); /* If we don't know the mount points there is nothing we can do. Ever. */ if (mountpoint.dir == NULL) -- cgit v1.2.3 From 0cc3811abda8152f406d5ebca191735cb7359075 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 18 Dec 2010 21:08:58 -0800 Subject: extra/locale/Makefile: Consider the case of building out of sourcedir Signed-off-by: Khem Raj --- extra/locale/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/locale/Makefile b/extra/locale/Makefile index 11f362a5e..ff229e20c 100644 --- a/extra/locale/Makefile +++ b/extra/locale/Makefile @@ -4,10 +4,10 @@ # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # - top_srcdir=../../ -top_builddir=../../ +top_builddir=$(if $(O),$(O),../../)/ + all: objs -include $(top_builddir)Rules.mak +include $(top_srcdir)Rules.mak include Makefile.in include $(top_srcdir)Makerules -- cgit v1.2.3 From 4d81f2a74578f819285b131c682e8d2f6c315c4e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 18 Dec 2010 21:51:06 -0800 Subject: Makefile.in: Add header to 'all' target Stage bits/uClibc_ctype.h when locales are enabled Signed-off-by: Khem Raj --- Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index b4dcf6bfd..d7a5fca60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,7 +23,7 @@ export KCONFIG_CONFIG ifeq ($(HAVE_DOT_CONFIG),y) -all: pregen libs +all: headers pregen libs libs: pregen # In this section, we need .config @@ -260,6 +260,7 @@ HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h +HEADERS_RM-$(UCLIBC_HAS_LOCALE) += bits/uClibc_ctype.h HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/fsuid.h sys/inotify.h sys/perm.h \ sys/personality.h \ sys/prctl.h \ -- cgit v1.2.3 From 8b359ad87079dc715b46cc322440871f49d2a500 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 21 Dec 2010 19:29:50 -0800 Subject: libpthread/nptl_db: Append options to LDFLAGS based on if LD is set to gcc driver or ld itself Signed-off-by: Khem Raj --- libpthread/nptl_db/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libpthread/nptl_db/Makefile.in b/libpthread/nptl_db/Makefile.in index 644ec5552..a3fc1cd74 100644 --- a/libpthread/nptl_db/Makefile.in +++ b/libpthread/nptl_db/Makefile.in @@ -12,8 +12,7 @@ CFLAGS-nptl_db := -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" CFLAGS-nptl_db += -I$(top_srcdir)libpthread/nptl -D_GNU_SOURCE CFLAGS-nptl_db += -DIS_IN_libthread_db=1 -DNOT_IN_libc -std=gnu99 -I$(top_srcdir)ldso/include -LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols - +LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols) LIBS-libthread_db.so := $(LIBS) libthread_db_FULL_NAME := libthread_db-$(VERSION).so -- cgit v1.2.3 From 2a416f277e43be8301f1fdcdca7515b1e2a4508c Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Mon, 15 Nov 2010 15:34:18 +0000 Subject: linuxthreads: Fix compilation breakage With commit "resolv.c: add support for per thread res_state" (aab4df0fb51660300559f5f29290709db2f7bfee) _res symbol is now marked as hidden in an attempt to make the resolver per-thread. Signed-off-by: Matt Fleming Signed-off-by: Bernhard Reutner-Fischer --- libpthread/linuxthreads/pthread.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 614cad1f4..db436342f 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -49,7 +49,7 @@ extern int _h_errno; /* We need the global/static resolver state here. */ # include # undef _res -extern struct __res_state _res; +extern struct __res_state *__resp; # endif #endif @@ -73,9 +73,6 @@ struct _pthread_descr_struct __pthread_initial_thread = { #if !(USE_TLS && HAVE___THREAD) .p_errnop = &_errno, .p_h_errnop = &_h_errno, -# if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__ - .p_resp = &_res, -# endif #endif .p_userstack = 1, .p_resume_count = __ATOMIC_INITIALIZER, @@ -544,14 +541,14 @@ static void pthread_initialize(void) THREAD_SETMEM (((pthread_descr) NULL), p_pid, __getpid()); # if !defined HAVE___THREAD && (defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__) /* Likewise for the resolver state _res. */ - THREAD_SETMEM (((pthread_descr) NULL), p_resp, &_res); + THREAD_SETMEM (((pthread_descr) NULL), p_resp, __resp); # endif #else /* Update the descriptor for the initial thread. */ __pthread_initial_thread.p_pid = __getpid(); # if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__ /* Likewise for the resolver state _res. */ - __pthread_initial_thread.p_resp = &_res; + __pthread_initial_thread.p_resp = __resp; # endif #endif #if !__ASSUME_REALTIME_SIGNALS @@ -1129,7 +1126,7 @@ void __pthread_reset_main_thread(void) THREAD_SETMEM(self, p_errnop, &_errno); THREAD_SETMEM(self, p_h_errnop, &_h_errno); # if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__ - THREAD_SETMEM(self, p_resp, &_res); + THREAD_SETMEM(self, p_resp, __resp); # endif #endif -- cgit v1.2.3 From e6164d4b527865f4c81544ad18bfd634117d595b Mon Sep 17 00:00:00 2001 From: Konrad Eisele Date: Tue, 14 Dec 2010 13:49:17 +0100 Subject: sparc: check for log double support in gcc To compile the quad float emulation library gcc needs __LONG_DOUBLE_128__ macro defined. Check first, if not supported then revert to the qp_ops.c stubs Signed-off-by: Konrad Eisele Signed-off-by: Khem Raj --- libc/sysdeps/linux/sparc/Makefile.arch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch index 91c6e85e4..d0cae9ff8 100644 --- a/libc/sysdeps/linux/sparc/Makefile.arch +++ b/libc/sysdeps/linux/sparc/Makefile.arch @@ -16,9 +16,15 @@ CSRC += sigaction.c SSRC += fork.S vfork.S endif +# check weather __LONG_DOUBLE_128__ is defined (long double support) +UCLIBC_SPARC_HAS_LONG_DOUBLE=$(shell if [ "x`$(CC) -E -dM -xc /dev/null 2>&1 | grep __LONG_DOUBLE_128__`" != "x" ]; then echo "y"; fi) +ifeq ($(UCLIBC_SPARC_HAS_LONG_DOUBLE),y) CSRC += $(foreach f, \ q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \ mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \ q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \ q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \ q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f)) +else +CSRC += qp_ops.c +endif -- cgit v1.2.3 From 90e38b925cc5d023bbdccbc8a4a401b0ed282c21 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Wed, 29 Dec 2010 17:49:59 -0800 Subject: sparc: fix linking issue with __syscall_error.c Finally got around to testing out latest master and noticed that some buildsystem work last summer broke shared-builds of nptl on sparc. A version of __syscall_error.c needs to be linked into both libpthread and librt Signed-off-by: Austin Foxley --- libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch | 6 +++++- libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch index 88ca01a51..102c0dad1 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch @@ -7,16 +7,20 @@ libpthread_linux_arch_SSRC = pt-vfork.S clone.S libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \ - pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c + pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \ + pt-__syscall_error.c libc_linux_arch_CSRC = fork.c libc-lowlevellock.c libc_linux_arch_SSRC = clone.S vfork.S +librt_linux_arch_CSRC = pt-__syscall_error.c + ASFLAGS += -DUSE___THREAD ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread +CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread ASFLAGS-clone.S = -D_LIBC_REENTRANT ASFLAGS-vfork.S = -D_LIBC_REENTRANT diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c new file mode 100644 index 000000000..872e4eff6 --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c @@ -0,0 +1 @@ +#include <../../../../../../../libc/sysdeps/linux/sparc/__syscall_error.c> -- cgit v1.2.3 From 4ac7ad3543dd6d7780e71af80fa5c45414451719 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 1 Jan 2011 22:59:00 -0800 Subject: libc/inet/netlinkaccess.h: Use the types from kernel Signed-off-by: Khem Raj --- libc/inet/netlinkaccess.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h index 5111d3802..96ece392c 100644 --- a/libc/inet/netlinkaccess.h +++ b/libc/inet/netlinkaccess.h @@ -22,15 +22,8 @@ #include #include #include -#include - #if defined __ASSUME_NETLINK_SUPPORT || defined __UCLIBC_USE_NETLINK__ -#define _LINUX_TYPES_H -typedef uint8_t __u8; -typedef uint16_t __u16; -typedef uint32_t __u32; -typedef uint64_t __u64; -typedef int32_t __s32; +#include #include #include -- cgit v1.2.3