diff options
124 files changed, 15956 insertions, 59 deletions
@@ -31,7 +31,7 @@ TOPDIR=./ include Rules.mak -DIRS = extra ldso libc libcrypt libresolv libutil libm #libpthread +DIRS = extra ldso libc libcrypt libresolv libutil libm libpthread all: headers uClibc_config.h subdirs shared finished @@ -51,7 +51,7 @@ ifeq ($(strip $(HAVE_SHARED)),true) @$(MAKE) -C libresolv shared @$(MAKE) -C libutil shared @$(MAKE) -C libm shared - #@$(MAKE) -C libpthread shared + @$(MAKE) -C libpthread shared else @echo @echo Not building shared libraries... @@ -165,6 +165,11 @@ uClibc_config.h: Makefile Config else \ echo "#undef __UCLIBC_HAVE_LFS__" >> uClibc_config.h ; \ fi + @if [ "$(INCLUDE_THREADS)" = "true" ] ; then \ + echo "#define __UCLIBC_HAS_THREADS__ 1" >> uClibc_config.h ; \ + else \ + echo "#undef __UCLIBC_HAS_THREADS__" >> uClibc_config.h ; \ + fi @if [ "$(UNIX98PTY_ONLY)" = "true" ] ; then \ echo "#define UNIX98PTY_ONLY 1" >> uClibc_config.h ; \ else \ @@ -105,7 +105,7 @@ ifeq ($(strip $(HAVE_SHARED)),true) ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true) LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO) DYNAMIC_LINKER=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) -BUILD_DYNAMIC_LINKER=${shell cd $(TOPDIR)lib && pwd}/$(UCLIBC_LDSO) + BUILD_DYNAMIC_LINKER=${shell cd $(TOPDIR)lib && pwd}/$(UCLIBC_LDSO) else LDSO=$(SYSTEM_LDSO) BUILD_UCLIBC_LDSO=false @@ -116,6 +116,9 @@ endif ifeq ($(strip $(DOPIC)),true) CFLAGS += -fPIC endif +ifeq ($(strip $(INCLUDE_THREADS)),true) + CFLAGS += -D_LIBC_REENTRANT +endif # TARGET_PREFIX is the directory under which which the uClibc runtime # environment will be installed and used on the target system. The diff --git a/include/features.h b/include/features.h index 033cf98d6..580ed3ee6 100644 --- a/include/features.h +++ b/include/features.h @@ -378,6 +378,7 @@ /* This comes between the return type and function name in * a function definition to make that definition weak. */ # define weak_function __attribute__ ((weak)) +# define weak_const_function __attribute__ ((weak, __const__)) /* Tacking on "\n\t#" to the section name makes gcc put it's bogus * section attributes on what looks like a comment to the assembler. */ # define link_warning(symbol, msg) \ diff --git a/include/semaphore.h b/include/semaphore.h new file mode 100644 index 000000000..84742233b --- /dev/null +++ b/include/semaphore.h @@ -0,0 +1,80 @@ +/* Linuxthreads - a simple clone()-based implementation of Posix */ |