diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-12 21:41:31 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-12 21:41:31 +0000 |
commit | ffc7bb39cce77ae6243aa903f0cc1a96ab42bce8 (patch) | |
tree | ed630021880996199ec74be056c409c5ced9d66d /extra | |
parent | d6e6ee0202f8705a30b10b53eb259a2d62ece466 (diff) |
This commit merges David Schleef's updates to the build system, which a
few tiny fixups here and there from me. Seems to work just fine and
will hopefully be a bit better behaved.
-Erik
Diffstat (limited to 'extra')
-rw-r--r-- | extra/Configs/Config.arm | 45 | ||||
-rw-r--r-- | extra/Configs/Config.cross.arm.uclinux | 45 | ||||
-rw-r--r-- | extra/Configs/Config.i386 | 46 | ||||
-rw-r--r-- | extra/Configs/Config.m68k | 50 | ||||
-rw-r--r-- | extra/Configs/Config.m68k.coff | 51 | ||||
-rw-r--r-- | extra/Configs/Config.mips | 46 | ||||
-rw-r--r-- | extra/Configs/Config.mipsel | 46 | ||||
-rw-r--r-- | extra/Configs/Config.powerpc | 52 | ||||
-rw-r--r-- | extra/Configs/Config.sh | 46 | ||||
-rw-r--r-- | extra/gcc-uClibc/Makefile | 33 | ||||
-rw-r--r-- | extra/gcc-uClibc/gcc-uClibc.c | 12 |
11 files changed, 270 insertions, 202 deletions
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm index 408a23f60..d47d3c033 100644 --- a/extra/Configs/Config.arm +++ b/extra/Configs/Config.arm @@ -139,22 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. -DEVEL_PREFIX = -ROOT_DIR = /usr/$(TARGET_ARCH)-linux-uclibc -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /usr +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-linux-uclibc +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.cross.arm.uclinux b/extra/Configs/Config.cross.arm.uclinux index f61a8d2dd..ea6fcd16b 100644 --- a/extra/Configs/Config.cross.arm.uclinux +++ b/extra/Configs/Config.cross.arm.uclinux @@ -139,22 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. -DEVEL_PREFIX = /opt/uClinux/arm-elf -ROOT_DIR = /opt/uClinux/arm-elf -TARGET_PREFIX = /opt/uClinux/arm-elf +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /opt/uClinux +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 index b383ebda8..387240fdc 100644 --- a/extra/Configs/Config.i386 +++ b/extra/Configs/Config.i386 @@ -139,23 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /usr/$(TARGET_ARCH)-linux-uclibc -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /usr +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-linux-uclibc +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k index dc6e107dc..ef8f4045d 100644 --- a/extra/Configs/Config.m68k +++ b/extra/Configs/Config.m68k @@ -139,27 +139,6 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. -# -# DEVEL_PREFIX is the base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /opt/uClinux/$(TARGET_ARCH)-pic-elf -TARGET_PREFIX = - # # ARCH_CFLAGS if your have something special to add to the CFLAGS # @@ -173,3 +152,32 @@ 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 into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /opt/uClinux +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.m68k.coff b/extra/Configs/Config.m68k.coff index c0bbd3f77..8fb8b83f2 100644 --- a/extra/Configs/Config.m68k.coff +++ b/extra/Configs/Config.m68k.coff @@ -139,27 +139,6 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. -# -# DEVEL_PREFIX is the base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /opt/uClinux -TARGET_PREFIX = - # # ARCH_CFLAGS if your have something special to add to the CFLAGS # @@ -175,3 +154,33 @@ 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 into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. + +PREFIX = /opt/uClinux +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-coff +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.mips b/extra/Configs/Config.mips index 163a9aa4e..7c111a505 100644 --- a/extra/Configs/Config.mips +++ b/extra/Configs/Config.mips @@ -139,23 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /usr/$(TARGET_ARCH)-linux-uclibc -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /usr +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-linux-uclibc +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.mipsel b/extra/Configs/Config.mipsel index 163a9aa4e..7c111a505 100644 --- a/extra/Configs/Config.mipsel +++ b/extra/Configs/Config.mipsel @@ -139,23 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /usr/$(TARGET_ARCH)-linux-uclibc -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /usr +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-linux-uclibc +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc index 659231db9..1bc4978d6 100644 --- a/extra/Configs/Config.powerpc +++ b/extra/Configs/Config.powerpc @@ -35,7 +35,7 @@ TARGET_ARCH=powerpc # If you are running a cross compiler, you may want to set this # to something more interesting... NATIVE_CC = gcc -CROSS = #powerpc-linux- +CROSS = #$(TARGET_ARCH)-linux- CC = $(CROSS)gcc AR = $(CROSS)ar LD = $(CROSS)ld @@ -73,11 +73,11 @@ HAS_FLOATING_POINT = true # Set this to `false' if you don't have/need float functions in libm. # Set it to `true' otherwise, and make sure HAS_FLOATING_POINT is true as well. -HAS_LIBM_FLOAT = false +HAS_LIBM_FLOAT = true # Set this to `false' if you don't have/need double functions in libm. # Set it to `true' otherwise, and make sure HAS_FLOATING_POINT is true as well. -HAS_LIBM_DOUBLE = false +HAS_LIBM_DOUBLE = true # Set this to `false' if you don't have/need long double functions in libm. # Set it to `true' otherwise, and make sure HAS_FLOATING_POINT is true as well. @@ -139,23 +139,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /usr/$(TARGET_ARCH)-linux-uclibc -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /usr +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-linux-uclibc +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh index 9012530c2..6e36ccee8 100644 --- a/extra/Configs/Config.sh +++ b/extra/Configs/Config.sh @@ -160,23 +160,31 @@ INCLUDE_IPV6 = false # If you want to compile the library as PIC code, turn this on. DOPIC = false -# ROOT_DIR is the base directory which will be compiled into the uClibc -# runtime environment. When compiled as a shared library, the shared -# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib -# for shared libraries. +# 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 base directory which will be compiled into the uClibc -# development environment. The uClibc development environment will -# look for the uClibc header files under <DEVEL_PREFIX><ROOT_DIR>/usr/include, -# and for static libs and crt0.o in <DEVEL_PREFIX><ROOT_DIR>/usr/lib. -# Also, 'make install' will install the compiler tools to -# <DEVEL_PREFIX><ROOT_DIR>/bin and <DEVEL_PREFIX><ROOT_DIR>/usr/bin. -# -# TARGET_PREFIX is the directory under which 'make install' will install the -# uClibc runtime environment. This path does not get compiled into anything, -# and is provided simply to make it easier to build standalone target systems. -# Note: This doesn't do anything if there are no shared libs. - -DEVEL_PREFIX = -ROOT_DIR = /opt/uClinux/$(TARGET_ARCH)-pic-elf -TARGET_PREFIX = +# DEVEL_PREFIX is the directory into which the development environment +# will be installed. Include files are installed into +# $(DEVEL_PREFIX)/include, libraries into $(DEVEL_PREFIX)/lib, etc. +# This directory is compiled into the uclibc cross compiler spoofer. +# Generally, DEVEL_PREFIX should be $(PREFIX)/$(TARGET_ARCH)-uclibc-linux. +# DEVEL_PREFIX is used by the Makefile install targets install_gcc, +# install_dev, and install_runtime. +# +# 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, you can change PREFIX after build +# but before 'make install'. +PREFIX = /opt/uClinux +DEVEL_PREFIX = $(PREFIX)/$(TARGET_ARCH)-elf +TARGET_PREFIX = $(TOPDIR)/_install + diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile index 0eb6cbc8a..0e3829a3e 100644 --- a/extra/gcc-uClibc/Makefile +++ b/extra/gcc-uClibc/Makefile @@ -11,7 +11,6 @@ all: gcc-uClibc ld-uClibc gcc-uClibc.h: $(TOPDIR)/Config @echo "/* this file was autogenerated by make */" > gcc-uClibc.h - @echo "#define UCLIBC_ROOT_DIR " \"$(ROOT_DIR)\" >> gcc-uClibc.h @echo "#define UCLIBC_DEVEL_PREFIX " \"$(DEVEL_PREFIX)\" >> gcc-uClibc.h @echo "#define UCLIBC_BUILD_DIR " \"$(UCLIBC_DIR)/\" >> gcc-uClibc.h @echo "#define GCC_BIN " \"$(GCC_BIN)\" >> gcc-uClibc.h @@ -27,30 +26,24 @@ gcc-uClibc: gcc-uClibc.h gcc-uClibc.c ld-uClibc: @echo "#!/bin/sh" > $(TARGET_ARCH)-uclibc-ld @echo "# This file was autogenerated by make" >> $(TARGET_ARCH)-uclibc-ld - @echo "$(LD_BIN) -L- -L$(DEVEL_PREFIX)$(ROOT_DIR)/lib -L$(DEVEL_PREFIX)$(ROOT_DIR)/usr/lib "\ + @echo "$(LD_BIN) -L- -L$(DEVEL_PREFIX)/lib -L$(DEVEL_PREFIX)/usr/lib "\ "-L$(UCLIBC_DIR) \$$@" >> $(TARGET_ARCH)-uclibc-ld chmod a+x $(TARGET_ARCH)-uclibc-ld install: all - install -d $(DEVEL_PREFIX)$(ROOT_DIR)/bin; - install -d $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin; - if [ -x ./$(TARGET_ARCH)-uclibc-gcc ] ; then \ - install -m 755 $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \ - install -m 755 $(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \ - ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/cc; \ - ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/gcc; \ - ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/bin/ld; \ - ln -fs $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-cc; \ - fi; + install -d $(DEVEL_PREFIX)/bin; + install -d $(PREFIX)/bin; + install -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)/bin/ + install -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)/bin/ + ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-cc + ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)/bin/gcc + ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)/bin/cc + ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-ld $(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}` $(DEVEL_PREFIX)$(ROOT_DIR)/bin/$${app}; \ - done; - for app in addr2line ar as cpp gasp nm objcopy \ - objdump ranlib size strings strip; do \ - ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \ - done; - + objdump ranlib size strings strip; do \ + ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)/bin/$${app}; \ + ln -fs `which $(CROSS)$${app}` $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-$${app}; \ + done clean: rm -f gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c index 719cf621c..fc3a58dd7 100644 --- a/extra/gcc-uClibc/gcc-uClibc.c +++ b/extra/gcc-uClibc/gcc-uClibc.c @@ -78,31 +78,31 @@ #include "gcc-uClibc.h" static char *rpath_link[] = { - "-Wl,-rpath-link,"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib", + "-Wl,-rpath-link,"UCLIBC_DEVEL_PREFIX"/lib", "-Wl,-rpath-link,"UCLIBC_BUILD_DIR"/lib" }; static char *rpath[] = { - "-Wl,-rpath,"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib", + "-Wl,-rpath,"UCLIBC_DEVEL_PREFIX"/lib", "-Wl,-rpath,"UCLIBC_BUILD_DIR"/lib" }; static char *uClibc_inc[] = { - "-I"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/include/", + "-I"UCLIBC_DEVEL_PREFIX"/include/", "-I"UCLIBC_BUILD_DIR"/include/" }; static char *crt0_path[] = { - UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/lib/crt0.o", + UCLIBC_DEVEL_PREFIX"/lib/crt0.o", UCLIBC_BUILD_DIR"/lib/crt0.o" }; static char *lib_path[] = { - "-L"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib", + "-L"UCLIBC_DEVEL_PREFIX"/lib", "-L"UCLIBC_BUILD_DIR"/lib" }; -static char *usr_lib_path = "-L"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/lib"; +static char *usr_lib_path = "-L"UCLIBC_DEVEL_PREFIX"/lib"; static char static_linking[] = "-static"; static char nostdinc[] = "-nostdinc"; |