summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-08-10 08:00:08 +0000
committerEric Andersen <andersen@codepoet.org>2001-08-10 08:00:08 +0000
commit96277cfcea64ba6965b20fd78529f2f6fa59e32a (patch)
tree69692cef15440ff2a45bf0429482f7f23a25b902
parent7e79b9d3abb86bc457607ff3405052092cbf0069 (diff)
Update the build system, yet again. I hope this is the last time...
Here is the basic theory of operation: SHARED_LIB_LOADER_PATH/ <The location where the shared lib loader will be installed and where the compiler will cause apps to look for it.> DEVEL_PREFIX/ bin/ <contains gcc, ld, etc for setting PATH=$DEVEL_PREFIX/bin:$PATH> lib/ <contains all runtime and static libs> include/ <Where all the header files go> SYSTEM_DEVEL_PREFIX/ usr/bin/ <contains arch-uclibc-gcc, arch-uclibc-ld, etc that might be installed by a .deb or .rpm into /usr/bin, but can happily live under DEVEL_PREFIX> PREFIX This is prepended during 'make install's allowing you to shift things to be installed under some alternate location (such as when building a .deb) -Erik
-rw-r--r--Makefile136
-rw-r--r--README22
-rw-r--r--Rules.mak48
-rw-r--r--TODO3
-rw-r--r--extra/Configs/Config.arm78
-rw-r--r--extra/Configs/Config.cross.arm.uclinux74
-rw-r--r--extra/Configs/Config.i38678
-rw-r--r--extra/Configs/Config.m68k73
-rw-r--r--extra/Configs/Config.m68k.coff74
-rw-r--r--extra/Configs/Config.mips78
-rw-r--r--extra/Configs/Config.mipsel78
-rw-r--r--extra/Configs/Config.powerpc81
-rw-r--r--extra/Configs/Config.sh75
-rw-r--r--extra/gcc-uClibc/Makefile21
-rw-r--r--ldso/Makefile17
15 files changed, 533 insertions, 403 deletions
diff --git a/Makefile b/Makefile
index 136bac1d7..87dba57e9 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ include Rules.mak
DIRS = extra ldso libc libcrypt libresolv libutil libm
-all: headers uClibc_config.h subdirs $(DO_SHARED) done
+all: headers uClibc_config.h subdirs shared done
Config:
@echo
@@ -42,17 +42,20 @@ Config:
@exit 1
shared:
+ifeq ($(strip $(HAVE_SHARED)),true)
@$(MAKE) -C libc shared
- @$(MAKE) -C $(LIBRARY_CACHE) ldso/util
-ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
- @$(MAKE) -C $(LIBRARY_CACHE) ldso shared
-endif
+ @$(MAKE) -C ldso shared
@$(MAKE) -C libcrypt shared
@$(MAKE) -C libutil shared
@$(MAKE) -C libm shared
@$(MAKE) -C libresolv shared
+else
+ @echo
+ @echo Not building shared libraries...
+ @echo
+endif
-done: $(DO_SHARED)
+done: shared
@echo
@echo Finally finished compiling...
@echo
@@ -171,80 +174,79 @@ tags:
install: install_dev install_runtime install_gcc
-# install_target:
-# Installs run-time libraries and helper apps (ldconfig) to the
-# locations that one would expect on a host that is running uClibc
-# as the primary libc. TARGET_PREFIX is the location of the root
-# directory.
-install_target:
-ifeq ($(DO_SHARED),shared)
- install -d $(DESTDIR)$(TARGET_PREFIX)/lib
- install -d $(DESTDIR)$(TARGET_PREFIX)/etc
- install -d $(DESTDIR)$(TARGET_PREFIX)/sbin
- install -d $(DESTDIR)$(TARGET_PREFIX)/usr/bin
- install -m 644 lib/lib*-0.9.5.so $(DESTDIR)$(TARGET_PREFIX)/lib
- cp -a lib/*.so.* $(DESTDIR)$(TARGET_PREFIX)/lib
-ifeq ($(LDSO_PRESENT),$(TARGET_ARCH))
- install -m 755 lib/ld-uClibc-0.9.5.so $(DESTDIR)$(TARGET_PREFIX)/lib
- install -m 755 ldso/util/ldd $(DESTDIR)$(TARGET_PREFIX)/usr/bin
- install -m 755 ldso/util/readelf $(DESTDIR)$(TARGET_PREFIX)/usr/bin
- if [ -x ldso/util/ldconfig ] ; then \
- install -m 755 ldso/util/ldconfig $(DESTDIR)$(TARGET_PREFIX)/sbin; \
- fi;
-endif
-ifeq ($(NATIVE_ARCH), $(TARGET_ARCH))
-# -@if [ -x ldso/util/ldconfig ] ; then ldso/util/ldconfig; fi
-endif
+
+# Installs header files and development library links.
+install_dev:
+ install -d $(PREFIX)$(DEVEL_PREFIX)/lib
+ install -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)/lib/
+ install -d $(PREFIX)$(DEVEL_PREFIX)/include
+ install -d $(PREFIX)$(DEVEL_PREFIX)/usr/lib
+ find include/ -name '*.h' -depth -follow -exec install \
+ -D -m 644 {} $(PREFIX)$(DEVEL_PREFIX)/'{}' ';'
+ifeq ($(strip $(HAVE_SHARED)),true)
+ find lib/ -type l -name '*.so' -exec cp -a {} $(PREFIX)$(DEVEL_PREFIX)/lib ';'
endif
-# install_runtime:
-# Installs run-time libraries and helper apps (ldconfig) to the
-# locations one would expect on a host that is running a different
-# libary as the primary libc.
+
+# Installs run-time libraries and helper apps onto the host system
+# allowing cross development. If you want to deploy to a target
+# system, use the "install_target" target instead...
install_runtime:
-ifeq ($(DO_SHARED),shared)
- install -d $(DESTDIR)$(DEVEL_PREFIX)/lib
- install -d $(DESTDIR)$(DEVEL_PREFIX)/etc
- install -d $(DESTDIR)$(DEVEL_PREFIX)/bin
- install -m 644 lib/lib*-0.9.5.so $(DESTDIR)$(DEVEL_PREFIX)/lib
- cp -a lib/*.so.* $(DESTDIR)$(DEVEL_PREFIX)/lib
-ifeq ($(LDSO_PRESENT),$(TARGET_ARCH))
- install -m 755 lib/ld-uClibc-0.9.5.so $(DESTDIR)$(DEVEL_PREFIX)/lib
- install -m 755 ldso/util/ldd $(DESTDIR)$(DEVEL_PREFIX)/bin
- install -m 755 ldso/util/readelf $(DESTDIR)$(DEVEL_PREFIX)/bin
- install -d $(DESTDIR)$(DEVEL_PREFIX)/bin
- ln -fs $(DEVEL_PREFIX)/bin/ldd $(DESTDIR)$(DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ldd
+ifeq ($(strip $(HAVE_SHARED)),true)
+ install -d $(PREFIX)$(DEVEL_PREFIX)/lib
+ install -d $(PREFIX)$(DEVEL_PREFIX)/bin
+ install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(DEVEL_PREFIX)/lib
+ cp -a lib/*.so.* $(PREFIX)$(DEVEL_PREFIX)/lib
+ install -m 755 ldso/util/ldd $(PREFIX)$(DEVEL_PREFIX)/bin
+ install -m 755 ldso/util/readelf $(PREFIX)$(DEVEL_PREFIX)/bin
+ install -d $(PREFIX)$(DEVEL_PREFIX)/bin
+ install -d $(PREFIX)$(DEVEL_PREFIX)/usr/bin
+ ln -fs $(DEVEL_PREFIX)/bin/ldd $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-ldd
+ ln -fs $(DEVEL_PREFIX)/bin/readelf $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-readelf
+ if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so ] ; then \
+ install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)$(DEVEL_PREFIX)/lib; \
+ ln -fs $(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) \
+ $(PREFIX)$(DEVEL_PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so || true; \
+ fi;
if [ -x ldso/util/ldconfig ] ; then \
- install -m 755 ldso/util/ldconfig $(DESTDIR)$(DEVEL_PREFIX)/bin; \
- install -d $(DESTDIR)$(DEVEL_PREFIX)/sbin; \
- ln -fs $(DEVEL_PREFIX)/sbin/ldconfig $(DESTDIR)$(DEVEL_PREFIX)/sbin/$(TARGET_ARCH)-uclibc-ldconfig; \
+ install -d $(PREFIX)$(DEVEL_PREFIX)/etc; \
+ install -m 755 ldso/util/ldconfig $(PREFIX)$(DEVEL_PREFIX)/bin; \
+ ln -fs $(DEVEL_PREFIX)/sbin/ldconfig $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-ldconfig; \
fi;
endif
-endif
-
-# install_dev:
-# Installs header files and development library links.
-# DEVEL_PREFIX should be $(PREFIX)/$(target)-linux-uclibc/
-install_dev:
- install -d $(DESTDIR)$(DEVEL_PREFIX)/lib
- install -m 644 lib/*.[ao] $(DESTDIR)$(DEVEL_PREFIX)/lib/
-ifeq ($(DO_SHARED),shared)
- find lib/ -type l -name '*.so' -exec cp -a {} $(DESTDIR)$(DEVEL_PREFIX)/lib ';'
-ifeq ($(NATIVE_ARCH), $(TARGET_ARCH))
-# -@if [ -x ldso/util/ldconfig ] ; then ldso/util/ldconfig; fi
-endif
-endif
- install -d $(DESTDIR)$(DEVEL_PREFIX)/include
- find include/ -name '*.h' -depth -follow -exec install \
- -D -m 644 {} $(DESTDIR)$(DEVEL_PREFIX)/'{}' ';'
install_gcc:
$(MAKE) -C extra/gcc-uClibc install
+
+# Installs run-time libraries and helper apps in preparation for
+# deploying onto a target system, but installed below wherever
+# $PREFIX is set to, allowing you to package up the result for
+# deployment onto your target system.
+install_target:
+ifeq ($(strip $(HAVE_SHARED)),true)
+ install -d $(PREFIX)/lib
+ install -d $(PREFIX)/sbin
+ install -d $(PREFIX)/usr/bin
+ install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)/lib
+ cp -a lib/*.so.* $(PREFIX)/lib
+ install -m 755 ldso/util/ldd $(PREFIX)/usr/bin
+ install -m 755 ldso/util/readelf $(PREFIX)/usr/bin
+ if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so ] ; then \
+ install -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so $(PREFIX)/lib; \
+ ln -fs $(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) \
+ $(PREFIX)/lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so || true; \
+ fi;
+ if [ -x ldso/util/ldconfig ] ; then \
+ install -d $(PREFIX)/etc; \
+ install -m 755 ldso/util/ldconfig $(PREFIX)/sbin; \
+ fi;
+endif
+
clean:
@rm -rf tmp lib include/bits/uClibc_config.h uClibc_config.h
- find include -type l -exec rm -f {} \;
- - find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core \) -exec rm -f {} \;
+ - find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core -o -name .\#\* \) -exec rm -f {} \;
$(MAKE) -C ldso clean
$(MAKE) -C libc/unistd clean
$(MAKE) -C libc/sysdeps/linux/common clean
diff --git a/README b/README
index 07d04fadd..34268dfc8 100644
--- a/README
+++ b/README
@@ -3,12 +3,11 @@
cp ./extra/Configs/Config.<target arch> ./Config
-Then edit ./Config for your setup. In particular, modify
-CROSS and KERNEL_SOURCE as necessary. You may also want
-to modify PREFIX if you want to install the development
-environment to /usr/local/ or elsewhere. By default, the
-development environment is installed into /usr and
-/usr/<arch>-linux-uclibc/.
+Then edit ./Config for your setup. In particular, modify CROSS and
+KERNEL_SOURCE as necessary. You may also want to modify
+SHARED_LIB_LOADER_PATH, DEVEL_PREFIX, and SYSTEM_DEVEL_PREFIX depending
+on where you want to install the development environment. By default,
+the development environment is installed into /usr/<arch>-linux-uclibc/.
* Building:
@@ -25,21 +24,16 @@ development environment is installed into /usr and
This will install the header files, libraries, and the gcc
wrapper into the directories defined in Config.
-If you are targetting the same architecture as the host machine,
-you may want to add a link from /lib/ld-uClibc.0 to the location
-where ld-uClibc.0 was installed. This allows you to run binaries
-compiled against uClibc without contaminating /lib too much.
-
* Installing the target runtime environment:
(As root, if necessary,)
- make TARGET_PREFIX=`pwd`/_install install_target
+ make PREFIX=<temporary path> install_target
This installs only the files that are necessary to run binaries
-compiled against uClibc. Hint: You really don't want to install
-the target runtime environment on the host machine.
+compiled against uClibc. Hint: You probably do not want to install
+the target runtime environment on your host machine.
* Using uClibc:
diff --git a/Rules.mak b/Rules.mak
index ec50eae35..0f5a49b52 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -51,6 +51,8 @@ TARGET_CCFLAGS=--uclibc-use-build-dir $(WARNINGS) $(OPTIMIZATION) $(CPUFLAGS)
CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
TARGET_CFLAGS=$(ARCH_CFLAGS) $(TARGET_CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
+NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
+ -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g')
ifeq ($(strip $(DODEBUG)),true)
CFLAGS += -g
@@ -68,52 +70,24 @@ ifeq ($(strip $(DOPIC)),true)
CFLAGS += -fPIC
endif
-
-ifndef PREFIX
- PREFIX = `pwd`/_install
- DEVEL_PREFIX = $(PREFIX)
- TARGET_PREFIX = $(PREFIX)
+# Disable libm if HAS_FLOATING_POINT isn't true.
+ifneq ($(HAS_FLOATING_POINT),true)
+ HAS_LIBM_FLOAT = false
+ HAS_LIBM_DOUBLE = false
+ HAS_LIBM_LONG_DOUBLE = false
endif
-NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g')
-
ifeq ($(strip $(HAVE_SHARED)),true)
- DO_SHARED=shared
-endif
-
-LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ldso/d-link; ls -d $(TARGET_ARCH) 2>/dev/null))
-
-# NOTE: This may need to be modified for your system
-SYSTEM_LDSO=$(shell for each in `$(CC) -print-search-dirs|grep ^libraries|sed -e 's/^libraries: //' -e 's/:/ /g'`;do ls $$each/ld.so.* 2>/dev/null;done)
-#SYSTEM_LDSO=/lib/ld-linux.so.2
-
-ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
+ LIBRARY_CACHE=#-DUSE_CACHE
+ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true)
LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
- DYNAMIC_LINKER=$(DESTDIR)$(PREFIX)/lib/$(UCLIBC_LDSO)
+ DYNAMIC_LINKER=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO)
BUILD_DYNAMIC_LINKER=$(shell cd $(TOPDIR)lib; pwd)/$(UCLIBC_LDSO)
else
LDSO=$(SYSTEM_LDSO)
DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
- BUILD_DYNAMIC_LINKER=$(shell cd $(TOPDIR)lib; pwd)/$(UCLIBC_LDSO)
+ BUILD_DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
endif
-LIBRARY_CACHE=#-DUSE_CACHE
-
-# Disable libm if HAS_FLOATING_POINT isn't true.
-ifneq ($(HAS_FLOATING_POINT),true)
- HAS_LIBM_FLOAT = false
- HAS_LIBM_DOUBLE = false
- HAS_LIBM_LONG_DOUBLE = false
endif
-# It turns out the currently, function-sections causes ldelf2flt to segfault.
-# So till further notice, this is disabled by default....
-#
-# Use '-ffunction-sections -fdata-sections' and '--gc-sections' if they work
-# to try and strip out any unused junk automagically....
-#
-#ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \
-# -o /dev/null -xc /dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1)
-# CFLAGS += -ffunction-sections -fdata-sections
-# LDFLAGS += --gc-sections
-#endif
diff --git a/TODO b/TODO
index 087a9d320..d163cad5d 100644
--- a/TODO
+++ b/TODO
@@ -3,7 +3,6 @@ Any takers?
Fix regex so it isn't so stinking big
Fix glob so it isn't so stinking big
Integrate Jeff Garzik's key-value reading code for pwd/grp, /etc/hosts, etc
-Get the arm port of the shared lib loader working
Get the powerpc port of the shared lib loader working
Finish sparc port
Standardize the style of the header files.
@@ -18,6 +17,8 @@ include/resolv.h does not define struct _res, and libc/inet/resolv.c
functions are not implemented.
scandir.c doesn't check returns on malloc and realloc.
Add in shadow support (include/shadow.h and such)
+Right now, getopt has different behavior when dynamically vs when
+ statically linked, violating the principle of least surprise.
-----------------------------------------------------------------------------
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index ee2d52804..5e7ce4db9 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = true
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -112,8 +109,8 @@ LOCALE_DIR = "/usr/share/uClibc-locale/"
# It is actually smaller than "malloc", at least on i386. Right now, it
# only works on i386 (and maybe m68k) because it needs sbrk.
#MALLOC = malloc-simple
-MALLOC = malloc
-#MALLOC = malloc-930716
+#MALLOC = malloc
+MALLOC = malloc-930716
# If you want to collect common syscall code into one function, set to this to
# `true'. Set it to false otherwise.
@@ -139,30 +136,51 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = true
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=true
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
-DEVEL_PREFIX = $(PREFIX)
-TARGET_PREFIX = /
+# 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.
+SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = $(DEVEL_PREFIX)
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.cross.arm.uclinux b/extra/Configs/Config.cross.arm.uclinux
index 344273efb..cc3501f70 100644
--- a/extra/Configs/Config.cross.arm.uclinux
+++ b/extra/Configs/Config.cross.arm.uclinux
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -139,30 +136,51 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /opt/uClinux
-DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf
-TARGET_PREFIX = $(TOPDIR)/_install
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /opt/uClinux/$(TARGET_ARCH)-elf
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = /
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386
index 7eb9a0095..33ce45a4e 100644
--- a/extra/Configs/Config.i386
+++ b/extra/Configs/Config.i386
@@ -35,7 +35,7 @@ TARGET_ARCH=i386
# If you are running a cross compiler, you may want to set this
# to something more interesting...
NATIVE_CC = gcc
-CROSS = #i386-linux-
+CROSS = #$(TARGET_ARCH)-linux-
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
@@ -45,14 +45,11 @@ STRIPTOOL = $(CROSS)strip
# Set the following to `true' to make a debuggable build, and `false' for
# production builds.
-DODEBUG = true
+DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = true
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -139,30 +136,51 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = true
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=true
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
-DEVEL_PREFIX = $(PREFIX)
-TARGET_PREFIX = /
+# 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.
+SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = $(DEVEL_PREFIX)
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k
index b9447b844..3168eb366 100644
--- a/extra/Configs/Config.m68k
+++ b/extra/Configs/Config.m68k
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -153,30 +150,50 @@ ARCH_CFLAGS2 = -I$(KERNEL_SOURCE)/include
OPTIMIZATION = $(DEBUG_CFLAGS)
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /opt/uClinux
-DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf
-TARGET_PREFIX = $(TOPDIR)/_install
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /opt/uClinux/$(TARGET_ARCH)-elf
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = /
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.m68k.coff b/extra/Configs/Config.m68k.coff
index 541089407..8ae49475f 100644
--- a/extra/Configs/Config.m68k.coff
+++ b/extra/Configs/Config.m68k.coff
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -155,30 +152,51 @@ OPTIMIZATION = $(DEBUG_CFLAGS)
# This is a COFF compiler (ick), so disable all the cool stuff
HAVE_ELF = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /opt/uClinux
-DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-coff
-TARGET_PREFIX = $(TOPDIR)/_install
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /opt/uClinux/$(TARGET_ARCH)-coff
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = /
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.mips b/extra/Configs/Config.mips
index 4f8a38c7f..8e3b4ce36 100644
--- a/extra/Configs/Config.mips
+++ b/extra/Configs/Config.mips
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -111,8 +108,8 @@ LOCALE_DIR = "/usr/share/uClibc-locale/"
# "malloc-930716" is from libc-5.3.12 and was/is the standard gnu malloc.
# It is actually smaller than "malloc", at least on i386. Right now, it
# only works on i386 (and maybe m68k) because it needs sbrk.
-#MALLOC = malloc-simple
-MALLOC = malloc
+MALLOC = malloc-simple
+#MALLOC = malloc
#MALLOC = malloc-930716
# If you want to collect common syscall code into one function, set to this to
@@ -139,30 +136,51 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
-DEVEL_PREFIX = $(PREFIX)
-TARGET_PREFIX = /
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = $(DEVEL_PREFIX)
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.mipsel b/extra/Configs/Config.mipsel
index 4f8a38c7f..8e3b4ce36 100644
--- a/extra/Configs/Config.mipsel
+++ b/extra/Configs/Config.mipsel
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -111,8 +108,8 @@ LOCALE_DIR = "/usr/share/uClibc-locale/"
# "malloc-930716" is from libc-5.3.12 and was/is the standard gnu malloc.
# It is actually smaller than "malloc", at least on i386. Right now, it
# only works on i386 (and maybe m68k) because it needs sbrk.
-#MALLOC = malloc-simple
-MALLOC = malloc
+MALLOC = malloc-simple
+#MALLOC = malloc
#MALLOC = malloc-930716
# If you want to collect common syscall code into one function, set to this to
@@ -139,30 +136,51 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
-DEVEL_PREFIX = $(PREFIX)
-TARGET_PREFIX = /
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = $(DEVEL_PREFIX)
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc
index 2e2aa692e..c36b82703 100644
--- a/extra/Configs/Config.powerpc
+++ b/extra/Configs/Config.powerpc
@@ -50,9 +50,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = true
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -112,8 +109,8 @@ LOCALE_DIR = "/usr/share/uClibc-locale/"
# It is actually smaller than "malloc", at least on i386. Right now, it
# only works on i386 (and maybe m68k) because it needs sbrk.
#MALLOC = malloc-simple
-MALLOC = malloc
-#MALLOC = malloc-930716
+#MALLOC = malloc
+MALLOC = malloc-930716
# If you want to collect common syscall code into one function, set to this to
# `true'. Set it to false otherwise.
@@ -139,30 +136,54 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = true
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+SYSTEM_LDSO=$(shell for each in `$(CC) -print-search-dirs| \
+ grep ^libraries| sed -e 's/^libraries: //' -e 's/:/ /g'`;\
+ do ls $$each/ld.so.* 2>/dev/null;done)
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
-DEVEL_PREFIX = $(PREFIX)
-TARGET_PREFIX = $(TOPDIR)/_install
+# 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.
+SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /usr/$(TARGET_ARCH)-linux-uclibc
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = $(DEVEL_PREFIX)
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh
index dc8cb0c35..e0dfb9e8f 100644
--- a/extra/Configs/Config.sh
+++ b/extra/Configs/Config.sh
@@ -51,9 +51,6 @@ DODEBUG = false
# Compiler warnings you want to see
WARNINGS=-Wall
-# Enable support for shared libraries?
-HAVE_SHARED = false
-
# Note that the kernel source you use to compile with should be the same as the
# Linux kernel you run your apps on. uClibc doesn't even try to achieve binary
# compatibility across kernel versions. So don't expect, for example, uClibc
@@ -160,30 +157,52 @@ INCLUDE_IPV6 = false
# If you want to compile the library as PIC code, turn this on.
DOPIC = false
-# PREFIX is the directory prefix that is applied to all installed
-# files. Typically, it is set to /usr or /usr/local, although it could
-# also be /opt/vendor_name_here/some/random/path/. The install_runtime
-# makefile target installs a few symbolic links based on PREFIX, not
-# DEVEL_PREFIX.
-#
-# DEVEL_PREFIX is the directory where the development environment will
-# be installed. The uClibc header files are installed into
-# $(DEVEL_PREFIX)/include, static libraries are installed into
-# $(DEVEL_PREFIX)/lib, etc. This directory is compiled into the uclibc
-# cross compiler spoofer. Generally, DEVEL_PREFIX should be set to
-# the same thing as $(PREFIX). DEVEL_PREFIX is used by the Makefile install
-# targets install_gcc, install_dev, and install_runtime.
+
+
+# Enable support for shared libraries? If this is false, you can
+# ignore all the rest of the options in this file...
+HAVE_SHARED = false
+
+# uClibc has a native shared library loader for some architectures.
+BUILD_UCLIBC_LDSO=false
+
+# If you are using shared libraries, but do not want/have a native
+# uClibc shared library loader, please specify the name of your
+# system's shared library loader here...
+#SYSTEM_LDSO=/lib/ld-linux.so.2
+
+# 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.
#
-# TARGET_PREFIX is the directory into which the target runtime
-# environment is installed. The target runtime environment is what one
-# would use for a embedded system where uclibc is the native libaray.
-# This will typically be a staging area for creating a root filesystem
-# for the target system, so the default is in the local directory.
-#
-# If you want to install to a temporary directory before copying files
-# to their final location, define DESTDIR during the install step,
-# i.e., 'make install DESTDIR=/home/foo/uclibc/_install'.
-PREFIX = /opt/uClinux
-DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf
-TARGET_PREFIX = $(TOPDIR)/_install
+# 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.
+#SHARED_LIB_LOADER_PATH=$(DEVEL_PREFIX)/lib
+
+# DEVEL_PREFIX is the directory into which the uClibc development
+# environment will be installed. The result will look something
+# like the following:
+# DEVEL_PREFIX/
+# bin/ <contains gcc, ld, etc>
+# lib/ <contains all runtime and static libs>
+# include/ <Where all the header files go>
+# This value is used by the 'make install' Makefile target. Since this
+# directory is compiled into the uclibc cross compiler spoofer, you
+# have to recompile if you change this value...
+DEVEL_PREFIX = /opt/uClinux/$(TARGET_ARCH)-elf
+
+# SYSTEM_DEVEL_PREFIX is the directory prefix used when installing
+# usr/bin/arch-uclibc-gcc, usr/bin/arch-uclibc-ld, etc. This is only
+# used by the 'make install' target, and is not compiled into anything.
+# This defaults to $DEVEL_PREFIX, but makers of .rpms and .debs will
+# want to set this to "/" instead.
+SYSTEM_DEVEL_PREFIX = /
+
+# If you want 'make install' to install everything under a temporary
+# directory, the define PREFIX during the install step,
+# i.e., 'make PREFIX=/var/tmp/uClibc install'.
+#PREFIX = $(TOPDIR)/_install
+PREFIX =
+
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index fc7b3dd59..3b51c104c 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -32,19 +32,18 @@ ld-uClibc:
chmod a+x $(TARGET_ARCH)-uclibc-ld
install: all
- install -d $(DESTDIR)$(DEVEL_PREFIX)/bin;
- install -d $(DESTDIR)$(DEVEL_PREFIX)/usr/bin;
- ln -fs ../include $(DESTDIR)$(DEVEL_PREFIX)/usr/include
- install -m 755 $(TARGET_ARCH)-uclibc-gcc $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/
- install -m 755 $(TARGET_ARCH)-uclibc-ld $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/
- ln -fs $(TARGET_ARCH)-uclibc-gcc $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-cc
- ln -fs $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DESTDIR)$(DEVEL_PREFIX)/bin/gcc
- ln -fs $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DESTDIR)$(DEVEL_PREFIX)/bin/cc
- ln -fs $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-ld $(DESTDIR)$(DEVEL_PREFIX)/bin/ld
+ install -d $(PREFIX)$(DEVEL_PREFIX)/bin;
+ install -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin;
+ install -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/
+ install -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/
+ ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-cc
+ ln -fs $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)/bin/gcc
+ ln -fs $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)/bin/cc
+ ln -fs $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_PREFIX)/bin/ld
for app in addr2line ar as cpp gasp nm objcopy \
objdump ranlib size strings strip; do \
- ln -fs `which $(CROSS)$${app}` $(DESTDIR)$(DEVEL_PREFIX)/bin/$${app}; \
- ln -fs `which $(CROSS)$${app}` $(DESTDIR)$(DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \
+ ln -fs `which $(CROSS)$${app}` $(PREFIX)$(DEVEL_PREFIX)/bin/$${app}; \
+ ln -fs `which $(CROSS)$${app}` $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \
done
clean:
diff --git a/ldso/Makefile b/ldso/Makefile
index 0337ab90a..c606a9fba 100644
--- a/ldso/Makefile
+++ b/ldso/Makefile
@@ -1,24 +1,19 @@
TOPDIR=../
include $(TOPDIR)Rules.mak
-SUBDIRS = libdl
-ALL_SUBDIRS = util libdl d-link
-
+ALL_SUBDIRS = d-link libdl util
all:
-ifeq ($(strip $(HAVE_SHARED)),true)
- @if [ -d $(TOPDIR)ldso/d-link/$(TARGET_ARCH) ] ; then \
- $(MAKE) -C d-link; \
- fi;
+ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true)
+ $(MAKE) -C $(LIBRARY_CACHE) d-link;
endif
shared:
-ifeq ($(strip $(HAVE_SHARED)),true)
- @if [ -d $(TOPDIR)ldso/d-link/$(TARGET_ARCH) ] ; then \
- set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d ; done \
- fi;
+ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true)
+ $(MAKE) -C $(LIBRARY_CACHE) libdl;
endif
+ $(MAKE) -C $(LIBRARY_CACHE) util;
clean:
set -e ; for d in $(ALL_SUBDIRS) ; do $(MAKE) -C $$d $@ ; done