diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2010-04-02 09:17:30 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2010-04-02 09:17:30 -0700 |
commit | aae3eb9256affb18cff589b52ee26e0a4e557bbd (patch) | |
tree | 003711a54e7dfbde0b50979e2942fd3e0d3451c8 | |
parent | ef18cfe8ebab25f5ef92e81956f50e2dc57df602 (diff) | |
parent | 2864786ad884369ab5397be864e9f43d32bc2726 (diff) |
Merge commit 'origin/master' into nptl
Conflicts:
Makefile.in
extra/Configs/Config.in
libc/sysdeps/linux/common/bits/kernel-features.h
libc/sysdeps/linux/common/poll.c
libc/sysdeps/linux/common/sysdep.h
libc/sysdeps/linux/sh/sysdep.h
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
73 files changed, 422 insertions, 524 deletions
@@ -8,7 +8,8 @@ remove this definition from wordsize.h. Otherwise you have to delete /var/run/utmp on x86_64 hosts when upgrading to 0.9.31 - + o The SHARED_LIB_LOADER_PREFIX was renamed to a single path + component called MULTILIB_DIR and defaults to 'lib'. 0.9.27 12 January 2005 diff --git a/Makefile.help b/Makefile.help index 5c14dffb1..8c7ce416a 100644 --- a/Makefile.help +++ b/Makefile.help @@ -56,7 +56,6 @@ help: @echo ' (usually "/")' @echo ' DEVEL_PREFIX= - Prefix for the libdir containing static objects' @echo ' and the include dir (usually "/usr")' - @echo ' SHARED_LIB_LOADER_PREFIX= - Directory where the shared loader resides.' - @echo ' (usually "/lib")' + @echo ' MULTILIB_DIR= - Directory component for libraries (default "lib").' @echo ' UCLIBC_EXTRA_CFLAGS - extra CFLAGS for compiling uClibc' diff --git a/Makefile.in b/Makefile.in index 47cdc30ad..412826f3b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,7 +9,7 @@ # You shouldn't need to mess with anything beyond this point... #-------------------------------------------------------------- clean_targets := clean realclean distclean \ - objclean-y headers_clean-y utils_clean + objclean-y headers_clean-y CLEAN_utils noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \ defconfig allyesconfig allnoconfig \ release dist tags help @@ -148,9 +148,9 @@ endif $(target-headers-sysdep): | $(top_builddir)include/bits $(top_builddir)include/sys -sysdep_common_headers-clean: - $(RM) $(ALL_HEADERS_COMMON) -headers_clean-y += sysdep_common_headers-clean +HEADERCLEAN_common: + $(do_rm) $(ALL_HEADERS_COMMON) +headers_clean-y += HEADERCLEAN_common # The headers. Arch specific headers are specified via ARCH_HEADERS in # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via @@ -194,9 +194,10 @@ $(LOCAL_INSTALL_PATH): install: install_runtime install_dev -RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib) +RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR)) -$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c|$(@D) +$(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts +$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c $(hcompile.u) # Installs header files. @@ -288,8 +289,12 @@ HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h # BREAKAGE: include/signal.h uses it, this rm broke bbox compile: ### ucontext.h -install_headers: headers $(top_builddir)extra/scripts/unifdef - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include +ifneq ($(findstring install,$(MAKECMDGOALS)),) +$(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) $(addprefix $(PREFIX)$(DEVEL_PREFIX),include lib): + $(do_mkdir) +endif + +install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include top_builddir=$(top_builddir) \ $(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -r $(HEADERS_RM-) @@ -300,77 +305,75 @@ else endif # Installs development library links. -install_dev: install_headers install_runtime - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib - -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/ +install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR) + -$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/ ifeq ($(HAVE_SHARED),y) - for i in `find lib/ -type l -name 'lib[a-zA-Z]*.so' | \ + for i in `cd $(top_builddir) && find lib/ -type l -name 'lib[a-zA-Z]*.so' | \ $(SED) -e 's/lib\///'` ; do \ $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)$$i.$(MAJOR_VERSION) \ - $(PREFIX)$(DEVEL_PREFIX)lib/$$i; \ + $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/$$i; \ done ifeq ($(HARDWIRED_ABSPATH),y) - if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \ - $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ - $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME):' \ - -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME):' \ - -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO):' \ - $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \ + if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_MAJORNAME) ] ; then \ + $(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \ + $(SED) -e 's:$(NONSHARED_LIBNAME):$(DEVEL_PREFIX)$(MULTILIB_DIR)/$(NONSHARED_LIBNAME):' \ + -e 's:$(SHARED_MAJORNAME):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_MAJORNAME):' \ + -e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO):' \ + $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \ fi else - -$(INSTALL) -m 755 lib/libc.so $(PREFIX)$(DEVEL_PREFIX)lib/ + -$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/ endif ifeq ($(UCLIBC_HAS_THREADS),y) ifneq ($(LINUXTHREADS_OLD),y) ifeq ($(HARDWIRED_ABSPATH),y) - if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) ] ; then \ - $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ - cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ - echo "GROUP ( $(RUNTIME_PREFIX)lib/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)lib/libpthread_nonshared.a )" \ - >> $(PREFIX)$(DEVEL_PREFIX)lib/libpthread.so; \ + if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(MAJOR_VERSION) ] ; then \ + $(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \ + cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \ + echo "GROUP ( $(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(MAJOR_VERSION) $(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread_nonshared.a )" \ + >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \ fi else - -$(INSTALL) -m 755 lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)lib/ + -$(INSTALL) -m 755 $(top_builddir)lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/ endif endif endif ifeq ($(PTHREADS_DEBUG_SUPPORT),y) $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \ - $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so + $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libthread_db.so endif ifeq ($(DOPIC),y) # # If we build shared libraries then the static libs are PIC... # # Make _pic.a symlinks to make mklibs.py and similar tools happy. - if [ -d lib ] ; then \ - for i in `find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \ - $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \ + if [ -d $(top_builddir)lib ] ; then \ + for i in `cd $(top_builddir) && find lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \ + $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/`echo $$i \ | $(SED) -e 's/\.a$$/_pic.a/'`; \ done ; \ fi endif endif ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y) - for file in lib/lib*.gdb; do \ + for file in $(top_builddir)lib/lib*.gdb; do \ if test -f $$file; then \ - $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)lib; \ + $(INSTALL) -m 755 $$file $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR); \ $(INSTALL) -m 755 `echo $$file | $(SED) 's/\.gdb$$//'` \ - $(PREFIX)$(DEVEL_PREFIX)lib; \ + $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR); \ fi; \ done endif # Installs run-time libraries -install_runtime: all +install_runtime: all | $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) ifeq ($(HAVE_SHARED),y) - $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib - $(INSTALL) -m 755 lib/lib*-$(VERSION).so \ - $(PREFIX)$(RUNTIME_PREFIX)lib - (cd lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib - @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \ + $(INSTALL) -m 755 $(top_builddir)lib/lib*-$(VERSION).so \ + $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) + (cd $(top_builddir)lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) + @if [ -x $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \ set -e; \ $(SHELL_SET_X); \ - $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \ - $(PREFIX)$(RUNTIME_PREFIX)lib; \ + $(INSTALL) -m 755 $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \ + $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR); \ fi endif @@ -446,7 +449,7 @@ include_clean: clean: include_clean $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits - @$(MAKE) -C utils utils_clean + @$(MAKE) -C utils CLEAN_utils +$(MAKE) -s -C test clean @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm* $(Q)$(RM) $(top_builddir)extra/scripts/unifdef @@ -459,11 +462,12 @@ distclean: clean $(MAKE) -C extra/config distclean dist release: - $(RM) -r ../uClibc-$(VERSION) ../uClibc-$(VERSION).tar.bz2 - mkdir -p ../uClibc-$(VERSION) - git archive HEAD |(cd ../uClibc-$(VERSION) && $(TAR) xf -) - $(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION) - du -b ../uClibc-$(VERSION).tar.bz2 + $(RM) ../uClibc-$(VERSION).tar + git archive HEAD --format=tar --prefix=uClibc-$(VERSION)/ \ + > ../uClibc-$(VERSION).tar + cat ../uClibc-$(VERSION).tar | bzip2 -c9 > ../uClibc-$(VERSION).tar.bz2 + cat ../uClibc-$(VERSION).tar | xz -e -c8 > ../uClibc-$(VERSION).tar.xz + du -b ../uClibc-$(VERSION).tar.{bz2,xz} test check: test_compile $(Q)$(MAKE) -C test @@ -95,7 +95,7 @@ pur_disp_ln = echo " "LN $(show_objs) pur_disp_mkdir = echo " "MKDIR $(show_objs) pur_disp_gen = echo " "GEN $(show_objs) pur_disp_unifdef = echo " "UNIFDEF $(show_objs) -pur_disp_rm = echo " "CLEAN $(@:_clean=) +pur_disp_rm = echo " "CLEAN $(subst CLEAN_,,$(patsubst HEADERCLEAN_%,include \(%\),$@)) sil_disp_compile.c = true sil_disp_compile.i = true @@ -181,6 +181,9 @@ maybe_exec = \ $(cmd_$(1)); \ echo 'cmd_$(call variablify,$@) := $(call dirify,$(cmd_$(call variablify,$1)))' >> $(dir $@).$(notdir $@).dep) +# collect flags of domulti prereqs +#collect_multi_flags = $(CFLAGS-$(notdir $(d))) $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d))))) +collect_multi_flags = $(CFLAGS-$(notdir $(patsubst %/,%,$(dir $(d))))) CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep @@ -198,7 +201,7 @@ cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASF cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@)) cmd_compile.mi= $(cmd_compile.m:-c=-E -dD $(EXTRA_CPPFLAGS)) -cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) +cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags))) cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^ cmd_t_strip = $(STRIPTOOL) $(STRIP_FLAGS) $@ cmd_ar = $(AR) $(ARFLAGS) $@ $^ @@ -326,7 +329,7 @@ $(top_builddir)lib/interp.c: | $(sub_headers) $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@ $(Q)echo "#include <features.h>" >> $@ $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \ - "(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@ + "(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@ $(interp): $(top_builddir)lib/interp.c $(compile.c) @@ -97,14 +97,15 @@ TARGET_SUBARCH:=$(call qstrip,$(shell grep -s '^TARGET_SUBARCH' $(top_builddir)/ TARGET_SUBARCH:=$(call qstrip,$(TARGET_SUBARCH)) RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(RUNTIME_PREFIX))))) DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(DEVEL_PREFIX))))) +MULTILIB_DIR:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(MULTILIB_DIR))))) KERNEL_HEADERS:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(KERNEL_HEADERS))))) -export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS +export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR # Now config hard core MAJOR_VERSION := 0 MINOR_VERSION := 9 -SUBLEVEL := 30 +SUBLEVEL := 32 EXTRAVERSION :=-git VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) ifneq ($(EXTRAVERSION),) diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index be2035e45..4ce4bb09b 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -254,7 +254,7 @@ config ARCH_HAS_NO_LDSO default n config HAVE_SHARED - bool "Enable support for shared libraries" + bool "Enable shared libraries" depends on !ARCH_HAS_NO_SHARED default y help @@ -286,7 +286,7 @@ config LDSO_LDD_SUPPORT Enable all the code needed to support traditional ldd, which executes the shared library loader to resolve all dependencies and then provide a list of shared libraries that are required for an - application to function. Disabling this option will makes uClibc's + application to function. Disabling this option will make uClibc's shared library loader a little bit smaller. Most people will answer Y. @@ -401,7 +401,6 @@ config LDSO_GNU_HASH_SUPPORT choice prompt "Thread support" - #default UCLIBC_HAS_THREADS_NATIVE if (TARGET_alpha || TARGET_arm || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_sh || TARGET_sh64) default HAS_NO_THREADS help If you want to compile uClibc with pthread support, then answer Y. @@ -432,42 +431,11 @@ config LINUXTHREADS_NEW the latest code from glibc, so it may be the only choice for the newer ports (like alpha/amd64/64bit arches and hppa). -config UCLIBC_HAS_THREADS_NATIVE - bool "Native POSIX Threading (NPTL)" - select UCLIBC_HAS_TLS - select UCLIBC_HAS_STDIO_FUTEXES - help - If you want to compile uClibc with NPTL support, then answer Y. - - IMPORTANT NOTE! NPTL requires a Linux 2.6 kernel, binutils - at least version 2.16 and GCC with at least version 4.1.0. NPTL - will not work with older versions of any above sources. If you - ignore any of these guidelines, you do so at your own risk. Do - not ask for help on any of the development mailing lists. - - !!!! WARNING !!!! BIG FAT WARNING !!!! REALLY BIG FAT WARNING !!!! - - This is experimental code and at times it may not even build and - even if it does it might decide to do random damage. This code is - potentially hazardous to your health and sanity. It will remain - that way until further notice at which point this notice will - disappear. Thank you for your support and for not smoking. - endchoice config UCLIBC_HAS_THREADS def_bool y if !HAS_NO_THREADS -config UCLIBC_HAS_TLS - bool "Thread-Local Storage" - depends on UCLIBC_HAS_THREADS_NATIVE - default n - help - If you want to enable TLS support then answer Y. - This is fast an efficient way to store per-thread local data - which is not on stack. It needs __thread support enabled in - gcc. - config PTHREADS_DEBUG_SUPPORT bool "Build pthreads debugging support" default n @@ -1747,14 +1715,6 @@ config UCLIBC_HAS_GNU_GETOPT Most people will answer Y. -config UCLIBC_HAS_STDIO_FUTEXES - bool "Use futexes for multithreaded I/O locking" - depends on UCLIBC_HAS_THREADS_NATIVE - default n - help - If you want to compile uClibc to use futexes for low-level - I/O locking, answer Y. Otherwise, answer N. - config UCLIBC_HAS_GETOPT_LONG bool "Support getopt_long/getopt_long_only" depends on !UCLIBC_HAS_GNU_GETOPT @@ -1891,23 +1851,6 @@ endmenu menu "Library Installation Options" -config SHARED_LIB_LOADER_PREFIX - string "Shared library loader path" - depends on HAVE_SHARED - default "$(RUNTIME_PREFIX)lib" - help - When using shared libraries, this path is the location where the - shared library will be invoked. This value will be compiled into - every binary compiled with uClibc. - - For a typical target system this should be set to "/lib", such that - 'make install' will install /lib/ld-uClibc.so.0. - - BIG FAT WARNING: - If you do not have a shared library loader with the correct name - sitting in the directory this points to, your binaries will not - run. - config RUNTIME_PREFIX string "uClibc runtime library directory" default "/usr/$(TARGET_ARCH)-linux-uclibc/" @@ -1942,6 +1885,20 @@ config DEVEL_PREFIX For a typical target system this should be set to "/usr", such that 'make install' will install /usr/include/<header files>. +config MULTILIB_DIR + string "library path component" + default "lib" |