diff options
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | Makefile.help | 3 | ||||
-rw-r--r-- | Makefile.in | 52 | ||||
-rw-r--r-- | Makerules | 2 | ||||
-rw-r--r-- | extra/Configs/Config.in | 31 | ||||
-rw-r--r-- | test/Rules.mak | 2 |
6 files changed, 45 insertions, 48 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 a4424f758..53828204d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -191,7 +191,7 @@ $(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) $(hcompile.u) @@ -286,7 +286,7 @@ HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h ### ucontext.h ifneq ($(findstring install,$(MAKECMDGOALS)),) -$(PREFIX)$(RUNTIME_PREFIX)lib $(addprefix $(PREFIX)$(DEVEL_PREFIX),include lib): +$(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) $(addprefix $(PREFIX)$(DEVEL_PREFIX),include lib): $(do_mkdir) endif @@ -301,49 +301,49 @@ else endif # Installs development library links. -install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)lib - -$(INSTALL) -m 644 $(top_builddir)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 $(top_builddir)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 $(top_builddir)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 $(top_builddir)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 $(top_builddir)lib ] ; then \ for i in `find $(top_builddir)lib/ -type f -name 'lib*.a' | $(SED) -e 's/lib\///'` ; do \ - $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)lib/`echo $$i \ + $(LN) -sf $$i $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/`echo $$i \ | $(SED) -e 's/\.a$$/_pic.a/'`; \ done ; \ fi @@ -352,24 +352,24 @@ endif ifeq ($(UCLIBC_FORMAT_SHARED_FLAT),y) 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 | $(PREFIX)$(RUNTIME_PREFIX)lib +install_runtime: all | $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR) ifeq ($(HAVE_SHARED),y) $(INSTALL) -m 755 $(top_builddir)lib/lib*-$(VERSION).so \ - $(PREFIX)$(RUNTIME_PREFIX)lib - (cd $(top_builddir)lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib + $(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 $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \ - $(PREFIX)$(RUNTIME_PREFIX)lib; \ + $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR); \ fi endif @@ -326,7 +326,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) diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index c7f4cad65..6c19dec5d 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -1851,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/" @@ -1902,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" + help + Path component where libraries reside. + + For a typical target system this should be set to "lib", such that + 'make install' will install libraries to "/lib" and "/usr/lib" + respectively + DEVEL_PREFIX/MULTILIB_DIR + RUNTIME_PREFIX/MULTILIB_DIR + + Other settings may include "lib32" or "lib64". + config HARDWIRED_ABSPATH bool "Hardwire absolute paths into linker scripts" default y diff --git a/test/Rules.mak b/test/Rules.mak index 6acc13ffa..a386390b0 100644 --- a/test/Rules.mak +++ b/test/Rules.mak @@ -85,7 +85,7 @@ LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib -Wl,-rpath-link,$( UCLIBC_LDSO_ABSPATH=$(shell pwd) ifdef TEST_INSTALLED_UCLIBC LDFLAGS += -Wl,-rpath,./ -UCLIBC_LDSO_ABSPATH=$(SHARED_LIB_LOADER_PREFIX) +UCLIBC_LDSO_ABSPATH=$(RUNTIME_PREFIX)$(MULTILIB_DIR) endif ifeq ($(findstring -static,$(LDFLAGS)),) |