summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile400
-rw-r--r--Makefile.in71
-rw-r--r--Makerules90
-rw-r--r--Rules.mak25
-rw-r--r--extra/Makefile26
-rw-r--r--extra/config/Makefile115
-rw-r--r--extra/locale/Makefile97
-rw-r--r--ldso/Makefile4
-rw-r--r--ldso/include/dl-defs.h7
-rw-r--r--ldso/include/dl-elf.h7
-rw-r--r--ldso/include/dl-hash.h7
-rw-r--r--ldso/include/dl-string.h7
-rw-r--r--ldso/include/dl-syscall.h7
-rw-r--r--ldso/include/dlfcn.h7
-rw-r--r--ldso/include/ldso.h7
-rw-r--r--ldso/include/unsecvars.h7
-rw-r--r--ldso/ldso/Makefile4
-rw-r--r--ldso/ldso/Makefile.in37
-rw-r--r--ldso/ldso/arm/elfinterp.c2
-rw-r--r--ldso/ldso/dl-elf.c4
-rw-r--r--ldso/ldso/dl-tls.c4
-rw-r--r--ldso/ldso/frv/elfinterp.c4
-rw-r--r--ldso/ldso/ldso.c2
-rw-r--r--ldso/ldso/m68k/elfinterp.c2
-rw-r--r--ldso/ldso/powerpc/elfinterp.c2
-rw-r--r--ldso/ldso/sh/elfinterp.c2
-rw-r--r--ldso/ldso/sh64/elfinterp.c2
-rw-r--r--ldso/libdl/Makefile4
-rw-r--r--ldso/libdl/Makefile.in19
-rw-r--r--libc/Makefile.in24
-rw-r--r--libc/string/arm/strcmp.S1
-rw-r--r--libpthread/Makefile76
-rw-r--r--libpthread/linuxthreads.old_db/Makefile4
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in67
-rw-r--r--libpthread/linuxthreads.old_db/Versions3
-rw-r--r--libpthread/linuxthreads.old_db/td_symbol_list.c13
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_clear_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_getmsg.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_id2thr.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_new.c5
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_set_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_thr_iter.c3
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_tsd_iter.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_clear_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_set_event.c6
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c5
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tsd.c1
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_validate.c1
-rw-r--r--libpthread/linuxthreads.old_db/thread_db.h14
-rw-r--r--libpthread/linuxthreads.old_db/thread_dbP.h2
-rw-r--r--libpthread/linuxthreads_db/CVS/Entries2
-rw-r--r--libpthread/linuxthreads_db/Makefile4
-rw-r--r--libpthread/linuxthreads_db/Makefile.in6
-rw-r--r--libpthread/nptl/Rules.mak16
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-initfini.s137
-rw-r--r--libpthread/nptl_db/Makefile69
-rw-r--r--libpthread/nptl_db/td_ta_new.c8
-rw-r--r--test/Makefile9
-rw-r--r--utils/Makefile100
60 files changed, 339 insertions, 1231 deletions
diff --git a/Makefile b/Makefile
index b0a557e48..4709fc2ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,397 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000-2003 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later
-# version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General
-# Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-
-#--------------------------------------------------------------
-# You shouldn't need to mess with anything beyond this point...
-#--------------------------------------------------------------
-noconfig_targets := menuconfig config oldconfig randconfig \
- defconfig allyesconfig allnoconfig clean distclean \
- release tags
-TOPDIR=./
-include Rules.mak
-
-# need to have libc.so built, before we can build the others
-PRE_DIRS = ldso libc
-DIRS = ldso libcrypt libresolv libnsl libutil librt
-ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
- DIRS += libm
-endif
-ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
- DIRS += libpthread
-endif
-ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
- DIRS += libintl
-endif
-
-ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
-
-all: finished
-
-# In this section, we need .config
--include .config.cmd
-
-finished: subdirs
- $(SECHO)
- $(SECHO) Finally finished compiling ...
- $(SECHO)
-
-include/bits/uClibc_config.h: .config
- @if [ ! -x ./extra/config/conf ] ; then \
- $(MAKE) -C extra/config conf; \
- fi
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -o extra/Configs/Config.in
-
-# For the moment, we have to keep re-running this target
-# because the fix includes scripts rely on pre-processers
-# in order to generate the headers correctly :(. That
-# means we can't use the $(HOSTCC) in order to get the
-# correct output.
-ifeq ($(strip $(ARCH_HAS_MMU)),y)
-export header_extra_args =
-else
-export header_extra_args = -n
-endif
-headers: include/bits/uClibc_config.h
- @$(SHELL_SET_X); \
- ./extra/scripts/fix_includes.sh \
- -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \
- $(header_extra_args)
- @cd include/bits; \
- set -e; \
- for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \
- $(LN) -fs $$i .; \
- done; \
- if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits ] ; then \
- for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h` ; do \
- $(LN) -fs $$i .; \
- done; \
- fi
- @cd include/sys; \
- set -e; \
- for i in `ls ../../libc/sysdeps/linux/common/sys/*.h` ; do \
- $(LN) -fs $$i .; \
- done; \
- if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
- for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h` ; do \
- $(LN) -fs $$i .; \
- done; \
- fi
- @cd $(TOPDIR); \
- set -e; \
- $(SHELL_SET_X); \
- TOPDIR=. CC="$(CC)" /bin/sh extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h.new; \
- if cmp include/bits/sysnum.h include/bits/sysnum.h.new >/dev/null 2>&1; then \
- $(RM) include/bits/sysnum.h.new; \
- else \
- mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \
- fi
-ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
- $(MAKE) -C libpthread headers
-endif
- $(MAKE) -C libc/sysdeps/linux/common headers
- $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers
-
-# Command used to download source code
-WGET:=wget --passive-ftp
-
-LOCALE_DATA_FILENAME:=uClibc-locale-030818.tgz
-
-pregen: headers
-ifeq ($(strip $(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA)),y)
- (cd extra/locale; \
- if [ ! -f $(LOCALE_DATA_FILENAME) ] ; then \
- $(WGET) http://www.uclibc.org/downloads/$(LOCALE_DATA_FILENAME) ; \
- fi )
-endif
-ifeq ($(strip $(UCLIBC_PREGENERATED_LOCALE_DATA)),y)
- (cd extra/locale; zcat $(LOCALE_DATA_FILENAME) | tar -xvf -)
- $(MAKE) -C extra/locale pregen
-endif
-
-pre_subdirs: $(patsubst %, _pre_dir_%, $(PRE_DIRS))
-$(patsubst %, _pre_dir_%, $(PRE_DIRS)): pregen
- $(MAKE) -C $(patsubst _pre_dir_%, %, $@)
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-$(patsubst %, _dir_%, $(DIRS)): pre_subdirs
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-tags:
- ctags -R
-
-install: install_runtime install_dev finished2
-
-
-RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell extra/scripts/relative_path.sh $(DEVEL_PREFIX)lib $(RUNTIME_PREFIX)lib)
-
-# Installs header files.
-install_headers:
- $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
- if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
- else \
- extra_exclude="" ; \
- fi ; \
- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
- | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ssp-internal.h
-ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
- # Remove floating point related headers since float support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/complex.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/fpu_control.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ieee754.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/math.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/tgmath.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/uClibc_fpmax.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_WCHAR)),y)
- # Remove wide char headers since wide char support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wctype.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wchar.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_LOCALE)),y)
- # Remove iconv header since locale support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/iconv.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF)),y)
- # Remove printf header since custom print specifier support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/printf.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_XLOCALE)),y)
- # Remove xlocale header since extended locale support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/xlocale.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
- # Remove libintl header since gettext support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/libintl.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_REGEX)),y)
- # Remove regex headers since regex support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regex.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/regexp.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_WORDEXP)),y)
- # Remove wordexp header since wordexp support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/wordexp.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_FTW)),y)
- # Remove ftw header since ftw support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ftw.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_GLOB)),y)
- # Remove glob header since glob support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/glob.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
- # Remove getopt header since gnu getopt support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/getopt.h
-endif
-ifneq ($(strip $(HAS_SHADOW)),y)
- # Remove shadow header since shadow password support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/shadow.h
-endif
-ifneq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- # Remove thread_db header since thread debug support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/thread_db.h
-endif
-ifneq ($(strip $(UCLIBC_HAS_THREADS)),y)
- # Remove pthread headers since thread support is disabled.
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/*thread*.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/semaphore.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/bits/*thread*.h
-endif
- -@for i in `find $(PREFIX)$(DEVEL_PREFIX) -type d` ; do \
- chmod 755 $$i; chmod 644 $$i/*.h > /dev/null 2>&1; \
- done
- -find $(PREFIX)$(DEVEL_PREFIX) -name .svn | xargs $(RM) -r
- -chown -R `id | sed 's/^uid=\([0-9]*\).*gid=\([0-9]*\).*$$/\1:\2/'` $(PREFIX)$(DEVEL_PREFIX)
-
-# Installs development library links.
-install_dev: install_headers
- $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
- -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
-ifeq ($(strip $(HAVE_SHARED)),y)
- for i in `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; \
- done
- if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
- $(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
- sed -e '/^GROUP/d' $(TOPDIR)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
- fi
-ifeq ($(strip $(COMPAT_ATEXIT)),y)
- if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
- echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) )" \
- >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
- fi
-else
- if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
- echo "GROUP ( $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) )" \
- >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
- fi
-endif
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- $(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
- $(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
-endif
-# # 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 \
- | sed -e 's/\.a$$/_pic.a/'`; \
- done ; \
- fi
-endif
-
-# Installs run-time libraries
-install_runtime:
-ifeq ($(strip $(HAVE_SHARED)),y)
- $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
- $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
- $(PREFIX)$(RUNTIME_PREFIX)lib
- cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
- @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
- set -e; \
- $(SHELL_SET_X); \
- $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
- $(PREFIX)$(RUNTIME_PREFIX)lib; \
- fi
-endif
-
-utils:
- $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
-
-# Installs helper applications, such as 'ldd' and 'ldconfig'
-install_utils: utils
- $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils install
-
-finished2:
- $(SECHO)
- $(SECHO) Finished installing ...
- $(SECHO)
-
-else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
-
-all: menuconfig
-
-# configuration
-# ---------------------------------------------------------------------------
-extra/config/conf:
- $(MAKE) -C extra/config conf
-
-extra/config/mconf:
- $(MAKE) -C extra/config ncurses mconf
-
-menuconfig: extra/config/mconf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/mconf extra/Configs/Config.in
- $(MAKE) headers
-
-config: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf extra/Configs/Config.in
-
-oldconfig: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -o extra/Configs/Config.in
-
-randconfig: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -r extra/Configs/Config.in
-
-allyesconfig: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -y extra/Configs/Config.in
- sed -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
- sed -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
- sed -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
- sed -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
- sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
- @./extra/config/conf -o extra/Configs/Config.in
-
-allnoconfig: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -n extra/Configs/Config.in
-
-defconfig: extra/config/conf
- $(RM) -r include/bits
- $(INSTALL) -d include/bits
- @./extra/config/conf -d extra/Configs/Config.in
-
-clean:
- @$(RM) -r lib include/bits
- $(RM) libc/*.a libc/obj.* libc/nonshared_obj.*
- $(RM) libc/misc/internals/interp.c
- $(RM) ldso/libdl/*.a
- $(RM) include/fpu_control.h
- $(MAKE) -C extra/locale clean
- $(MAKE) -C ldso headers_clean
- $(MAKE) -C libpthread headers_clean
- $(MAKE) -C test clean
- $(MAKE) -C utils clean
- @set -e; \
- for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \
- $(RM) include/sys/$$i; \
- done; \
- if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
- for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
- $(RM) include/sys/$$i; \
- done; \
- fi
- @$(RM) include/linux include/asm*
- @if [ -d libc/sysdeps/linux/$(TARGET_ARCH) ]; then \
- $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) clean; \
- fi
- -find . \( -name \*.o -o -name \*.os \) -exec $(RM) {} \;
-
-distclean: clean
- -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\#\* \) -exec $(RM) {} \;
- $(RM) .config .config.old .config.cmd
- $(RM) extra/locale/*.txt
- $(MAKE) -C extra clean
-
-release: distclean
- cd ..; \
- $(RM) -r uClibc-$(VERSION); \
- cp -dRf uClibc uClibc-$(VERSION); \
- find uClibc-$(VERSION)/ -type f \
- -name .\#* -exec $(RM) -r {} \; ; \
- find uClibc-$(VERSION)/ -type d \
- -name .svn -exec $(RM) -r {} \; ; \
- \
- tar -cvzf uClibc-$(VERSION).tar.gz uClibc-$(VERSION)/
-
-endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
-
-check:
- $(MAKE) -C test
-.PHONY: dummy subdirs release distclean clean config oldconfig menuconfig utils
+top_srcdir=./
+top_builddir=./
+#include $(top_builddir)Rules.mak
+#all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/Makefile.in b/Makefile.in
index 7dd1a3c03..c9327802d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,14 +16,12 @@ include $(top_builddir)Rules.mak
ifeq ($(HAVE_DOT_CONFIG),y)
-all: finished
+all: pregen libs
# In this section, we need .config
-include .config.cmd
-include $(top_srcdir)ldso/ldso/Makefile.in
-include $(top_srcdir)libc/Makefile.in
-include $(top_srcdir)ldso/libdl/Makefile.in
+include $(top_srcdir)ldso/Makefile.in
include $(top_srcdir)libcrypt/Makefile.in
include $(top_srcdir)libintl/Makefile.in
include $(top_srcdir)libm/Makefile.in
@@ -32,18 +30,13 @@ include $(top_srcdir)libresolv/Makefile.in
include $(top_srcdir)librt/Makefile.in
include $(top_srcdir)libutil/Makefile.in
include $(top_srcdir)libpthread/Makefile.in
+include $(top_srcdir)extra/locale/Makefile.in
-finished: pregen libs
- $(SECHO)
- $(SECHO) Finally finished compiling ...
- $(SECHO)
+# last included to catch all the objects added by others (locales/threads)
+include $(top_srcdir)libc/Makefile.in
-include/bits/uClibc_config.h: .config
- $(RM) -r include/bits
+include/bits/uClibc_config.h: .config extra/config/conf
$(INSTALL) -d include/bits
- @if [ ! -x extra/config/conf ] ; then \
- $(MAKE) -C extra/config conf; \
- fi
@extra/config/conf -o $(top_srcdir)extra/Configs/Config.in
# For the moment, we have to keep re-running this target
@@ -57,7 +50,7 @@ else
export header_extra_args = -n
endif
headers: include/bits/uClibc_config.h
-ifeq ($(wildcard include/headers_done),)
+ $(MAKE) headers-y
@$(SHELL_SET_X); \
$(top_srcdir)extra/scripts/fix_includes.sh \
-k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \
@@ -98,28 +91,10 @@ ifeq ($(wildcard include/headers_done),)
$(RM) include/bits/sysnum.h; \
mv -f include/bits/sysnum.h.new include/bits/sysnum.h; \
fi
- $(MAKE) headers-y
- touch include/headers_done
-endif
-
-# Command used to download source code
-WGET:=wget --passive-ftp
-
-LOCALE_DATA_FILENAME:=uClibc-locale-030818.tgz
pregen: headers
-ifeq ($(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA),y)
- (cd $(top_builddir)extra/locale; \
- if [ ! -f $(LOCALE_DATA_FILENAME) ] ; then \
- $(WGET) http://www.uclibc.org/downloads/$(LOCALE_DATA_FILENAME) ; \
- fi )
-endif
-ifeq ($(UCLIBC_PREGENERATED_LOCALE_DATA),y)
- (cd $(top_builddir)extra/locale; zcat $(LOCALE_DATA_FILENAME) | tar -xvf -)
- $(MAKE) -C $(top_srcdir)extra/locale pregen
-endif
-install: install_runtime install_dev finished2
+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)
@@ -132,9 +107,8 @@ install_headers:
else \
extra_exclude="" ; \
fi ; \
- tar -chf - include --exclude .svn $$extra_exclude \
+ tar -chf - --exclude .svn $$extra_exclude include \
| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/headers_done
$(RM) $(PREFIX)$(DEVEL_PREFIX)include/ssp-internal.h
$(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
ifneq ($(UCLIBC_HAS_FLOATS),y)
@@ -260,12 +234,7 @@ utils:
# Installs helper applications, such as 'ldd' and 'ldconfig'
install_utils: utils
- $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils install
-
-finished2:
- $(SECHO)
- $(SECHO) Finished installing ...
- $(SECHO)
+ $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
else # ifeq ($(HAVE_DOT_CONFIG),y)
@@ -279,11 +248,8 @@ endif # ifeq ($(HAVE_DOT_CONFIG),y)
# configuration
# ---------------------------------------------------------------------------
-extra/config/conf:
- $(MAKE) -C extra/config conf
-
-extra/config/mconf:
- $(MAKE) -C extra/config ncurses mconf
+extra/config/conf extra/config/mconf:
+ $(MAKE) -C extra/config $(notdir $@)
menuconfig: extra/config/mconf
$(RM) -r include/bits
@@ -330,12 +296,11 @@ defconfig: extra/config/conf
clean:
@$(RM) -r lib include/bits
$(RM) lib*/*.a ldso/*/*.a libpthread/*/*.a
- $(RM) libc/misc/internals/interp.c
- $(RM) include/fpu_control.h include/dl-osinfo.h include/headers_done
- $(MAKE) -C extra/locale clean
+ $(RM) include/fpu_control.h include/dl-osinfo.h
+ $(MAKE) -C extra/locale locale_clean
$(MAKE) headers_clean-y
$(MAKE) -C test clean
- $(MAKE) -C utils clean
+ $(MAKE) -C utils utils_clean
@set -e; \
for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
$(RM) include/sys/$$i; \
@@ -351,8 +316,8 @@ clean:
distclean: clean
-find . \( -name core -o -name \*.orig -o -name \*~ \) -exec $(RM) {} \;
$(RM) .config .config.old .config.cmd
- $(RM) extra/locale/*.txt
- $(MAKE) -C extra clean
+ $(RM) extra/locale/*.tgz
+ $(MAKE) -C extra/config config_clean
dist release:
$(MAKE) -s distclean
@@ -363,5 +328,3 @@ dist release:
check:
$(MAKE) -C test
-
-.PHONY: dummy subdirs release dist distclean clean config oldconfig menuconfig utils
diff --git a/Makerules b/Makerules
index 281afe7a3..91cae1ea6 100644
--- a/Makerules
+++ b/Makerules
@@ -2,42 +2,34 @@
# Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
#
-.SUFFIXES: .c .S .o .os .oS .so .a .s .i
+.SUFFIXES: .c .S .o .os .oS .so .a .s .i .E
# order is important, the stripping uses STRIP_FLAGS for lib-so, but not for lib-a
ifeq ($(HAVE_SHARED),y)
.LIBPATTERNS: "lib%.so"
-libs: lib-so-y lib-a-y
-objs: shared_objs ar_objs
+libs: $(lib-so-y) $(lib-a-y)
else
.LIBPATTERNS: "lib%.a"
-libs: lib-a-y
-objs: ar_objs
+libs: $(lib-a-y)
endif
+objs: all_objs
-shared_objs-y = $(lduClibc-so-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y)
-shared_objs-y += $(libcrypt-so-y) $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) $(libpthread-so-y)
-shared_objs-y += $(libresolv-so-y) $(librt-so-y) $(libutil-so-y)
-ar_objs-y = $(libc-a-y) $(libcrypt-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y)
-ar_objs-y += $(libpthread-a-y) $(libresolv-a-y) $(librt-a-y) $(libutil-a-y)
-
-shared_objs: $(shared_objs-y)
+shared_objs = $(ld-uClibc-so-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y)
+shared_objs += $(libcrypt-so-y) $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) $(libpthread-so-y)
+shared_objs += $(libthread_db-so-y) $(libresolv-so-y) $(librt-so-y) $(libutil-so-y)
+ar_objs = $(libc-a-y) $(libdl-a-y) $(libcrypt-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y)
+ar_objs += $(libpthread-a-y) $(libthread_db-a-y) $(libresolv-a-y) $(librt-a-y) $(libutil-a-y)
ifeq ($(DOPIC),y)
-ar_objs: $(ar_objs-y:.o=.os)
+ar_objs := $(ar_objs:.o=.os)
+endif
+
+ifeq ($(HAVE_SHARED),y)
+all_objs: $(sort $(shared_objs) $(ar_objs))
else
-ar_objs: $(ar_objs-y)
+all_objs: $(ar_objs)
endif
headers-y: $(headers-y)
-ld-uClibc-y: $(ld-uClibc-y)
-interp-y: $(interp)
-pre-y: interp-y ld-uClibc-y
-libc-y: pre-y $(libc) crt-y $(top_builddir)lib/$(NONSHARED_LIBNAME)
-lib-so-y: libc-y $(lib-so-y)
-lib-a-y: $(top_builddir)include/headers_done crt-y $(lib-a-y)
-
-$(top_builddir)include/headers_done:
- @cd $(top_builddir); $(MAKE) headers
ifneq ($(findstring s,$(MAKEFLAGS)),)
DISP := sil
@@ -58,7 +50,7 @@ pur_disp_compile.c = echo " "CC $(show_objs)
pur_disp_compile.S = echo " "AS $(show_objs)
pur_disp_compile.m = $(pur_disp_compile.c)
pur_disp_compile-m = echo " "CC-m $(show_objs)
-pur_disp_strip = echo " "STRIP $(STRIP_FLAGS) $@:*
+pur_disp_strip = echo " "STRIP $(STRIP_FLAGS) $@
pur_disp_ar = echo " "AR $(ARFLAGS) $@
pur_disp_ld = echo " "LD $(1)
@@ -93,6 +85,13 @@ cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)
cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
cmd_ar = $(AR) $(ARFLAGS) $@ $^
+define compile.u
+ $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@))
+ $(STRIPTOOL) $(STRIP_FLAGS) $@
+endef
+hcompile.u = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
+hcompile.o = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
+
compile.c = @$(disp_compile.c) ; $(cmd_compile.c)
compile.E = $(cmd_compile.c:-c=-E)
compile.S = @$(disp_compile.S) ; $(cmd_compile.S)
@@ -121,11 +120,36 @@ CFLAGS-.oS+=$(PICFLAG) -DSHARED
%.oS: %.c ; $(compile.c)
%.o: %.S ; $(compile.S)
%.os: %.S ; $(compile.S)
+%.oS: %.S ; $(compile.S)
%.o: %.s ; $(compile.S)
%.os: %.s ; $(compile.S)
+%.oS: %.s ; $(compile.S)
%.E: %.c ; $(compile.E)
%.E: %.S ; $(compile.E)
+$(top_builddir)lib/interp.c:
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
+ $(Q)echo "#include <features.h>" >> $@
+ $(Q)echo "#ifdef __HAVE_ELF__" >> $@
+ $(Q)echo "const char __dl_ldso__[] __attribute__ ((section " \
+ "(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@
+ $(Q)echo "#endif" >> $@
+
+$(interp): $(top_builddir)lib/interp.c
+ $(compile.c)
+ @$(disp_strip)
+ $(Q)$(STRIPTOOL) -x -R .note -R .comment $@
+
+$(ldso):
+ cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))
+
+$(libc):
+ cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))
+
+$(headers_dep):
+ cd $(top_builddir); $(MAKE) headers
+
#ifeq ($(HAVE_ELF),y)
CRT=crt1
#else
@@ -141,32 +165,27 @@ endif
$(top_builddir)lib/$(CRT).o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
$(Q)$(INSTALL) -d $(dir $@)
$(compile.S) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
- @$(disp_strip) $(show_objs)
+ @$(disp_strip)
$(Q)$(STRIPTOOL) -x -R .note -R .comment $@
$(top_builddir)lib/S$(CRT).o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(CRT).S
$(Q)$(INSTALL) -d $(dir $@)
$(compile.S) $(PIEFLAG) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
- @$(disp_strip) $(show_objs)
+ @$(disp_strip)
$(Q)$(STRIPTOOL) -x -R .note -R .comment $@
CTOR_TARGETS=$(top_builddir)lib/crti.o $(top_builddir)lib/crtn.o
ifeq ($(UCLIBC_CTOR_DTOR),y)
-$(top_builddir)lib/crti.o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/crti.S
- $(Q)$(INSTALL) -d $(dir $@)
- $(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
-
-$(top_builddir)lib/crtn.o: $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/crtn.S
+$(CTOR_TARGETS): $(top_builddir)lib/%.o : $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/%.S
$(Q)$(INSTALL) -d $(dir $@)
$(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
else
$(CTOR_TARGETS):
- $(Q)$(INSTALL) -d $(top_builddir)lib
+ $(Q)$(INSTALL) -d $(dir $@)
$(do_ar)
endif
-crt-y: $(crt-y)
$(crt-y): $(CRTS) $(CTOR_TARGETS)
$(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
@@ -178,3 +197,8 @@ clean: objclean-y headers_clean-y
objclean-y: $(objclean-y)
headers_clean-y: $(headers_clean-y)
+
+.PHONY: \
+ all check clean distclean test \
+ config dist menuconfig oldconfig release \
+ subdirs utils
diff --git a/Rules.mak b/Rules.mak
index e59a57e00..1dac08c3d 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -41,7 +41,7 @@ STRIP_FLAGS ?= -x -R .note -R .comment
# Select the compiler needed to build binaries for your development system
HOSTCC = gcc
-HOSTCFLAGS = -O2 -Wall
+BUILD_CFLAGS = -O2 -Wall
#---------------------------------------------------------
@@ -60,11 +60,13 @@ LIBC := libc
SHARED_MAJORNAME := $(LIBC).so.$(MAJOR_VERSION)
UCLIBC_LDSO := ld-uClibc.so.$(MAJOR_VERSION)
NONSHARED_LIBNAME := uclibc_nonshared.a
-libc := $(top_builddir)lib/$(LIBC).so
-interp := $(top_builddir)libc/misc/internals/interp.os
+libc := $(top_builddir)lib/$(SHARED_MAJORNAME)
+interp := $(top_builddir)lib/interp.os
+ldso := $(top_builddir)lib/$(UCLIBC_LDSO)
+headers_dep := $(top_builddir)include/bits/sysnum.h
#LIBS :=$(interp) -L$(top_builddir)lib -lc
-LIBS := $(interp) -L$(top_builddir)lib $(libc)
+LIBS := $(interp) -L$(top_builddir)lib $(libc:.$(MAJOR_VERSION)=)
# Make sure DESTDIR and PREFIX can be used to install
# PREFIX is a uClibcism while DESTDIR is a common GNUism
@@ -347,14 +349,16 @@ endif
PTDIR := $(top_builddir)libpthread/$(PTNAME)
# set up system dependencies include dirs (NOTE: order matters!)
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-PTINC:= -I$(PTDIR)/compat \
+PTINC:= -I$(PTDIR) \
+ -I$(PTDIR)/compat \
-I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
-I$(PTDIR)/sysdeps/$(TARGET_ARCH) \
-I$(PTDIR)/sysdeps/unix/sysv/linux \
-I$(PTDIR)/sysdeps/pthread \
-I$(PTDIR)/sysdeps/pthread/bits \
-I$(PTDIR)/sysdeps/generic \
- -Ildso/include \
+ -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
+ -I$(top_srcdir)ldso/include \
-include $(PTDIR)/compat/libc-symbols.h
#
# Test for TLS if NPTL support was selected.
@@ -374,10 +378,15 @@ gcc_tls_test_fail:
@exit 1;
endif
else
-PTINC:= -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \
- -I$(PTDIR)/sysdeps/pthread
+PTINC := \
+ -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \
+ -I$(PTDIR)/sysdeps/pthread \
+ -I$(PTDIR)
endif
CFLAGS+=$(PTINC)
+else
+ PTNAME :=
+ PTINC :=
endif
# Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include'
diff --git a/extra/Makefile b/extra/Makefile
index c0b8d3bdb..1dae3579e 100644
--- a/extra/Makefile
+++ b/extra/Makefile
@@ -1,31 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+top_srcdir=../
top_builddir=../
include $(top_builddir)Rules.mak
-
-DIRS =
-EXTRA_DIRS_TO_CLEAN = config
-
-all: subdirs
-
-tags:
- ctags -R
-
-clean: subdirs_clean
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS) $(EXTRA_DIRS_TO_CLEAN))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(DIRS) $(EXTRA_DIRS_TO_CLEAN)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-.PHONY: dummy
+all: objs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/extra/config/Makefile b/extra/config/Makefile
index e2e637aa8..519d55844 100644
--- a/extra/config/Makefile
+++ b/extra/config/Makefile
@@ -5,116 +5,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
-
-all: ncurses conf mconf
-
-ifeq ($(shell uname),SunOS)
-LIBS = -lcurses
-else
-LIBS = -lncurses
-endif
-ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
- HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
-else
-ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
- HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
-else
-ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h))
- HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>"
-else
-ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h))
- HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
-else
-ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
- HOSTNCURSES += -DCURSES_LOC="<ncurses.h>"
-else
- HOSTNCURSES += -DCURSES_LOC="<curses.h>"
-endif
-endif
-endif
-endif
-endif
-
-CONF_SRC = conf.c
-MCONF_SRC = mconf.c
-LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \
- lxdialog/yesno.c lxdialog/inputbox.c lxdialog/util.c \
- lxdialog/msgbox.c
-SHARED_SRC = zconf.tab.c
-SHARED_DEPS := lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h
-CONF_OBJS = $(patsubst %.c,%.o, $(CONF_SRC))
-MCONF_OBJS = $(patsubst %.c,%.o, $(MCONF_SRC) $(LXD_SRC))
-SHARED_OBJS = $(patsubst %.c,%.o, $(SHARED_SRC))
-
-conf: $(CONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
-
-mconf: $(MCONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
-
-$(CONF_OBJS): %.o : %.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
-
-$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
-
-lkc_defs.h: lkc_proto.h
- @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
-
-###
-# The following requires flex/bison
-# By default we use the _shipped versions, uncomment the
-# following line if you are modifying the flex/bison src.
-#LKC_GENPARSER := 1
-
-ifdef LKC_GENPARSER
-
-%.tab.c %.tab.h: %.y
- bison -t -d -v -b $* -p $(notdir $*) $<
-
-lex.%.c: %.l
- flex -P$(notdir $*) -o$@ $<
-else
-
-lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
-
-lex.zconf.c: lex.zconf.c_shipped
- cp lex.zconf.c_shipped lex.zconf.c
-
-zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS)
- $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
-
-zconf.tab.c: zconf.tab.c_shipped
- cp zconf.tab.c_shipped zconf.tab.c
-
-zconf.tab.h: zconf.tab.h_shipped
- cp zconf.tab.h_shipped zconf.tab.h
-endif
-
-.PHONY: ncurses
-
-ncurses:
- @echo "main() {}" > lxtemp.c
- @if $(HOSTCC) lxtemp.c $(LIBS) ; then \
- $(RM) lxtemp.c a.out; \
- else \
- $(RM) lxtemp.c; \
- echo -e "\007" ;\
- echo ">> Unable to find the Ncurses libraries." ;\
- echo ">>" ;\
- echo ">> You must have Ncurses installed in order" ;\
- echo ">> to use 'make menuconfig'" ;\
- echo ">>" ;\
- echo ">> Maybe you want to try 'make config', which" ;\
- echo ">> doesn't depend on the Ncurses libraries." ;\
- echo ;\
- exit 1 ;\
- fi
-
-clean:
- $(RM) *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
- conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h
-
+all: objs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/extra/locale/Makefile b/extra/locale/Makefile
index 031b8666f..11f362a5e 100644
--- a/extra/locale/Makefile
+++ b/extra/locale/Makefile
@@ -5,98 +5,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+top_srcdir=../../
top_builddir=../../
+all: objs
include $(top_builddir)Rules.mak
-
-EXTRA_LOCALE_DIR:=${shell cd $(top_builddir)extra/locale && pwd}
-
-CFLAGS_wc8bit=-DCTYPE_PACKED=1
-CFLAGS_mmap=
-ifeq ($(UCLIBC_HAS_WCHAR),y)
- CFLAGS_wc8bit += -DDO_WIDE_CHAR=1
- CFLAGS_mmap += -D__WCHAR_ENABLED=1
-endif
-
-all: links-target
-
-codesets.txt:
- @if [ ! -f codesets.txt ] ; then \
- set -e; \
- echo " "; \
- echo "You do not have a codesets.txt file. Please create this "; \
- echo "file in the extra/locale directory by running something like: "; \
- echo -e " find $(EXTRA_LOCALE_DIR)/charmaps -name \"*.pairs\" > \\"; \
- echo -e " $(EXTRA_LOCALE_DIR)/codesets.txt"; \
- echo "and then edit that file to disable/enable the codesets you wish to support. "; \
- echo " "; \
- false; \
- fi;
-
-gen_wc8bit: gen_wc8bit.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $(CFLAGS_wc8bit) -D__UCLIBC_GEN_LOCALE $^ -o $@
-
-c8tables.h: gen_wc8bit codesets.txt
- ./gen_wc8bit `cat codesets.txt`
-
-gen_wctype: gen_wctype.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) -D__UCLIBC_GEN_LOCALE $^ -o $@
-
-# Warning! Beware tr_TR toupper/tolower exceptions!
-wctables.h: gen_wctype
- ./gen_wctype en_US
-
-gen_locale: gen_locale.c c8tables.h
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) gen_locale.c -o $@
-
-locale_tables.h: gen_locale locales.txt
- ./gen_locale locales.txt
-
-lt_defines.h: locale_tables.h locale_collate.h
- grep "^#define" locale_tables.h > lt_defines.h
- grep "^#define __lc" locale_collate.h >> lt_defines.h
-
-gen_collate: gen_collate.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) gen_collate.c -o $@
-
-locale_collate.h: gen_collate locale_tables.h
- grep COL_IDX_ locale_tables.h | sed -e "s/^.*COL_IDX_\([^, ]*\).*$$/\1/" | sort | uniq | xargs ./gen_collate
-
-locales.txt:
- @if [ ! -f locales.txt ] ; then \
- set -e; \
- echo " "; \
- echo "You do not have a locales.txt file in the extra/locale "; \
- echo "directory, Please copy the LOCALES file to locales.txt by "; \
- echo "running something like: "; \
- echo " cp $(EXTRA_LOCALE_DIR)/LOCALES \\ "; \
- echo " $(EXTRA_LOCALE_DIR)/locales.txt "; \
- echo "then edit locales.txt to disable/enable the locales you wish "; \
- echo "to support. "; \
- echo " "; \
- false; \
- fi;
-
-gen_ldc: gen_ldc.c c8tables.h wctables.h locale_tables.h locale_collate.h
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $(CFLAGS_mmap) gen_ldc.c -o $@
-
-locale_data.c: gen_ldc
- ./gen_ldc
-
-uClibc_locale_data.h: c8tables.h wctables.h lt_defines.h locale_mmap.h
- grep -v "define __LC" lt_defines.h > uClibc_locale_data.h
- cat c8tables.h wctables.h locale_mmap.h >> uClibc_locale_data.h
-
-links-target: locale_data.c uClibc_locale_data.h
- cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
-
-pregen:
- cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
-
-clean:
- $(RM) *.o *~ core
- $(RM) gen_wc8bit gen_wctype gen_locale gen_ldc gen_collate
- $(RM) c8tables.h wctables.h locale_tables.h lt_defines.h locale_collate.h
- $(RM) gen_mmap locale.mmap lmmtolso
- $(RM) locale_data.c uClibc_locale_data.h
-
-.PHONY: pregen links-target
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/ldso/Makefile b/ldso/Makefile
index 2dea1b3e9..c8dc9b466 100644
--- a/ldso/Makefile
+++ b/ldso/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../
top_builddir=../
include $(top_builddir)Rules.mak
all: libs
diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h
index 37588b86c..789413c4f 100644
--- a/ldso/include/dl-defs.h
+++ b/ldso/include/dl-defs.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef _LD_DEFS_H
#define _LD_DEFS_H
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h
index c487436fc..f77c57348 100644
--- a/ldso/include/dl-elf.h
+++ b/ldso/include/dl-elf.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef LINUXELF_H
#define LINUXELF_H
diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h
index a7ef5c014..d9f386ee6 100644
--- a/ldso/include/dl-hash.h
+++ b/ldso/include/dl-hash.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef _LD_HASH_H_
#define _LD_HASH_H_
diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h
index bb4daff68..d1504f403 100644
--- a/ldso/include/dl-string.h
+++ b/ldso/include/dl-string.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef _LINUX_STRING_H_
#define _LINUX_STRING_H_
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 70b79f6cf..bf25c85be 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef _LD_SYSCALL_H_
#define _LD_SYSCALL_H_
diff --git a/ldso/include/dlfcn.h b/ldso/include/dlfcn.h
index 0bacc1a22..03afd34fb 100644
--- a/ldso/include/dlfcn.h
+++ b/ldso/include/dlfcn.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
/* User functions for run-time dynamic loading. libdl version */
#ifndef _DLFCN_H
#define _DLFCN_H 1
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h
index ac48db4c4..f0967107a 100644
--- a/ldso/include/ldso.h
+++ b/ldso/include/ldso.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
#ifndef _LDSO_H_
#define _LDSO_H_
diff --git a/ldso/include/unsecvars.h b/ldso/include/unsecvars.h
index 3555934e3..0ce3ebfea 100644
--- a/ldso/include/unsecvars.h
+++ b/ldso/include/unsecvars.h
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ *
+ * GNU Lesser General Public License version 2.1 or later.
+ */
+
/*
* Environment variable to be removed for SUID programs. The names are all
* stuffed in a single string which means they have to be terminated with a
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile
index f92f205a5..f9100219a 100644
--- a/ldso/ldso/Makefile
+++ b/ldso/ldso/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 2b8e5fcfc..903a1fd3a 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -5,12 +5,12 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS)
+CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS) -D_GNU_SOURCE
# This stuff will not work with -fomit-frame-pointer
CFLAGS-ldso += -fno-omit-frame-pointer
-CFLAGS-ldso += -I$(top_builddir)ldso/include -I$(top_builddir)ldso/ldso
+CFLAGS-ldso += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
CFLAGS-ldso += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\"
ifeq ($(SUPPORT_LD_DEBUG),y)
@@ -28,12 +28,10 @@ ifeq ($(DODEBUG),y)
CFLAGS-ldso += -Os -g
endif
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-CFLAGS-ldso += $(PTINC) -DSHARED
-endif
-
CFLAGS-ldso/ldso/$(TARGET_ARCH)/ := $(CFLAGS-ldso)
+CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
+
ifneq ($(SUPPORT_LD_DEBUG),y)
LDFLAGS-ld-uClibc.so := $(LDFLAGS)
else
@@ -54,19 +52,12 @@ ld-uClibc_SOBJ := $(patsubst $(ld-uClibc_DIR)/$(TARGET_ARCH)/%.S,$(ld-uClibc_OUT
ld-uClibc_OBJS := $(ld-uClibc_COBJ) $(ld-uClibc_SOBJ)
-ld-uClibc-so-y := $(ld-uClibc_OBJS:.o=.os)
+ld-uClibc-so-y := $(ld-uClibc_OBJS:.o=.oS)
-LN_HEADERS := $(patsubst %, $(top_builddir)ldso/include/%, elf.h)
-LN_ARCH_HEADERS := $(patsubst %, $(top_builddir)ldso/include/%, dl-startup.h dl-syscalls.h dl-sysdep.h dl-debug.h)
-HEADERS := $(LN_HEADERS) $(LN_ARCH_HEADERS) $(top_builddir)ldso/include/dl-progname.h
-
-#lib-so-y := $(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO))
-ld-uClibc-y := $(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO))
+lib-so-y += $(ldso)
objclean-y += ld-uClibc_clean
-headers-$(HAVE_SHARED) += ldso_headers
-headers_clean-y += ldso_headers_clean
-$(top_builddir)lib/$(patsubst %.$(MAJOR_VERSION),%,$(UCLIBC_LDSO)): $(ld-uClibc_OUT)/ld-uClibc_so.a $(top_builddir)include/headers_done
+$(ldso:.$(MAJOR_VERSION)=): $(ld-uClibc_OUT)/ld-uClibc_so.a
$(call link.so,$(ldso_FULL_NAME),$(MAJOR_VERSION))
$(ld-uClibc_OUT)/ld-uClibc_so.a: $(ld-uClibc-so-y)
@@ -74,19 +65,5 @@ $(ld-uClibc_OUT)/ld-uClibc_so.a: $(ld-uClibc-so-y)
$(do_strip)
$(do_ar)
-ldso_headers: $(HEADERS)
-
-$(LN_HEADERS):
- $(LN) -sf ../../$(top_srcdir)include/$(notdir $@) $@
-
-$(LN_ARCH_HEADERS):
- $(LN) -sf ../../$(top_srcdir)ldso/ldso/$(TARGET_ARCH)/$(notdir $@) $@
-
-$(top_builddir)ldso/include/dl-progname.h:
- echo '#include "$(TARGET_ARCH)/elfinterp.c"' > $@
-
-ldso_headers_clean:
- $(RM) $(HEADERS)
-
ld-uClibc_clean:
$(RM) $(ld-uClibc_OUT)/*.{o,os,a} $(ld-uClibc_OUT)/*/*.{o,os}
diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c
index 8086250ac..f5fbc816c 100644
--- a/ldso/ldso/arm/elfinterp.c
+++ b/ldso/ldso/arm/elfinterp.c
@@ -38,6 +38,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index 194800ebb..2624ca3c5 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -898,8 +898,10 @@ void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void
{
__dl_parse_dynamic_info(dpnt, dynamic_info, debug_addr, load_off);
}
+
+/* we want this in ldso.so and libdl.a but nowhere else */
#ifdef __USE_GNU
-#if ! defined LIBDL || (! defined PIC && ! defined __PIC__)
+#if defined IS_IN_rtld || (defined IS_IN_libdl && ! defined SHARED)
int
__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
{
diff --git a/ldso/ldso/dl-tls.c b/ldso/ldso/dl-tls.c
index 502720e58..1530cdcf5 100644
--- a/ldso/ldso/dl-tls.c
+++ b/ldso/ldso/dl-tls.c
@@ -719,6 +719,8 @@ _dl_update_slotinfo (unsigned long int req_modid)
unsigned long int idx = req_modid;
struct dtv_slotinfo_list *listp = _dl_tls_dtv_slotinfo_list;
+ _dl_debug_early ("Updating slotinfo for module %d\n", req_modid);
+
while (idx >= listp->len)
{
idx -= listp->len;
@@ -899,6 +901,8 @@ _dl_add_to_slotinfo (struct link_map *l)
struct dtv_slotinfo_list *prevp;
size_t idx = l->l_tls_modid;
+ _dl_debug_early("Adding to slotinfo for %s\n", l->l_name);
+
/* Find the place in the dtv slotinfo list. */
listp = _dl_tls_dtv_slotinfo_list;
prevp = NULL; /* Needed to shut up gcc. */
diff --git a/ldso/ldso/frv/elfinterp.c b/ldso/ldso/frv/elfinterp.c
index cccf9b70c..60ba138b0 100644
--- a/ldso/ldso/frv/elfinterp.c
+++ b/ldso/ldso/frv/elfinterp.c
@@ -24,7 +24,7 @@ License along with uClibc; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
USA. */
-#include <sys/cdefs.h> /* __attribute_used__ */
+#include <features.h>
/* Program to load an ELF binary on a linux system, and run it.
References to symbols in sharable libraries can be resolved by either
@@ -37,7 +37,7 @@ USA. */
a more than adequate job of explaining everything required to get this
working. */
-struct funcdesc_value volatile *__attribute__((__visibility__("hidden")))
+struct funcdesc_value volatile attribute_hidden *
_dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
int reloc_type;
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 5376e48e3..31eec9f2a 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -43,7 +43,7 @@
#endif
/* Pull in the value of _dl_progname */
-#include "dl-progname.h"
+#include LDSO_ELFINTERP
/* Global variables used within the shared library loader */
char *_dl_library_path = 0; /* Where we look for libraries */
diff --git a/ldso/ldso/m68k/elfinterp.c b/ldso/ldso/m68k/elfinterp.c
index c777faa5b..80fa1c9ec 100644
--- a/ldso/ldso/m68k/elfinterp.c
+++ b/ldso/ldso/m68k/elfinterp.c
@@ -40,6 +40,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned int
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index 3dd12f0ee..d0fa862f4 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
void _dl_init_got(unsigned long *plt,struct elf_resolve *tpnt)
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c
index 3027a27f8..b37bf129d 100644
--- a/ldso/ldso/sh/elfinterp.c
+++ b/ldso/ldso/sh/elfinterp.c
@@ -39,6 +39,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
diff --git a/ldso/ldso/sh64/elfinterp.c b/ldso/ldso/sh64/elfinterp.c
index c20314a85..845ff4fd0 100644
--- a/ldso/ldso/sh64/elfinterp.c
+++ b/ldso/ldso/sh64/elfinterp.c
@@ -41,6 +41,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index f92f205a5..f9100219a 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
index 326d303df..c63cedb2d 100644
--- a/ldso/libdl/Makefile.in
+++ b/ldso/libdl/Makefile.in
@@ -6,9 +6,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS-libdl := -DNOT_IN_libc -DIS_IN_libdl $(SSP_ALL_CFLAGS)
+CFLAGS-libdl := -DNOT_IN_libc -DIS_IN_libdl -DIS_IN_rtld $(SSP_ALL_CFLAGS)
-CFLAGS-libdl +=-I$(top_builddir)ldso/include -I$(top_builddir)ldso/ldso
+CFLAGS-libdl += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
CFLAGS-libdl += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\"
@@ -16,13 +16,11 @@ ifeq ($(SUPPORT_LD_DEBUG),y)
CFLAGS-libdl += -D__SUPPORT_LD_DEBUG__
endif
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-CFLAGS-libdl += $(PTINC) -DSHARED -DIS_IN_rtld
-endif
+CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
LDFLAGS-libdl.so := $(LDFLAGS) -fini dl_cleanup
-LIBS-libdl.so := $(LIBS) $(top_builddir)lib/$(UCLIBC_LDSO)
+LIBS-libdl.so := $(LIBS) $(ldso)
libdl_FULL_NAME := libdl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
@@ -35,13 +33,16 @@ libdl_OBJ := $(patsubst $(libdl_DIR)/%.c,$(libdl_OUT)/%.o,$(libdl_SRC))
resolve := $(top_builddir)ldso/ldso/$(TARGET_ARCH)/resolve.o
libdl-a-y := $(libdl_OBJ) $(resolve)
+ifeq ($(DOPIC),y)
+libdl-a-y := $(libdl-a-y:.o=.os)
+endif
libdl-so-y := $(libdl_OUT)/libdl.oS
lib-a-$(HAVE_SHARED) += $(top_builddir)lib/libdl.a
lib-so-y += $(top_builddir)lib/libdl.so
objclean-y += libdl_clean
-$(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a ld-uClibc-y libc-y
+$(top_builddir)lib/libdl.so: $(libdl_OUT)/libdl_so.a $(libc)
$(call link.so,$(libdl_FULL_NAME),$(MAJOR_VERSION))
$(libdl_OUT)/libdl_so.a: $(libdl-so-y)
@@ -49,11 +50,7 @@ $(libdl_OUT)/libdl_so.a: $(libdl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libdl.a: $(libdl-a-y:.o=.os)
-else
$(top_builddir)lib/libdl.a: $(libdl-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libc/Makefile.in b/libc/Makefile.in
index f65121c00..b03132256 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -15,7 +15,7 @@ endif
LDFLAGS-libc.so := $(LDFLAGS) $(VERSION_SCRIPT) -init __uClibc_init
-LIBS-libc.so := $(interp) $(top_builddir)lib/$(UCLIBC_LDSO)
+LIBS-libc.so := $(interp) $(ldso)
# we have SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) defined in Rules.mak
libc_FULL_NAME := libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
@@ -39,13 +39,17 @@ include $(libc_DIR)/unistd/Makefile.in
libc-a-y += $(libc-static-y)
libc-so-y += $(libc-shared-y)
+ifeq ($(DOPIC),y)
+libc-a-y := $(libc-a-y:.o=.os)
+endif
+
libc-nomulti-y += $(libc-shared-y)
-lib-a-y += $(top_builddir)lib/libc.a crt-y
-lib-so-y += libc-y $(top_builddir)lib/$(NONSHARED_LIBNAME) crt-y
+lib-a-y += $(top_builddir)lib/libc.a
+lib-so-y += $(libc)
objclean-y += libc_clean
-$(top_builddir)lib/libc.so: $(libc_OUT)/libc_so.a $(top_builddir)include/headers_done $(interp)
+$(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
$(Q)$(RM) $@
$(Q)echo "/* GNU ld script" > $@
@@ -57,16 +61,16 @@ else
$(Q)echo "GROUP ( $(SHARED_MAJORNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@
endif
-$(libc_OUT)/libc_so.a: $(libc-so-y)
+$(libc_OUT)/libc_so.a: $(libc-so-y) | $(top_builddir)lib/libc.a $(top_builddir)lib/$(NONSHARED_LIBNAME)
$(Q)$(RM) $@
- $(do_strip)
- $(do_ar)
-
ifeq ($(DOPIC),y)
-$(top_builddir)lib/libc.a: $(libc-a-y:.o=.os)
+ $(Q)$(STRIPTOOL) $(STRIP_FLAGS) $(libc-shared-y)
else
-$(top_builddir)lib/libc.a: $(libc-a-y)
+ $(do_strip)
endif
+ $(do_ar)
+
+$(top_builddir)lib/libc.a: $(libc-a-y) | $(crt-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libc/string/arm/strcmp.S b/libc/string/arm/strcmp.S
index e572cbe68..6913906ee 100644
--- a/libc/string/arm/strcmp.S
+++ b/libc/string/arm/strcmp.S
@@ -49,3 +49,4 @@ __strcmp:
.size __strcmp,.-__strcmp
.weak strcoll ; strcoll = strcmp
+.global __strcoll ; __strcoll = strcoll
diff --git a/libpthread/Makefile b/libpthread/Makefile
index 96631bfd0..c8dc9b466 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -1,71 +1,13 @@
-# Makefile for uClibc's pthread library
+# Makefile for uClibc
#
-# Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-ALL_SUBDIRS = $(PTNAME) $(PTNAME)_db
-DIRS = $(PTNAME)
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- DIRS += $(PTNAME)_db
-endif
-
-all: subdirs
-
-# NPTL does not have a generic pthreadtypes.h
-# and each arch has to have both semaphore.h/pthreadtypes.h ?
-headers:
- $(LN) -sf $(PTDIR)/sysdeps/pthread/pthread.h $(TOPDIR)include/
- $(LN) -sf $(PTDIR)/semaphore.h $(TOPDIR)include/
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- $(LN) -sf $(PTDIR)_db/thread_db.h $(TOPDIR)include/
-endif
-ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
- $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(TOPDIR)include/bits/
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(TOPDIR)include/bits/
-else
- $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(TOPDIR)include/bits/
-endif
-
-tags:
- ctags -R
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-headers_clean:
- $(RM) $(TOPDIR)include/pthread.h $(TOPDIR)include/semaphore.h \
- $(TOPDIR)include/thread_db.h \
- $(TOPDIR)include/bits/pthreadtypes.h $(TOPDIR)include/bits/semaphore.h \
- $(TOPDIR)include/bits/libc-lock.h $(TOPDIR)include/bits/stdio-lock
-ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
- $(RM) $(PTNAME)/version.h $(PTDIR)/banner.h \
- $(PTDIR)/sysdeps/unix/sysv/linux/rtld-libc-lowlevellock.c
-endif
-
-clean: subdirs_clean headers_clean
-.PHONY: dummy
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libpthread/linuxthreads.old_db/Makefile b/libpthread/linuxthreads.old_db/Makefile
index f92f205a5..f9100219a 100644
--- a/libpthread/linuxthreads.old_db/Makefile
+++ b/libpthread/linuxthreads.old_db/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index 0e29c7c18..bad600d89 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -5,39 +5,60 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-#CFLAGS+=$(SSP_ALL_CFLAGS)
-
-PT_MAJOR_VERSION:=$(MAJOR_VERSION)
# Get the thread include dependencies and shared object name
-CFLAGS+=-DLIBPTHREAD_SO="\"libpthread.so.$(PT_MAJOR_VERSION)\""
+CFLAGS-linuxthreads.old_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-# Remove any -z defs since this lib will have undefined symbols
-LDFLAGS:=$(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-STRIP_FLAGS:=-X --strip-debug -R .note -R .comment
-endif
+LIBS-libthread_db.so := $(LIBS)
-DOMULTI=n
+libthread_db_FULL_NAME := libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-LIB_NAME:=libthread_db
-libthread_db_FULL_NAME:=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads.old_db
+libthread_db_OUT := $(top_builddir)libpthread/linuxthreads.old_db
-MAJOR_VERSION:=1
+libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
-libthread_db_DIR:=$(top_srcdir)libpthread/linuxthreads.old_db
-libthread_db_OUT:=$(top_builddir)libpthread/linuxthreads.old_db
+libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+
+ifeq ($(DOPIC),y)
+libthread_db-a-y := $(libthread_db_OBJ:.o=.os)
+else
+libthread_db-a-y := $(libthread_db_OBJ)
+endif
+libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
-libthread_db_SRC:=$(wildcard $(libthread_db_DIR)/*.c)
+libthread_db-multi-y := $(libthread_db_SRC)
+
+lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
+lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
+objclean-y += libthread_db_clean
+headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
+headers_clean-y += linuxthreads_db_headers_clean
+
+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_OBJ:=$(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+$(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
-libthread_db-a-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ)
-libthread_db-so-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ:.o=.os)
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@
+ $(do_strip)
+ $(do_ar)
-libthread_db-multi-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_SRC)
+linuxthreads_db_headers:
+ $(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
-objclean-y+=libthread_db_clean
+linuxthreads_db_headers_clean:
+ $(RM) $(top_builddir)include/thread_db.h
-lib-a-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.a
-lib-so-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.so
+libthread_db_clean:
+ $(RM) $(libthread_db_OUT)/*.{o,os,a}
diff --git a/libpthread/linuxthreads.old_db/Versions b/libpthread/linuxthreads.old_db/Versions
index 4ca8042c1..063493c67 100644
--- a/libpthread/linuxthreads.old_db/Versions
+++ b/libpthread/linuxthreads.old_db/Versions
@@ -18,4 +18,7 @@ libthread_db {
GLIBC_2.3 {
td_thr_tls_get_addr;
}
+ GLIBC_2.3.3 {
+ td_thr_tlsbase;
+ }
}
diff --git a/libpthread/linuxthreads.old_db/td_symbol_list.c b/libpthread/linuxthreads.old_db/td_symbol_list.c
index 779332b9d..599c04596 100644
--- a/libpthread/linuxthreads.old_db/td_symbol_list.c
+++ b/libpthread/linuxthreads.old_db/td_symbol_list.c
@@ -1,5 +1,5 @@
/* Return list of symbols the library can request.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
@@ -21,6 +21,11 @@
#include <assert.h>
#include "thread_dbP.h"
+#ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define DOT "." /* PPC64 requires . prefix on code symbols. */
+#else
+# define DOT /* No prefix. */
+#endif
static const char *symbol_list_arr[] =
{
@@ -32,9 +37,9 @@ static const char *symbol_list_arr[] =
[LINUXTHREADS_PTHREAD_THREADS_MAX] = "__linuxthreads_pthread_threads_max",
[LINUXTHREADS_PTHREAD_KEYS_MAX] = "__linuxthreads_pthread_keys_max",
[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] = "__linuxthreads_pthread_sizeof_descr",
- [LINUXTHREADS_CREATE_EVENT] = "__linuxthreads_create_event",
- [LINUXTHREADS_DEATH_EVENT] = "__linuxthreads_death_event",
- [LINUXTHREADS_REAP_EVENT] = "__linuxthreads_reap_event",
+ [LINUXTHREADS_CREATE_EVENT] = DOT "__linuxthreads_create_event",
+ [LINUXTHREADS_DEATH_EVENT] = DOT "__linuxthreads_death_event",
+ [LINUXTHREADS_REAP_EVENT] = DOT "__linuxthreads_reap_event",
[LINUXTHREADS_INITIAL_REPORT_EVENTS] = "__linuxthreads_initial_report_events",
[LINUXTHREADS_VERSION] = "__linuxthreads_version",
[NUM_MESSAGES] = NULL
diff --git a/libpthread/linuxthreads.old_db/td_ta_clear_event.c b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
index bdbcf47aa..cbb7ddc97 100644
--- a/libpthread/linuxthreads.old_db/td_ta_clear_event.c
+++ b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
@@ -1,5 +1,5 @@
/* Globally disable events.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -37,7 +37,7 @@ td_ta_clear_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Remove the set bits in. */
@@ -46,7 +46,7 @@ td_ta_clear_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
index c004a5b79..ba535da79 100644
--- a/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
+++ b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
@@ -22,7 +22,6 @@
#include <string.h>
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c b/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
index 30f272af6..c57f25a5a 100644
--- a/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
+++ b/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c b/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
index 5bdf970e4..2be1e3de5 100644
--- a/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
+++ b/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_ta_new.c b/libpthread/linuxthreads.old_db/td_ta_new.c
index 9bf926719..2b0b68bf0 100644
--- a/libpthread/linuxthreads.old_db/td_ta_new.c
+++ b/libpthread/linuxthreads.old_db/td_ta_new.c
@@ -1,5 +1,5 @@
/* Attach to target process.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -128,8 +128,7 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
goto free_return;
/* Don't let bogons in the inferior make us mess ourselves. */
if ((*ta)->sizeof_descr > sizeof (struct _pthread_descr_struct))
- (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
-
+ (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
}
/* Now add the new agent descriptor to the list. */
diff --git a/libpthread/linuxthreads.old_db/td_ta_set_event.c b/libpthread/linuxthreads.old_db/td_ta_set_event.c
index 73cf9f405..6edb38e57 100644
--- a/libpthread/linuxthreads.old_db/td_ta_set_event.c
+++ b/libpthread/linuxthreads.old_db/td_ta_set_event.c
@@ -1,5 +1,5 @@
/* Globally enable events.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -37,7 +37,7 @@ td_ta_set_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Or the new bits in. */
@@ -46,7 +46,7 @@ td_ta_set_event (ta, event)
/* Write the new value into the thread data structure. */
if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_ta_thr_iter.c b/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
index 6cc4bf7c1..771a12de4 100644
--- a/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
+++ b/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
@@ -1,5 +1,5 @@
/* Iterate over a process's threads.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
#include <alloca.h>
static int
diff --git a/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c b/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
index f15b45003..7ad98dd91 100644
--- a/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
+++ b/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
#include <alloca.h>
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_thr_clear_event.c b/libpthread/linuxthreads.old_db/td_thr_clear_event.c
index c027fc09f..147d18037 100644
--- a/libpthread/linuxthreads.old_db/td_thr_clear_event.c
+++ b/libpthread/linuxthreads.old_db/td_thr_clear_event.c
@@ -1,5 +1,5 @@
/* Disable specific event for thread.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -43,7 +43,7 @@ td_thr_clear_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Remove the set bits in. */
@@ -55,7 +55,7 @@ td_thr_clear_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_thr_set_event.c b/libpthread/linuxthreads.old_db/td_thr_set_event.c
index 205b445c7..1e1def511 100644
--- a/libpthread/linuxthreads.old_db/td_thr_set_event.c
+++ b/libpthread/linuxthreads.old_db/td_thr_set_event.c
@@ -1,5 +1,5 @@
/* Enable specific event for thread.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -43,7 +43,7 @@ td_thr_set_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
/* Or the new bits in. */
@@ -55,7 +55,7 @@ td_thr_set_event (th, event)
((char *) th->th_unique
+ offsetof (struct _pthread_descr_struct,
p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ &old_event, sizeof (td_thr_events_t)) != PS_OK)
return TD_ERR; /* XXX Other error value? */
return TD_OK;
diff --git a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
index e140b77dc..a28b07450 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
+++ b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
@@ -1,5 +1,5 @@
/* Get address of thread local variable.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2002.
@@ -18,8 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-
-#include "link.h"
+#include <link.h>
#include "thread_dbP.h"
/* Value used for dtv entries for which the allocation is delayed. */
diff --git a/libpthread/linuxthreads.old_db/td_thr_tsd.c b/libpthread/linuxthreads.old_db/td_thr_tsd.c
index 003ed95fe..2ab71c588 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tsd.c
+++ b/libpthread/linuxthreads.old_db/td_thr_tsd.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/td_thr_validate.c b/libpthread/linuxthreads.old_db/td_thr_validate.c
index 31169ef60..2cf7727b6 100644
--- a/libpthread/linuxthreads.old_db/td_thr_validate.c
+++ b/libpthread/linuxthreads.old_db/td_thr_validate.c
@@ -19,7 +19,6 @@
02111-1307 USA. */
#include "thread_dbP.h"
-#include "../linuxthreads.old/internals.h"
td_err_e
diff --git a/libpthread/linuxthreads.old_db/thread_db.h b/libpthread/linuxthreads.old_db/thread_db.h
index f0d9aa7c3..c115399a3 100644
--- a/libpthread/linuxthreads.old_db/thread_db.h
+++ b/libpthread/linuxthreads.old_db/thread_db.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread
+ Copyright (C) 1999,2001,2002,2003 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
@@ -52,8 +53,10 @@ typedef enum
TD_MALLOC, /* Out of memory. */
TD_PARTIALREG, /* Not entire register set was read or written. */
TD_NOXREGS, /* X register set not available for given thread. */
- TD_NOTALLOC, /* TLS memory not yet allocated. */
- TD_VERSION /* Version if libpthread and libthread_db do not match. */
+ TD_TLSDEFER, /* Thread has not yet allocated TLS for given module. */
+ TD_NOTALLOC = TD_TLSDEFER,
+ TD_VERSION, /* Version if libpthread and libthread_db do not match. */
+ TD_NOTLS /* There is TLS segment in the given module. */
} td_err_e;
@@ -402,6 +405,11 @@ extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th,
const void *__addr);
+/* Get address of the given module's TLS storage area for the given thread. */
+extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th,
+ unsigned long int __modid,
+ psaddr_t *__base);
+
/* Get address of thread local variable. */
extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th,
void *__map_address, size_t __offset,
diff --git a/libpthread/linuxthreads.old_db/thread_dbP.h b/libpthread/linuxthreads.old_db/thread_dbP.h
index a979a44a9..257beb2e9 100644
--- a/libpthread/linuxthreads.old_db/thread_dbP.h
+++ b/libpthread/linuxthreads.old_db/thread_dbP.h
@@ -8,7 +8,7 @@
#include <unistd.h>
#include "proc_service.h"
#include "thread_db.h"
-#include "../linuxthreads.old/internals.h"
+#include "internals.h"
/* Indeces for the symbol names. */
diff --git a/libpthread/linuxthreads_db/CVS/Entries b/libpthread/linuxthreads_db/CVS/Entries
index eed928270..99a94cb65 100644
--- a/libpthread/linuxthreads_db/CVS/Entries
+++ b/libpthread/linuxthreads_db/CVS/Entries
@@ -43,7 +43,7 @@
/td_thr_tls_get_addr.c/1.8/Tue Nov 15 14:20:48 2005//
/td_thr_tlsbase.c/1.4/Tue Nov 15 14:20:48 2005//
/td_thr_tsd.c/1.6/Tue Nov 15 14:20:48 2005//
-/td_thr_validate.c/1.8/Tue Nov 15 14:20:48 2005//
/thread_db.h/1.14/Tue Nov 15 14:20:48 2005//
/thread_dbP.h/1.14/Tue Nov 15 14:20:48 2005//
+/td_thr_validate.c/1.8/Tue Nov 22 18:25:09 2005//
D
diff --git a/libpthread/linuxthreads_db/Makefile b/libpthread/linuxthreads_db/Makefile
index f92f205a5..f9100219a 100644
--- a/libpthread/linuxthreads_db/Makefile
+++ b/libpthread/linuxthreads_db/Makefile
@@ -5,9 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-TOPDIR=../../
-
-top_srcdir=$(TOPDIR)
+top_srcdir=../../
top_builddir=../../
include $(top_builddir)Rules.mak
all: libs
diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in
index ad2401c02..c80e32c53 100644
--- a/libpthread/linuxthreads_db/Makefile.in
+++ b/libpthread/linuxthreads_db/Makefile.in
@@ -7,7 +7,7 @@
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-CFLAGS-linuxthreads_db += -I$(top_srcdir)libpthread -D_GNU_SOURCE
+CFLAGS-linuxthreads_db += -D_GNU_SOURCE
LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
@@ -44,11 +44,13 @@ $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
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)
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) $(libthread_db_OUT)/libthread_db_so.a
endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
+ifneq ($(DOPIC),y)
$(do_strip)
+endif
$(do_ar)
linuxthreads_db_headers:
diff --git a/libpthread/nptl/Rules.mak b/libpthread/nptl/Rules.mak
deleted file mode 100644
index b42995738..000000000
--- a/libpthread/nptl/Rules.mak
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# These names are used for NPTL since we have to build seperate archives
-# for the static and shared objects.
-#
-LIB_NAME := libpthread
-AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
-AR_SO_LIB_NAME := $(TOPDIR)lib/shared_$(LIB_NAME).a
-SO_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CFLAGS-LIBC := $(filter-out -O0 -O1 -Os, $(CFLAGS)) $(PTINC) -O2 \
- -I$(TOPDIR)libpthread/nptl \
- -I$(TOPDIR)ldso/include -std=gnu99
-ASFLAGS-LIBC := $(filter-out -std=gnu99, $(CFLAGS-LIBC)) -D__ASSEMBLER__
-CFLAGS-LIBP := $(CFLAGS-LIBC) -DNOT_IN_libc=1 -DIS_IN_libpthread=1
-ASFLAGS-LIBP := $(filter-out -std=gnu99, $(CFLAGS-LIBP)) -D__ASSEMBLER__
diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.s b/libpthread/nptl/sysdeps/pthread/pt-initfini.s
deleted file mode 100644
index d8e3a7316..000000000
--- a/libpthread/nptl/sysdeps/pthread/pt-initfini.s
+++ /dev/null
@@ -1,137 +0,0 @@
- .file 1 "pt-initfini.c"
- .section .mdebug.abi32
- .previous
- .abicalls
-#APP
-
-#include "defs.h"
-
-/*@HEADER_ENDS*/
-
-/*@TESTS_BEGIN*/
-#NO_APP
- .text
- .align 2
- .globl dummy
- .type dummy, @function
-dummy:
- .set noreorder
- .set nomacro
-
- beq $4,$0,$L6
- move $25,$4
-
- jr $25
- nop
-
-$L6:
- j $31
- nop
-
- .set macro
- .set reorder
-#APP
-
-/*@TESTS_END*/
-
-/*@_init_PROLOG_BEGINS*/
-#NO_APP
- .align 2
- .type call_initialize_minimal, @function
-call_initialize_minimal:
- .set noreorder
- .cpload $25
- .set nomacro
-
- lw $25,%call16(__pthread_initialize_minimal_internal)($28)
- nop
- jr $25
- nop
-
- .set macro
- .set reorder
-#APP
- .section .init
-#NO_APP
- .align 2
- .globl _init
- .type _init, @function
-_init:
- .set noreorder
- .cpload $25
- .set reorder
- addiu $sp,$sp,-32
- sw $31,24($sp)
- .cprestore 16
- lw $25,%got(call_initialize_minimal)($28)
- #nop
- addiu $25,$25,%lo(call_initialize_minimal)
- jalr $25
- lw $28,16($sp)
-#APP
- ALIGN
- END_INIT
-
-/*@_init_PROLOG_ENDS*/
-
-/*@_init_EPILOG_BEGINS*/
- .section .init
-#NO_APP
- lw $31,24($sp)
- #nop
- .set noreorder
- .set nomacro
- j $31
- addiu $sp,$sp,32
- .set macro
- .set reorder
-
-#APP
- END_INIT
-
-/*@_init_EPILOG_ENDS*/
-
-/*@_fini_PROLOG_BEGINS*/
- .section .fini
-#NO_APP
- .align 2
- .globl _fini
- .type _fini, @function
-_fini:
- .set noreorder
- .cpload $25
- .set reorder
- addiu $sp,$sp,-32
- sw $31,24($sp)
- .cprestore 16
-#APP
- ALIGN
- END_FINI
-
-/*@_fini_PROLOG_ENDS*/
-#NO_APP
- lw $25,%call16(i_am_not_a_leaf)($28)
- #nop
- jalr $25
- lw $28,16($sp)
-#APP
-
-/*@_fini_EPILOG_BEGINS*/
- .section .fini
-#NO_APP
- lw $31,24($sp)
- #nop
- .set noreorder
- .set nomacro
- j $31
- addiu $sp,$sp,32
- .set macro
- .set reorder
-
-#APP
- END_FINI
-
-/*@_fini_EPILOG_ENDS*/
-
-/*@TRAILER_BEGINS*/
- .ident "GCC: (GNU) 4.1.0 20050604 (experimental)"
diff --git a/libpthread/nptl_db/Makefile b/libpthread/nptl_db/Makefile
index 54b48be78..f92f205a5 100644
--- a/libpthread/nptl_db/Makefile
+++ b/libpthread/nptl_db/Makefile
@@ -1,66 +1,15 @@
-# Makefile for uClibc's native pthread debug library
-#
-# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com>
+# Makefile for uClibc
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-# Makefile for uClibc
TOPDIR=../../
-include $(TOPDIR)Rules.mak
-
-LIB_NAME=libthread_db
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-ifeq ($(strip $(TARGET_ARCH)),mips)
-CFLAGS := $(CFLAGS:-O1=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
- -std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-else
-CFLAGS := $(CFLAGS:-O0=-O2) -DNOT_IN_libc=1 -DIS_IN_libthread_db=1 $(PTINC) \
- -std=gnu99 -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-endif
-
-# Remove any -z defs since this lib will have undefined symbols
-LDFLAGS := $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
-
-OBJS = $(patsubst %.c, %.o, $(filter-out db_info.c, $(wildcard *.c)))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).1 $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.1 \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).1
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=$(TOPDIR)
+top_builddir=../../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libpthread/nptl_db/td_ta_new.c b/libpthread/nptl_db/td_ta_new.c
index 152c27b5e..bc8caee20 100644
--- a/libpthread/nptl_db/td_ta_new.c
+++ b/libpthread/nptl_db/td_ta_new.c
@@ -21,11 +21,11 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __UCLIBC__
-#include <../nptl/version.h>
-#else
+//#ifdef __UCLIBC__
+//#include <../nptl/version.h>
+//#else
#include <version.h>
-#endif
+//#endif
#include "thread_dbP.h"
diff --git a/test/Makefile b/test/Makefile
index d3af44f80..51fcde843 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -27,18 +27,13 @@ ALL_SUBDIRS = \
#misc
DIRS := $(ALL_SUBDIRS)
-ifeq ($(HAVE_SHARED)$(BUILD_UCLIBC_LDSO),yy)
+ifeq ($(HAVE_SHARED),y)
DIRS += dlopen
-ALL_SUBDIRS += dlopen
endif
ifeq ($(UCLIBC_HAS_THREADS),y)
DIRS += pthread
-ALL_SUBDIRS += pthread
-endif
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
- DIRS += tls nptl
-ALL_SUBDIRS += tls nptl
endif
+ALL_SUBDIRS += pthread dlopen
all: subdirs
diff --git a/utils/Makefile b/utils/Makefile
index b665fb7a8..bdaea9fd4 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -8,100 +8,6 @@
top_srcdir=../
top_builddir=../
include $(top_builddir)Rules.mak
-
-CFLAGS += $(SSP_ALL_CFLAGS) -B$(top_builddir)lib -I$(top_builddir)ldso/include
-
-TARGETS = ldd ldconfig
-
-ifeq ($(UCLIBC_HAS_LOCALE),y)
-TARGET_ICONV = iconv
-else
-TARGET_ICONV =
-endif
-
-ifeq ($(LDSO_CACHE_SUPPORT),y)
-HOST_LDSO_CACHE_FLAG = -D__LDSO_CACHE_SUPPORT__=1
-else
-HOST_LDSO_CACHE_FLAG =
-endif
-
-# NOTE: We build the utils AFTER we have a uClibc-targeted toolchain.
-
-ifeq ($(HAVE_SHARED),y)
-all: $(TARGETS) $(TARGET_ICONV)
-else
-all: $(TARGET_ICONV)
-endif
-
-headers:
- @$(LN) -fs $(top_builddir)include/elf.h
- @$(LN) -fs $(top_builddir)include/link.h
-
-readelf.c ldconfig.c ldd.c: headers
-
-readelf: readelf.c
- $(CC) $(CFLAGS) $^ -o $@
- $(STRIPTOOL) -s -x -R .note -R .comment $@
-
-ifeq ($(UCLIBC_STATIC_LDCONFIG),y)
-LDCONFIG_CFLAGS := -static
-else
-LDCONFIG_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
-endif
-ldconfig: ldconfig.c chroot_realpath.c
- $(CC) $(CFLAGS) $(LDCONFIG_CFLAGS) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
- $^ -o $@
- $(STRIPTOOL) -s -x -R .note -R .comment $@
-
-LDD_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
-ldd: ldd.c
- $(CC) $(CFLAGS) $(LDD_CFLAGS) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
- $^ -o $@
- $(STRIPTOOL) -s -x -R .note -R .comment $@
-
-ICONV_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
-iconv: $(top_srcdir)libc/misc/wchar/wchar.c
- $(CC) $(CFLAGS) $(ICONV_CFLAGS) \
- -DL_iconv_main \
- $^ -o $@
- $(STRIPTOOL) -s -x -R .note -R .comment $@
-
-ifeq ($(HAVE_SHARED),y)
-hostutils: ldd.host ldconfig.host readelf.host
-else
-hostutils: readelf.host
-endif
-
-ldd.host: ldd.c
- $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" $(HOST_LDSO_CACHE_FLAG) \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I$(top_builddir)ldso/include \
- $^ -o $@
-
-ldconfig.host: ldconfig.c chroot_realpath.c
- $(HOSTCC) $(HOSTCFLAGS) -Wl,-s \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" $(HOST_LDSO_CACHE_FLAG) \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I$(top_builddir)ldso/include \
- $^ -o $@
-
-readelf.host: readelf.c
- $(HOSTCC) $(HOSTCFLAGS) -Wl,-s $^ -o $@
-
-clean:
- $(RM) $(TARGETS) *.o *~ core elf.h link.h readelf iconv *.host
-
-install: all
-ifeq ($(HAVE_SHARED),y)
- $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)sbin
- $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)usr/bin
- $(INSTALL) -m 755 ldd $(PREFIX)$(RUNTIME_PREFIX)usr/bin/ldd
- $(INSTALL) -m 755 ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
- #$(INSTALL) -m 755 readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf
-endif
-ifeq ($(UCLIBC_HAS_LOCALE),y)
- $(INSTALL) -m 755 iconv $(PREFIX)$(RUNTIME_PREFIX)usr/bin/iconv
-endif
+all: utils
+include Makefile.in
+include $(top_srcdir)Makerules