diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-04-25 10:40:50 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-04-25 10:40:50 +0000 |
commit | bea03c8fdd1f46eea716d62e00b6a985546c1002 (patch) | |
tree | 31e6a43b1f37400fbe7495ff6bb866b5bd2f8961 /rules | |
parent | 040cee7d3045beaf9e9471ff018e7525144b73f0 (diff) | |
download | OSELAS.Toolchain-bea03c8fdd1f46eea716d62e00b6a985546c1002.tar.gz OSELAS.Toolchain-bea03c8fdd1f46eea716d62e00b6a985546c1002.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/branches/OSELAS.Toolchain-mkl@6226 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'rules')
-rw-r--r-- | rules/avrlib.make | 62 | ||||
-rw-r--r-- | rules/cross-binutils.make | 36 | ||||
-rw-r--r-- | rules/cross-gcc-first.make | 49 | ||||
-rw-r--r-- | rules/cross-gcc-second.make | 50 | ||||
-rw-r--r-- | rules/cross-gcc.in | 47 | ||||
-rw-r--r-- | rules/cross-gdb.in | 1 | ||||
-rw-r--r-- | rules/cross-gdb.make | 34 | ||||
-rw-r--r-- | rules/cross-toolchain.make | 49 | ||||
-rw-r--r-- | rules/glibc-crt.make | 37 | ||||
-rw-r--r-- | rules/glibc-first.make | 120 | ||||
-rw-r--r-- | rules/glibc-headers.make | 44 | ||||
-rw-r--r-- | rules/glibc-linuxthreads.make | 40 | ||||
-rw-r--r-- | rules/glibc-ports.make | 40 | ||||
-rw-r--r-- | rules/glibc-second.make | 110 | ||||
-rw-r--r-- | rules/glibc.in | 40 | ||||
-rw-r--r-- | rules/glibc.make | 158 | ||||
-rw-r--r-- | rules/host-gmp.make | 56 | ||||
-rw-r--r-- | rules/host-mpfr.make | 53 | ||||
-rw-r--r-- | rules/kernel-headers.in | 2 | ||||
-rw-r--r-- | rules/kernel-headers.make | 36 | ||||
-rw-r--r-- | rules/libc-first.make | 24 | ||||
-rw-r--r-- | rules/libc-second.make | 58 | ||||
-rw-r--r-- | rules/libc.in | 22 | ||||
-rw-r--r-- | rules/newlib.make | 50 | ||||
-rw-r--r-- | rules/pre/toolchain.make | 18 |
25 files changed, 482 insertions, 754 deletions
diff --git a/rules/avrlib.make b/rules/avrlib.make index 33d3434..5f07ca0 100644 --- a/rules/avrlib.make +++ b/rules/avrlib.make @@ -17,48 +17,38 @@ PACKAGES-$(PTXCONF_AVR8LIB) += avrlib # # Paths and names # -AVR8LIB_VERSION := $(call remove_quotes,$(PTXCONF_AVR8LIB_VERSION)) -AVR8LIB := avr-libc-$(AVR8LIB_VERSION) -AVR8LIB_SUFFIX := tar.bz2 -AVR8LIB_URL := http://download.savannah.gnu.org/releases/avr-libc/$(AVR8LIB).$(AVR8LIB_SUFFIX) -AVR8LIB_SOURCE := $(SRCDIR)/$(AVR8LIB).$(AVR8LIB_SUFFIX) -AVR8LIB_DIR := $(BUILDDIR)/$(AVR8LIB) +AVR8LIB_VERSION := $(call remove_quotes,$(PTXCONF_AVR8LIB_VERSION)) +AVR8LIB := avr-libc-$(AVR8LIB_VERSION) +AVR8LIB_SUFFIX := tar.bz2 +AVR8LIB_URL := http://download.savannah.gnu.org/releases/avr-libc/$(AVR8LIB).$(AVR8LIB_SUFFIX) +AVR8LIB_SOURCE := $(SRCDIR)/$(AVR8LIB).$(AVR8LIB_SUFFIX) +AVR8LIB_DIR := $(BUILDDIR)/$(AVR8LIB) AVR8LIB_BUILDDIR := $(BUILDDIR)/$(AVR8LIB)-build # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -avrlib_get: $(STATEDIR)/avrlib.get - -$(STATEDIR)/avrlib.get: $(avrlib_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(AVR8LIB_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, AVR8LIB) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -avrlib_extract: $(STATEDIR)/avrlib.extract - -$(STATEDIR)/avrlib.extract: $(avrlib_extract_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/avrlib.extract: + @$(call targetinfo) @$(call clean, $(AVR8LIB_DIR)) @$(call extract, AVR8LIB) @$(call patchin, AVR8LIB) mkdir -p $(AVR8LIB_BUILDDIR) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -avrlib_prepare: $(STATEDIR)/avrlib.prepare - AVR8LIB_PATH := PATH=$(CROSS_PATH) AVR8LIB_ENV := \ $(CROSS_ENV) \ @@ -71,52 +61,46 @@ AVR8LIB_ENV := \ # newer libs (at least 1.4.6) forces --host=avr! # AVR8LIB_AUTOCONF := \ - --prefix=$(PTXCONF_PREFIX) \ + --prefix=$(PTXCONF_SYSROOT_TARGET) \ --build=$(GNU_BUILD) \ --target=$(PTXCONF_GNU_TARGET) \ --host=$(PTXCONF_GNU_TARGET) \ --enable-multilib -$(STATEDIR)/avrlib.prepare: $(avrlib_prepare_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/avrlib.prepare: + @$(call targetinfo) @$(call clean, $(AVR8LIB_BUILDDIR)/config.cache) cd $(AVR8LIB_BUILDDIR) && \ $(AVR8LIB_PATH) $(AVR8LIB_ENV) \ $(AVR8LIB_DIR)/configure $(AVR8LIB_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -avrlib_compile: $(STATEDIR)/avrlib.compile - -$(STATEDIR)/avrlib.compile: $(avrlib_compile_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/avrlib.compile: + @$(call targetinfo) cd $(AVR8LIB_BUILDDIR) && $(AVR8LIB_PATH) $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -avrlib_install: $(STATEDIR)/avrlib.install - -$(STATEDIR)/avrlib.install: $(avrlib_install_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/avrlib.install: + @$(call targetinfo) cd $(AVR8LIB_BUILDDIR) && \ $(AVR8LIB_PATH) $(MAKE) install - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -avrlib_targetinstall: $(STATEDIR)/avrlib.targetinstall - -$(STATEDIR)/avrlib.targetinstall: $(avrlib_targetinstall_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/avrlib.targetinstall: + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/cross-binutils.make b/rules/cross-binutils.make index 06a30f8..2d090e2 100644 --- a/rules/cross-binutils.make +++ b/rules/cross-binutils.make @@ -29,35 +29,25 @@ CROSS_BINUTILS_BUILDDIR := $(CROSS_BUILDDIR)/$(CROSS_BINUTILS)-build # Get # ---------------------------------------------------------------------------- -cross-binutils_get: $(STATEDIR)/cross-binutils.get - -$(STATEDIR)/cross-binutils.get: - @$(call targetinfo, $@) - @$(call touch, $@) - $(CROSS_BINUTILS_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, CROSS_BINUTILS) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -cross-binutils_extract: $(STATEDIR)/cross-binutils.extract - $(STATEDIR)/cross-binutils.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_BINUTILS_DIR)) @$(call extract, CROSS_BINUTILS, $(CROSS_BUILDDIR)) @$(call patchin, CROSS_BINUTILS, $(CROSS_BINUTILS_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -cross-binutils_prepare: $(STATEDIR)/cross-binutils.prepare - CROSS_BINUTILS_PATH := PATH=$(CROSS_PATH) CROSS_BINUTILS_ENV := $(HOST_ENV) @@ -65,9 +55,7 @@ CROSS_BINUTILS_ENV := $(HOST_ENV) # autoconf # CROSS_BINUTILS_AUTOCONF := \ - --prefix=$(PTXCONF_PREFIX) \ - --build=$(GNU_HOST) \ - --host=$(GNU_HOST) \ + --prefix=$(PTXCONF_SYSROOT_CROSS) \ --target=$(PTXCONF_GNU_TARGET) \ --disable-werror \ --disable-nls @@ -78,36 +66,32 @@ CROSS_BINUTILS_AUTOCONF += --with-sysroot=$(SYSROOT) endif $(STATEDIR)/cross-binutils.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) rm -fr $(CROSS_BINUTILS_BUILDDIR) mkdir -p $(CROSS_BINUTILS_BUILDDIR) cd $(CROSS_BINUTILS_BUILDDIR) && \ $(CROSS_BINUTILS_PATH) $(CROSS_BINUTILS_ENV) \ $(CROSS_BINUTILS_DIR)/configure $(CROSS_BINUTILS_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -cross-binutils_compile: $(STATEDIR)/cross-binutils.compile - $(STATEDIR)/cross-binutils.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(CROSS_BINUTILS_BUILDDIR) && $(CROSS_BINUTILS_PATH) \ $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -cross-binutils_install: $(STATEDIR)/cross-binutils.install - $(STATEDIR)/cross-binutils.install: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call install, CROSS_BINUTILS,$(CROSS_BINUTILS_BUILDDIR),h) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/cross-gcc-first.make b/rules/cross-gcc-first.make index 85c0bcc..d39a0bd 100644 --- a/rules/cross-gcc-first.make +++ b/rules/cross-gcc-first.make @@ -29,35 +29,29 @@ CROSS_GCC_FIRST_BUILDDIR := $(CROSS_BUILDDIR)/$(CROSS_GCC_FIRST)-first-build # Get # ---------------------------------------------------------------------------- -cross-gcc-first_get: $(STATEDIR)/cross-gcc-first.get - $(STATEDIR)/cross-gcc-first.get: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) $(CROSS_GCC_FIRST_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, CROSS_GCC_FIRST) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -cross-gcc-first_extract: $(STATEDIR)/cross-gcc-first.extract - $(STATEDIR)/cross-gcc-first.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_GCC_FIRST_DIR)) @$(call extract, CROSS_GCC_FIRST, $(BUILDDIR_CROSS_DEBUG)) @$(call patchin, CROSS_GCC_FIRST, $(CROSS_GCC_FIRST_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -cross-gcc-first_prepare: $(STATEDIR)/cross-gcc-first.prepare - CROSS_GCC_FIRST_PATH := PATH=$(CROSS_PATH) CROSS_GCC_FIRST_ENV := $(HOSTCC_ENV) @@ -66,12 +60,11 @@ CROSS_GCC_FIRST_ENV := $(HOSTCC_ENV) # CROSS_GCC_AUTOCONF_COMMON := \ --target=$(PTXCONF_GNU_TARGET) \ - --with-gmp=$(PTX_PREFIX_HOST) \ - --with-mpfr=$(PTX_PREFIX_HOST) \ + --with-gmp=$(PTXCONF_SYSROOT_HOST) \ + --with-mpfr=$(PTXCONF_SYSROOT_HOST) \ $(PTXCONF_CROSS_GCC_EXTRA_CONFIG) \ $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_LIBC) \ - $(CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT) \ - $(PTXCONF_CROSS_GCC_HEADERS) \ + $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT) \ \ --disable-nls \ --enable-symvers=gnu \ @@ -84,10 +77,6 @@ CROSS_GCC_AUTOCONF_COMMON += \ --disable-multilib \ --with-sysroot=$(SYSROOT) endif -# -# the host hack (or trick) is broken with gcc-4.3+ -# -# --host=$(GNU_HOST) CROSS_GCC_FIRST_AUTOCONF := \ $(CROSS_GCC_AUTOCONF_COMMON) \ @@ -96,8 +85,8 @@ CROSS_GCC_FIRST_AUTOCONF := \ --disable-shared \ --enable-languages=c \ \ - --with-ld=$(PTXCONF_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-ld \ - --with-as=$(PTXCONF_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-as \ + --with-ld=$(PTXCONF_SYSROOT_CROSS)/bin/$(PTXCONF_GNU_TARGET)-ld \ + --with-as=$(PTXCONF_SYSROOT_CROSS)/bin/$(PTXCONF_GNU_TARGET)-as \ --disable-checking \ \ --disable-libmudflap \ @@ -105,22 +94,20 @@ CROSS_GCC_FIRST_AUTOCONF := \ --disable-libgomp $(STATEDIR)/cross-gcc-first.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_GCC_FIRST_BUILDDIR)) mkdir -p $(CROSS_GCC_FIRST_BUILDDIR) cd $(CROSS_GCC_FIRST_BUILDDIR) && \ - eval $(CROSS_GCC_FIRST_PATH) $(CROSS_GCC_FIRST_ENV) \ + $(CROSS_GCC_FIRST_PATH) $(CROSS_GCC_FIRST_ENV) \ $(CROSS_GCC_FIRST_DIR)/configure $(CROSS_GCC_FIRST_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -cross-gcc-first_compile: $(STATEDIR)/cross-gcc-first.compile - $(STATEDIR)/cross-gcc-first.compile: - @$(call targetinfo, $@) + @$(call targetinfo) # export $(CROSS_GCC_FIRST_PATH); \ # cd $(CROSS_GCC_FIRST_BUILDDIR) && \ @@ -162,16 +149,14 @@ $(STATEDIR)/cross-gcc-first.compile: cd $(CROSS_GCC_FIRST_BUILDDIR) && $(CROSS_GCC_FIRST_PATH) \ $(MAKE) $(PARALLELMFLAGS) #all-gcc - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -cross-gcc-first_install: $(STATEDIR)/cross-gcc-first.install - $(STATEDIR)/cross-gcc-first.install: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(CROSS_GCC_FIRST_BUILDDIR) && \ $(CROSS_GCC_FIRST_PATH) $(MAKE) install #install-gcc ln -sfv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \ @@ -185,7 +170,7 @@ ifdef PTXCONF_CROSS_GCC_43 # FIXME - fix copy target cp $(CROSS_GCC_FIRST_BUILDDIR)/gcc/include-fixed/limits.h $(SYSROOT)/usr/include/limits.h endif - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/cross-gcc-second.make b/rules/cross-gcc-second.make index 6b0f2fd..a73f75d 100644 --- a/rules/cross-gcc-second.make +++ b/rules/cross-gcc-second.make @@ -23,28 +23,22 @@ CROSS_GCC_SECOND_BUILDDIR = $(CROSS_BUILDDIR)/$(CROSS_GCC_FIRST)-second-build # Get # ---------------------------------------------------------------------------- -cross-gcc-second_get: $(STATEDIR)/cross-gcc-second.get - $(STATEDIR)/cross-gcc-second.get: $(STATEDIR)/cross-gcc-first.get - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -cross-gcc-second_extract: $(STATEDIR)/cross-gcc-second.extract - $(STATEDIR)/cross-gcc-second.extract: $(STATEDIR)/cross-gcc-first.extract - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -cross-gcc-second_prepare: $(STATEDIR)/cross-gcc-second.prepare - CROSS_GCC_SECOND_PATH := PATH=$(CROSS_PATH) CROSS_GCC_SECOND_ENV := $(HOSTCC_ENV) @@ -53,57 +47,47 @@ CROSS_GCC_SECOND_ENV := $(HOSTCC_ENV) # CROSS_GCC_SECOND_AUTOCONF = \ $(CROSS_GCC_AUTOCONF_COMMON) \ - --prefix=$(PTXCONF_PREFIX) \ + --prefix=$(PTXCONF_SYSROOT_CROSS) \ \ --enable-languages=$(PTXCONF_CROSS_GCC_LANG) \ --enable-threads=$(PTXCONF_CROSS_GCC_THREADS) \ --enable-c99 \ --enable-long-long \ - --enable-libstdcxx-debug - -ifdef PTXCONF_CROSS_GCC_SHARED -CROSS_GCC_SECOND_AUTOCONF += \ - --enable-shared -else -CROSS_GCC_SECOND_AUTOCONF += \ - --disable-shared -endif + --enable-libstdcxx-debug \ + \ + $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_SHARED) $(STATEDIR)/cross-gcc-second.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_GCC_SECOND_BUILDDIR)) mkdir -p $(CROSS_GCC_SECOND_BUILDDIR) - cd $(CROSS_GCC_SECOND_BUILDDIR) && eval \ + cd $(CROSS_GCC_SECOND_BUILDDIR) && \ $(CROSS_GCC_SECOND_PATH) $(CROSS_GCC_SECOND_ENV) \ $(CROSS_GCC_FIRST_DIR)/configure $(CROSS_GCC_SECOND_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -cross-gcc-second_compile: $(STATEDIR)/cross-gcc-second.compile - $(STATEDIR)/cross-gcc-second.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(CROSS_GCC_SECOND_BUILDDIR) && $(CROSS_GCC_SECOND_PATH) \ $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -cross-gcc-second_install: $(STATEDIR)/cross-gcc-second.install - $(STATEDIR)/cross-gcc-second.install: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(CROSS_GCC_SECOND_BUILDDIR) && \ $(CROSS_GCC_SECOND_PATH) $(MAKE) install - @find $(PTXCONF_PREFIX) -name "*.la" | while read la_file; do \ - rm -v $${la_file}; \ + @find $(PTXCONF_SYSROOT_CROSS) -name "*.la" | while read la_file; do \ + rm -v $${la_file}; \ done - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/cross-gcc.in b/rules/cross-gcc.in index 4e93fe9..3d561bd 100644 --- a/rules/cross-gcc.in +++ b/rules/cross-gcc.in @@ -56,33 +56,33 @@ config CROSS_GCC_EXTRA_CONFIG_LIBC string default "--with-newlib" if LIBC_NEWLIB -config CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT - string - default "--enable-__cxa_atexit" if CROSS_GCC_ENABLE_CXA_ATEXIT - default "--disable-__cxa_atexit" if !CROSS_GCC_ENABLE_CXA_ATEXIT - +### +### ___cxa_atexit +### config CROSS_GCC_ENABLE_CXA_ATEXIT bool +config CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT + string + default "--enable-__cxa_atexit" if CROSS_GCC_ENABLE_CXA_ATEXIT + default "--disable-__cxa_atexit" if !CROSS_GCC_ENABLE_CXA_ATEXIT -config CROSS_GCC_SECOND - bool - select CROSS_GCC_FIRST - select LIBC_FIRST - select CROSS_BINUTILS - prompt "gcc (second)" - -#config CROSS_GCC_WITHOUT_HEADERS -# bool -# -#config CROSS_GCC_HEADERS -# string -# default "--without-headers" if CROSS_GCC_WITHOUT_HEADERS +### +### shared +### config CROSS_GCC_SHARED bool +config CROSS_GCC_EXTRA_CONFIG_SHARED + string + default "--enable-shared" if CROSS_GCC_SHARED + default "--disable-shared" if !CROSS_GCC_SHARED + +### +### threads +### config CROSS_GCC_THREADS_SINGLE bool @@ -97,3 +97,14 @@ config CROSS_GCC_THREADS default "posix" if CROSS_GCC_THREADS_POSIX default "single" if CROSS_GCC_THREADS_SINGLE default "win32" if CROSS_GCC_THREADS_WIN32 + +### +### second +### +config CROSS_GCC_SECOND + bool + select CROSS_BINUTILS + select CROSS_GCC_FIRST + select LIBC_FIRST + prompt "gcc (second)" + diff --git a/rules/cross-gdb.in b/rules/cross-gdb.in index dc8580a..84ef046 100644 --- a/rules/cross-gdb.in +++ b/rules/cross-gdb.in @@ -1,6 +1,5 @@ menuconfig CROSS_GDB bool "cross gdb " - select LIBC_SECOND help GDB is a source-level debugger, capable of breaking programs at any specific line, displaying variable values, and diff --git a/rules/cross-gdb.make b/rules/cross-gdb.make index 5ac5de2..ff0989b 100644 --- a/rules/cross-gdb.make +++ b/rules/cross-gdb.make @@ -28,35 +28,25 @@ CROSS_GDB_DIR := $(CROSS_BUILDDIR)/$(CROSS_GDB) # Get # ---------------------------------------------------------------------------- -cross-gdb_get: $(STATEDIR)/cross-gdb.get - -$(STATEDIR)/cross-gdb.get: - @$(call targetinfo, $@) - @$(call touch, $@) - $(CROSS_GDB_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, CROSS_GDB) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -cross-gdb_extract: $(STATEDIR)/cross-gdb.extract - $(STATEDIR)/cross-gdb.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_GDB_DIR)) @$(call extract, CROSS_GDB, $(CROSS_BUILDDIR)) @$(call patchin, CROSS_GDB, $(CROSS_GDB_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -cross-gdb_prepare: $(STATEDIR)/cross-gdb.prepare - CROSS_GDB_PATH := PATH=$(CROSS_PATH) CROSS_GDB_ENV := $(HOST_ENV) @@ -64,7 +54,7 @@ CROSS_GDB_ENV := $(HOST_ENV) # autoconf # CROSS_GDB_AUTOCONF := \ - --prefix=$(PTXCONF_PREFIX) \ + --prefix=$(PTXCONF_SYSROOT_CROSS) \ --build=$(GNU_HOST) \ --host=$(GNU_HOST) \ --target=$(PTXCONF_GNU_TARGET) \ @@ -78,34 +68,30 @@ CROSS_GDB_AUTOCONF += --with-sysroot=$(SYSROOT) endif $(STATEDIR)/cross-gdb.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(CROSS_GDB_DIR)/config.cache) cd $(CROSS_GDB_DIR) && \ $(CROSS_GDB_PATH) $(CROSS_GDB_ENV) \ ./configure $(CROSS_GDB_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -cross-gdb_compile: $(STATEDIR)/cross-gdb.compile - $(STATEDIR)/cross-gdb.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(CROSS_GDB_DIR) && $(CROSS_GDB_PATH) $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -cross-gdb_install: $(STATEDIR)/cross-gdb.install - $(STATEDIR)/cross-gdb.install: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call install, CROSS_GDB,,h) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/cross-toolchain.make b/rules/cross-toolchain.make index a1d095d..f4c10f0 100644 --- a/rules/cross-toolchain.make +++ b/rules/cross-toolchain.make @@ -14,69 +14,52 @@ # CROSS_PACKAGES-$(PTXCONF_CROSS_TOOLCHAIN) += cross-toolchain -# -# Paths and names -# -CROSS_TOOLCHAIN := toolchain-$(CROSS_TOOLCHAIN_VERSION) -CROSS_TOOLCHAIN_DIR := $(CROSS_BUILDDIR)/$(CROSS_TOOLCHAIN) - # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -cross-toolchain_get: $(STATEDIR)/cross-toolchain.get - $(STATEDIR)/cross-toolchain.get: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -cross-toolchain_extract: $(STATEDIR)/cross-toolchain.extract - $(STATEDIR)/cross-toolchain.extract: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -cross-toolchain_prepare: $(STATEDIR)/cross-toolchain.prepare - $(STATEDIR)/cross-toolchain.prepare: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -cross-toolchain_compile: $(STATEDIR)/cross-toolchain.compile - $(STATEDIR)/cross-toolchain.compile: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -cross-toolchain_install: $(STATEDIR)/cross-toolchain.install - $(STATEDIR)/cross-toolchain.install: - @$(call targetinfo, $@) - -rm -f ${PTXCONF_PREFIX}/bin/ptxconfig - #mkdir -p ${PTXCONF_PREFIX}/bin - cat ${PTXDIST_WORKSPACE}/ptxconfig > ${PTXCONF_PREFIX}/bin/ptxconfig + @$(call targetinfo) + -rm -f ${PTXCONF_SYSROOT_CROSS}/bin/ptxconfig + cp ${PTXDIST_WORKSPACE}/ptxconfig ${PTXCONF_SYSROOT_CROSS}/bin/ptxconfig - # carsten.schlote: Setup a symbolic link to installation dir - # FIXME: find better place for this link? +# carsten.schlote: Setup a symbolic link to installation dir +# FIXME: find better place for this link? -rm state/toolchain-install-dir - ln -s ${PTXCONF_PREFIX} state/toolchain-install-dir - $(call touch, $@) + ln -s ${PTXCONF_SYSROOT_CROSS} $(STATEDIR)/toolchain-install-dir + @$(call touch) # ---------------------------------------------------------------------------- # Clean @@ -84,7 +67,5 @@ $(STATEDIR)/cross-toolchain.install: cross-toolchain_clean: rm -rf $(STATEDIR)/cross-toolchain.* - rm -rf $(IMAGEDIR)/cross-toolchain_* - rm -rf $(CROSS_TOOLCHAIN_DIR) # vim: syntax=make diff --git a/rules/glibc-crt.make b/rules/glibc-crt.make index 91c1384..f01e695 100644 --- a/rules/glibc-crt.make +++ b/rules/glibc-crt.make @@ -23,85 +23,72 @@ GLIBC_CRT_DIR = $(BUILDDIR)/$(GLIBC)-crt # Get # ---------------------------------------------------------------------------- -glibc-crt_get: $(STATEDIR)/glibc-crt.get - $(STATEDIR)/glibc-crt.get: $(STATEDIR)/glibc.get - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -glibc-crt_extract: $(STATEDIR)/glibc-crt.extract - $(STATEDIR)/glibc-crt.extract: $(STATEDIR)/glibc.extract - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -glibc-crt_prepare: $(STATEDIR)/glibc-crt.prepare - GLIBC_CRT_PATH := PATH=$(CROSS_PATH) GLIBC_CRT_ENV := \ BUILD_CC=$(HOSTCC) \ libc_cv_forced_unwind=yes \ libc_cv_c_cleanup=yes - # # autoconf # GLIBC_CRT_AUTOCONF = $(GLIBC_AUTOCONF) $(STATEDIR)/glibc-crt.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(GLIBC_CRT_DIR)) mkdir -p $(GLIBC_CRT_DIR) cd $(GLIBC_CRT_DIR) && eval \ $(GLIBC_CRT_PATH) $(GLIBC_CRT_ENV) \ $(GLIBC_DIR)/configure $(GLIBC_CRT_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -glibc-crt_compile: $(STATEDIR)/glibc-crt.compile - $(STATEDIR)/glibc-crt.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(GLIBC_CRT_DIR) && $(GLIBC_CRT_PATH) \ $(MAKE) $(PARALLELMFLAGS) csu/subdir_lib - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -glibc-crt_install: $(STATEDIR)/glibc-crt.install - $(STATEDIR)/glibc-crt.install: - @$(call targetinfo, $@) + @$(call targetinfo) mkdir -p $(SYSROOT)/usr/lib for file in {S,}crt1.o crt{i,n}.o; do \ $(INSTALL) -m 644 $(GLIBC_CRT_DIR)/csu/$$file \ $(SYSROOT)/usr/lib/$$file || exit 1; \ done - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -glibc-crt_targetinstall: $(STATEDIR)/glibc-crt.targetinstall - $(STATEDIR)/glibc-crt.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/glibc-first.make b/rules/glibc-first.make index b6036e6..d14b2b8 100644 --- a/rules/glibc-first.make +++ b/rules/glibc-first.make @@ -2,7 +2,7 @@ # $Id: template 6655 2007-01-02 12:55:21Z rsc $ # # Copyright (C) 2006 by Robert Schwebel -# 2007 by Marc Kleine-Budde +# 2007, 2008 by Marc Kleine-Budde # # See CREDITS for details about who has contributed to this project. # @@ -18,149 +18,77 @@ PACKAGES-$(PTXCONF_GLIBC_FIRST) += glibc-first # # Paths and names # -GLIBC_FIRST_VERSION := $(call remove_quotes,$(PTXCONF_GLIBC_VERSION)) -GLIBC_FIRST := glibc-$(GLIBC_FIRST_VERSION) -GLIBC_FIRST_SUFFIX := tar.bz2 -GLIBC_FIRST_URL := $(PTXCONF_SETUP_GNUMIRROR)/glibc/$(GLIBC_FIRST).$(GLIBC_FIRST_SUFFIX) -GLIBC_FIRST_SOURCE := $(SRCDIR)/$(GLIBC_FIRST).$(GLIBC_FIRST_SUFFIX) -GLIBC_FIRST_DIR := $(BUILDDIR_DEBUG)/$(GLIBC_FIRST) -GLIBC_FIRST_BUILDDIR := $(BUILDDIR)/$(GLIBC_FIRST)-first-build +GLIBC_FIRST_BUILDDIR = $(BUILDDIR)/$(GLIBC)-first-build # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -glibc-first_get: $(STATEDIR)/glibc-first.get - -$(STATEDIR)/glibc-first.get: - @$(call targetinfo, $@) - @$(call touch, $@) - -$(GLIBC_FIRST_SOURCE): - @$(call targetinfo, $@) - @$(call get, GLIBC_FIRST) +$(STATEDIR)/glibc-first.get: $(STATEDIR)/glibc.get + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -glibc-first_extract: $(STATEDIR)/glibc-first.extract - -$(STATEDIR)/glibc-first.extract: - @$(call targetinfo, $@) - @$(call clean, $(GLIBC_FIRST_DIR)) - @$(call extract, GLIBC_FIRST, $(BUILDDIR_DEBUG)) - @$(call patchin, GLIBC_FIRST, $(GLIBC_FIRST_DIR)) - -ifdef PTXCONF_GLIBC_LINUXTHREADS - cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads $(GLIBC_FIRST_DIR) - cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads_db $(GLIBC_FIRST_DIR) -endif -ifdef PTXCONF_GLIBC_PORTS - mkdir -p $(GLIBC_FIRST_DIR)/ports - cp -r $(GLIBC_PORTS_DIR)/* $(GLIBC_FIRST_DIR)/ports -endif - - @$(call touch, $@) +$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc.extract + @$(call targetinfo) + @$(call clean, $(GLIBC_FIRST_BUILDDIR)) + mkdir -p $(GLIBC_FIRST_BUILDDIR) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -glibc-first_prepare: $(STATEDIR)/glibc-first.prepare - GLIBC_FIRST_PATH := PATH=$(CROSS_PATH) GLIBC_FIRST_ENV := \ CC=$(CROSS_CC) \ BUILD_CC=$(HOSTCC) \ ac_cv_path_GREP=grep \ libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes + libc_cv_c_cleanup=yes \ + ac_cv_sizeof_long_double=8 + GLIBC_FIRST_MAKEVARS := AUTOCONF=no -# -# autoconf -# -ifdef PTXCONF_GLIBC_PORTS -GLIBC_ADDONS += ports -endif -ifdef PTXCONF_GLIBC_ADDON_NPTL -GLIBC_ADDONS += nptl -endif -ifdef PTXCONF_GLIBC_ADDON_LINUXTHREADS -GLIBC_ADDONS += linuxthreads -endif - -GLIBC_AUTOCONF_COMMON := \ - --prefix=/usr \ - --build=$(GNU_BUILD) \ - --host=$(PTXCONF_GNU_TARGET) \ - --target=$(PTXCONF_GNU_TARGET) \ - \ - --with-headers=$(SYSROOT)/usr/include \ - --enable-add-ons=$(subst $(space),$(comma),$(GLIBC_ADDONS)) \ - \ - --without-cvs \ - --disable-sanity-checks \ - --without-selinux \ - $(PTXCONF_GLIBC_EXTRA_CONFIG) - -ifdef PTXCONF_GLIBC_TLS -GLIBC_AUTOCONF_COMMON += --with-tls --with-__thread -else -GLIBC_AUTOCONF_COMMON += --without-tls --without-__thread -endif - -GLIBC_FIRST_AUTOCONF := \ - $(GLIBC_AUTOCONF_COMMON) \ - \ - --enable-kernel=$(PTXCONF_GLIBC_ENABLE_KERNEL) \ - --enable-debug \ - --without-gd \ - --enable-shared +GLIBC_FIRST_AUTOCONF = $(GLIBC_AUTOCONF) $(STATEDIR)/glibc-first.prepare: - @$(call targetinfo, $@) - @$(call clean, $(GLIBC_FIRST_BUILDDIR)) - mkdir -p $(GLIBC_FIRST_BUILDDIR) + @$(call targetinfo) cd $(GLIBC_FIRST_BUILDDIR) && \ - eval $(GLIBC_FIRST_ENV) $(GLIBC_FIRST_PATH) \ - $(GLIBC_FIRST_DIR)/configure $(GLIBC_FIRST_AUTOCONF) - @$(call touch, $@) + $(GLIBC_FIRST_ENV) $(GLIBC_FIRST_PATH) \ + $(GLIBC_DIR)/configure $(GLIBC_FIRST_AUTOCONF) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -glibc-first_compile: $(STATEDIR)/glibc-first.compile - $(STATEDIR)/glibc-first.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(GLIBC_FIRST_BUILDDIR) && $(GLIBC_FIRST_PATH) $(MAKE) $(PARALLELMFLAGS) lib - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -glibc-first_install: $(STATEDIR)/glibc-first.install - $(STATEDIR)/glibc-first.install: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(GLIBC_FIRST_BUILDDIR) && \ $(GLIBC_FIRST_PATH) $(MAKE) $(GLIBC_FIRST_MAKEVARS) \ install_root=$(SYSROOT) install-lib-all install-headers - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -glibc-first_targetinstall: $(STATEDIR)/glibc-first.targetinstall - $(STATEDIR)/glibc-first.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/glibc-headers.make b/rules/glibc-headers.make index e97db68..0bdb1ab 100644 --- a/rules/glibc-headers.make +++ b/rules/glibc-headers.make @@ -17,29 +17,23 @@ PACKAGES-$(PTXCONF_GLIBC_HEADERS) += glibc-headers # # Paths and names # -GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC_FIRST)-headers +GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC)-headers-build # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -glibc-headers_get: $(STATEDIR)/glibc-headers.get - -$(STATEDIR)/glibc-headers.get: $(STATEDIR)/glibc-first.get - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/glibc-headers.get: $(STATEDIR)/glibc.get + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -glibc-headers_extract: $(STATEDIR)/glibc-headers.extract - -$(STATEDIR)/glibc-headers.extract: $(STATEDIR)/glibc-first.extract - @$(call targetinfo, $@) - @$(call clean, $(GLIBC_HEADERS_DIR)) - mkdir -p $(GLIBC_HEADERS_DIR) - @$(call touch, $@) +$(STATEDIR)/glibc-headers.extract: $(STATEDIR)/glibc.extract + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare @@ -56,7 +50,7 @@ GLIBC_HEADERS_PATH := PATH=$(CROSS_PATH) # GLIBC_HEADERS_ENV := \ $(HOST_ENV) \ - CC="$${CC} -DBOOTSTRAP_GCC $(call remove_quotes, $(PTXCONF_GLIBC_HEADERS_FAKE_CROSS))" \ + CC="$${CC} -DBOOTSTRAP_GCC $(PTXCONF_GLIBC_HEADERS_FAKE_CROSS)" \ \ libc_cv_initfini_array=yes \ \ @@ -81,11 +75,13 @@ GLIBC_HEADERS_AUTOCONF = \ --enable-hacker-mode $(STATEDIR)/glibc-headers.prepare: $(STATEDIR)/glibc.extract - @$(call targetinfo, $@) + @$(call targetinfo) + @$(call clean, $(GLIBC_HEADERS_DIR)) + mkdir -p $(GLIBC_HEADERS_DIR) cd $(GLIBC_HEADERS_DIR) && \ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \ - $(GLIBC_FIRST_DIR)/configure $(GLIBC_HEADERS_AUTOCONF) - @$(call touch, $@) + $(GLIBC_DIR)/configure $(GLIBC_HEADERS_AUTOCONF) + @$(call touch) # ---------------------------------------------------------------------------- # Compile @@ -94,14 +90,14 @@ $(STATEDIR)/glibc-headers.prepare: $(STATEDIR)/glibc.extract glibc-headers_compile: $(STATEDIR)/glibc-headers.compile $(STATEDIR)/glibc-headers.compile: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(GLIBC_HEADERS_DIR) && \ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \ $(MAKE) sysdeps/gnu/errlist.c mkdir -p $(GLIBC_HEADERS_DIR)/stdio-common touch $(GLIBC_HEADERS_DIR)/stdio-common/errlist-compat.c - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install @@ -110,7 +106,7 @@ $(STATEDIR)/glibc-headers.compile: glibc-headers_install: $(STATEDIR)/glibc-headers.install $(STATEDIR)/glibc-headers.install: - @$(call targetinfo, $@) + @$(call targetinfo) cd $(GLIBC_HEADERS_DIR) && \ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \ $(MAKE) compiling=yes install_root=$(SYSROOT) install-headers @@ -118,9 +114,9 @@ $(STATEDIR)/glibc-headers.install: mkdir -p $(SYSROOT)/usr/include/gnu touch $(SYSROOT)/usr/include/gnu/stubs.h - cp $(GLIBC_FIRST_DIR)/include/features.h $(SYSROOT)/usr/include/features.h + cp $(GLIBC_DIR)/include/features.h $(SYSROOT)/usr/include/features.h cp $(GLIBC_HEADERS_DIR)/bits/stdio_lim.h $(SYSROOT)/usr/include/bits/stdio_lim.h - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install @@ -129,8 +125,8 @@ $(STATEDIR)/glibc-headers.install: glibc-headers_targetinstall: $(STATEDIR)/glibc-headers.targetinstall $(STATEDIR)/glibc-headers.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/glibc-linuxthreads.make b/rules/glibc-linuxthreads.make index 52053bb..e481ce6 100644 --- a/rules/glibc-linuxthreads.make +++ b/rules/glibc-linuxthreads.make @@ -28,14 +28,8 @@ GLIBC_LINUXTHREADS_DIR := $(BUILDDIR)/$(GLIBC_LINUXTHREADS) # Get # ---------------------------------------------------------------------------- -glibc-linuxthreads_get: $(STATEDIR)/glibc-linuxthreads.get - -$(STATEDIR)/glibc-linuxthreads.get: - @$(call targetinfo, $@) - @$(call touch, $@) - $(GLIBC_LINUXTHREADS_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, GLIBC_LINUXTHREADS) # ---------------------------------------------------------------------------- @@ -43,57 +37,47 @@ $(GLIBC_LINUXTHREADS_SOURCE): # ---------------------------------------------------------------------------- ifdef PTXCONF_GLIBC_LINUXTHREADS -$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc-linuxthreads.extract +$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-linuxthreads.extract endif -glibc-linuxthreads_extract: $(STATEDIR)/glibc-linuxthreads.extract - $(STATEDIR)/glibc-linuxthreads.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(GLIBC_LINUXTHREADS_DIR)) @$(call extract, GLIBC_LINUXTHREADS, $(GLIBC_LINUXTHREADS_DIR)) @$(call patchin, GLIBC_LINUXTHREADS, $(GLIBC_LINUXTHREADS_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -glibc-linuxthreads_prepare: $(STATEDIR)/glibc-linuxthreads.prepare - $(STATEDIR)/glibc-linuxthreads.prepare: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -glibc-linuxthreads_compile: $(STATEDIR)/glibc-linuxthreads.compile - $(STATEDIR)/glibc-linuxthreads.compile: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -glibc-linuxthreads_install: $(STATEDIR)/glibc-linuxthreads.install - $(STATEDIR)/glibc-linuxthreads.install: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -glibc-linuxthreads_targetinstall: $(STATEDIR)/glibc-linuxthreads.targetinstall - $(STATEDIR)/glibc-linuxthreads.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/glibc-ports.make b/rules/glibc-ports.make index de1de86..27a6507 100644 --- a/rules/glibc-ports.make +++ b/rules/glibc-ports.make @@ -28,14 +28,8 @@ GLIBC_PORTS_DIR := $(BUILDDIR)/$(GLIBC_PORTS) # Get # ---------------------------------------------------------------------------- -glibc-ports_get: $(STATEDIR)/glibc-ports.get - -$(STATEDIR)/glibc-ports.get: - @$(call targetinfo, $@) - @$(call touch, $@) - $(GLIBC_PORTS_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, GLIBC_PORTS) # ---------------------------------------------------------------------------- @@ -43,57 +37,47 @@ $(GLIBC_PORTS_SOURCE): # ---------------------------------------------------------------------------- ifdef PTXCONF_GLIBC_PORTS -$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc-ports.extract +$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-ports.extract endif -glibc-ports_extract: $(STATEDIR)/glibc-ports.extract - $(STATEDIR)/glibc-ports.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(GLIBC_PORTS_DIR)) @$(call extract, GLIBC_PORTS, $(BUILDDIR)) @$(call patchin, GLIBC_PORTS, $(GLIBC_PORTS_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -glibc-ports_prepare: $(STATEDIR)/glibc-ports.prepare - $(STATEDIR)/glibc-ports.prepare: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -glibc-ports_compile: $(STATEDIR)/glibc-ports.compile - $(STATEDIR)/glibc-ports.compile: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -glibc-ports_install: $(STATEDIR)/glibc-ports.install - $(STATEDIR)/glibc-ports.install: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -glibc-ports_targetinstall: $(STATEDIR)/glibc-ports.targetinstall - $(STATEDIR)/glibc-ports.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/glibc-second.make b/rules/glibc-second.make deleted file mode 100644 index ca089fb..0000000 --- a/rules/glibc-second.make +++ /dev/null @@ -1,110 +0,0 @@ -# -*-makefile-*- -# $Id: template 6655 2007-01-02 12:55:21Z rsc $ -# -# Copyright (C) 2006 by Robert Schwebel -# 2007 by Marc Kleine-Budde -# -# See CREDITS for details about who has contributed to this project. -# -# For further information about the PTXdist project and license conditions -# see the README file. -# - -# -# We provide this package -# -PACKAGES-$(PTXCONF_GLIBC_SECOND) += glibc-second - -# -# Paths and names -# -GLIBC_SECOND_BUILDDIR = $(BUILDDIR_DEBUG)/$(GLIBC_FIRST)-second-build - -# ---------------------------------------------------------------------------- -# Get -# ---------------------------------------------------------------------------- - -glibc-second_get: $(STATEDIR)/glibc-second.get - -$(STATEDIR)/glibc-second.get: $(STATEDIR)/glibc-first.get - @$(call targetinfo, $@) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Extract -# ---------------------------------------------------------------------------- - -glibc-second_extract: $(STATEDIR)/glibc-second.extract - -$(STATEDIR)/glibc-second.extract: $(STATEDIR)/glibc.extract - @$(call targetinfo, $@) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Prepare -# ---------------------------------------------------------------------------- - -glibc-second_prepare: $(STATEDIR)/glibc-second.prepare - -GLIBC_SECOND_PATH := PATH=$(CROSS_PATH) -GLIBC_SECOND_ENV := BUILD_CC=$(HOSTCC) -GLIBC_SECOND_MAKEVARS := AUTOCONF=no - -# -# autoconf -# -GLIBC_SECOND_AUTOCONF = $(GLIBC_FIRST_AUTOCONF) - -$(STATEDIR)/glibc-second.prepare: - @$(call targetinfo, $@) - @$(call clean, $(GLIBC_SECOND_BUILDDIR)) - mkdir -p $(GLIBC_SECOND_BUILDDIR) - cd $(GLIBC_SECOND_BUILDDIR) && \ - eval $(GLIBC_SECOND_ENV) $(GLIBC_SECOND_PATH) \ - $(GLIBC_FIRST_DIR)/configure $(GLIBC_SECOND_AUTOCONF) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Compile -# ---------------------------------------------------------------------------- - -glibc-second_compile: $(STATEDIR)/glibc-second.compile - -$(STATEDIR)/glibc-second.compile: - @$(call targetinfo, $@) - cd $(GLIBC_SECOND_BUILDDIR) && $(GLIBC_SECOND_PATH) $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Install -# ---------------------------------------------------------------------------- - -glibc-second_install: $(STATEDIR)/glibc-second.install - -$(STATEDIR)/glibc-second.install: - @$(call targetinfo, $@) - cd $(GLIBC_SECOND_BUILDDIR) && \ - $(GLIBC_SECOND_PATH) $(MAKE) $(GLIBC_SECOND_MAKEVARS) \ - install_root=$(SYSROOT) install - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Target-Install -# ---------------------------------------------------------------------------- - -glibc-second_targetinstall: $(STATEDIR)/glibc-second.targetinstall - -$(STATEDIR)/glibc-second.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Clean -# ---------------------------------------------------------------------------- - -glibc-second_clean: - rm -rf $(STATEDIR)/glibc-second.* - rm -rf $(IMAGEDIR)/glibc-second_* - rm -rf $(GLIBC_SECOND_DIR) - -# vim: syntax=make diff --git a/rules/glibc.in b/rules/glibc.in index 5485802..37d152d 100644 --- a/rules/glibc.in +++ b/rules/glibc.in @@ -1,19 +1,27 @@ # config for glibc -menuconfig GLIBC_FIRST +config GLIBC_CRT + bool + select CROSS_GCC_FIRST + +config GLIBC_FIRST bool select CROSS_GCC_FIRST + +menuconfig GLIBC + bool # select GLIBC_CRT - select GLIBC_PORTS if GLIBC_ADDON_NPTL && ( ARCH_ARM || ARCH_MIPS ) - select GLIBC_LINUXTHREADS if GLIBC_ADDON_LINUXTHREADS + select GLIBC_PORTS if GLIBC_ADDON_NPTL && ( ARCH_ARM || ARCH_MIPS ) + select GLIBC_LINUXTHREADS if GLIBC_ADDON_LINUXTHREADS + select CROSS_GCC_SECOND select CROSS_GCC_SHARED select CROSS_GCC_THREADS_POSIX select CROSS_GCC_ENABLE_CXA_ATEXIT prompt "glibc " config GLIBC_VERSION - depends on GLIBC_FIRST + depends on GLIBC string prompt "glibc version" default "2.5" @@ -21,38 +29,39 @@ config GLIBC_VERSION Specify the glibc version here. config GLIBC_SERIES - depends on GLIBC_FIRST + depends on GLIBC string prompt "glibc patch series file" -config GLIBC_FIRST_SERIES - depends on GLIBC_FIRST +config GLIBC_SERIES + depends on GLIBC string default "${PTXCONF_GLIBC_SERIES}" config GLIBC_ENABLE_KERNEL - depends on GLIBC_FIRST + depends on GLIBC string prompt "mininum kernel version" default "2.6.16" config GLIBC_EXTRA_CONFIG - depends on GLIBC_FIRST + depends on GLIBC string prompt "extra configure options" help Add these extra options to glibc's configure script. config GLIBC_HEADERS_FAKE_CROSS - depends on GLIBC_FIRST + depends on GLIBC string prompt "fake cross args" + default "-D__ARM_EABI__" if ARCH_ARM help Add these args to fake a crosscompiler during glibc-header extraction stage. choice prompt "Thread implementation" - depends on GLIBC_FIRST + depends on GLIBC default GLIBC_ADDON_NPTL config GLIBC_ADDON_LINUXTHREADS @@ -70,15 +79,8 @@ choice endchoice config GLIBC_TLS - depends on GLIBC_FIRST + depends on GLIBC bool prompt "enable TLS" help Activate Thread Local Storage. - -config GLIBC_CRT - bool - select CROSS_GCC_FIRST - -config GLIBC_SECOND - bool diff --git a/rules/glibc.make b/rules/glibc.make new file mode 100644 index 0000000..b85fd0a --- /dev/null +++ b/rules/glibc.make @@ -0,0 +1,158 @@ +# -*-makefile-*- +# $Id: template 6655 2007-01-02 12:55:21Z rsc $ +# +# Copyright (C) 2006 by Robert Schwebel +# 2007, 2008 by Marc Kleine-Budde +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_GLIBC) += glibc + +# +# Paths and names +# +GLIBC_VERSION := $(call remove_quotes,$(PTXCONF_GLIBC_VERSION)) +GLIBC := glibc-$(GLIBC_VERSION) +GLIBC_SUFFIX := tar.bz2 +GLIBC_URL := $(PTXCONF_SETUP_GNUMIRROR)/glibc/$(GLIBC).$(GLIBC_SUFFIX) +GLIBC_SOURCE := $(SRCDIR)/$(GLIBC).$(GLIBC_SUFFIX) +GLIBC_DIR := $(BUILDDIR_DEBUG)/$(GLIBC) +GLIBC_BUILDDIR := $(BUILDDIR)/$(GLIBC)-build + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(GLIBC_SOURCE): + @$(call targetinfo) + @$(call get, GLIBC) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/glibc.extract: + @$(call targetinfo) + @$(call clean, $(GLIBC_DIR)) + @$(call extract, GLIBC, $(BUILDDIR_DEBUG)) + @$(call patchin, GLIBC, $(GLIBC_DIR)) + +ifdef PTXCONF_GLIBC_LINUXTHREADS + cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads $(GLIBC_DIR) + cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads_db $(GLIBC_DIR) +endif +ifdef PTXCONF_GLIBC_PORTS + mkdir -p $(GLIBC_DIR)/ports + cp -r $(GLIBC_PORTS_DIR)/* $(GLIBC_DIR)/ports +endif + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +GLIBC_PATH := PATH=$(CROSS_PATH) +GLIBC_ENV := \ + CC=$(CROSS_CC) \ + BUILD_CC=$(HOSTCC) \ + ac_cv_path_GREP=grep \ + libc_cv_forced_unwind=yes \ + libc_cv_c_cleanup=yes \ + ac_cv_sizeof_long_double=8 +GLIBC_MAKEVARS := AUTOCONF=no + +# +# autoconf +# +ifdef PTXCONF_GLIBC_PORTS +GLIBC_ADDONS += ports +endif +ifdef PTXCONF_GLIBC_ADDON_NPTL +GLIBC_ADDONS += nptl +endif +ifdef PTXCONF_GLIBC_ADDON_LINUXTHREADS +GLIBC_ADDONS += linuxthreads +endif + +GLIBC_AUTOCONF_COMMON := \ + --prefix=/usr \ + --host=$(PTXCONF_GNU_TARGET) \ + --target=$(PTXCONF_GNU_TARGET) \ + \ + --with-headers=$(SYSROOT)/usr/include \ + --enable-add-ons=$(subst $(space),$(comma),$(GLIBC_ADDONS)) \ + \ + --without-cvs \ + --disable-sanity-checks \ + --without-selinux \ + \ + $(PTXCONF_GLIBC_EXTRA_CONFIG) + +ifdef PTXCONF_GLIBC_TLS +GLIBC_AUTOCONF_COMMON += --with-tls --with-__thread +else +GLIBC_AUTOCONF_COMMON += --without-tls --without-__thread +endif + +GLIBC_AUTOCONF := \ + $(GLIBC_AUTOCONF_COMMON) \ + \ + --enable-kernel=$(PTXCONF_GLIBC_ENABLE_KERNEL) \ + --enable-debug \ + --without-gd \ + --enable-shared + +$(STATEDIR)/glibc.prepare: + @$(call targetinfo) + @$(call clean, $(GLIBC_BUILDDIR)) + mkdir -p $(GLIBC_BUILDDIR) + cd $(GLIBC_BUILDDIR) && \ + $(GLIBC_ENV) $(GLIBC_PATH) \ + $(GLIBC_DIR)/configure $(GLIBC_AUTOCONF) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/glibc.compile: + @$(call targetinfo) + cd $(GLIBC_BUILDDIR) && $(GLIBC_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/glibc.install: + @$(call targetinfo) + cd $(GLIBC_BUILDDIR) && \ + $(GLIBC_PATH) $(MAKE) $(GLIBC_MAKEVARS) \ + install_root=$(SYSROOT) install + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/glibc.targetinstall: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +glibc_clean: + rm -rf $(STATEDIR)/glibc.* + rm -rf $(IMAGEDIR)/glibc_* + rm -rf $(GLIBC_DIR) + +# vim: syntax=make diff --git a/rules/host-gmp.make b/rules/host-gmp.make index 12cd5a3..50f7257 100644 --- a/rules/host-gmp.make +++ b/rules/host-gmp.make @@ -28,30 +28,11 @@ HOST_GMP_DIR := $(HOST_BUILDDIR)/$(HOST_GMP) # Get # ---------------------------------------------------------------------------- -host-gmp_get: $(STATEDIR)/host-gmp.get - -$(STATEDIR)/host-gmp.get: $(host-gmp_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(HOST_GMP_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, HOST_GMP) # ---------------------------------------------------------------------------- -# Extract -# ---------------------------------------------------------------------------- - -host-gmp_extract: $(STATEDIR)/host-gmp.extract - -$(STATEDIR)/host-gmp.extract: $(host-gmp_extract_deps_default) - @$(call targetinfo, $@) - @$(call clean, $(HOST_GMP_DIR)) - @$(call extract, HOST_GMP, $(HOST_BUILDDIR)) - @$(call patchin, HOST_GMP, $(HOST_GMP_DIR)) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- @@ -63,37 +44,10 @@ HOST_GMP_ENV := $(HOST_ENV) # # autoconf # -HOST_GMP_AUTOCONF := $(HOST_AUTOCONF) - -$(STATEDIR)/host-gmp.prepare: $(host-gmp_prepare_deps_default) - @$(call targetinfo, $@) - @$(call clean, $(HOST_GMP_DIR)/config.cache) - cd $(HOST_GMP_DIR) && \ - $(HOST_GMP_PATH) $(HOST_GMP_ENV) \ - ./configure $(HOST_GMP_AUTOCONF) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Compile -# ---------------------------------------------------------------------------- - -host-gmp_compile: $(STATEDIR)/host-gmp.compile - -$(STATEDIR)/host-gmp.compile: $(host-gmp_compile_deps_default) - @$(call targetinfo, $@) - cd $(HOST_GMP_DIR) && $(HOST_GMP_PATH) $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Install -# ---------------------------------------------------------------------------- - -host-gmp_install: $(STATEDIR)/host-gmp.install - -$(STATEDIR)/host-gmp.install: $(host-gmp_install_deps_default) - @$(call targetinfo, $@) - @$(call install, HOST_GMP,,h) - @$(call touch, $@) +HOST_GMP_AUTOCONF := \ + $(HOST_AUTOCONF) \ + --disable-shared \ + --enable-static # ---------------------------------------------------------------------------- # Clean diff --git a/rules/host-mpfr.make b/rules/host-mpfr.make index 36b3199..24aa8f8 100644 --- a/rules/host-mpfr.make +++ b/rules/host-mpfr.make @@ -20,36 +20,28 @@ HOST_PACKAGES-$(PTXCONF_HOST_MPFR) += host-mpfr HOST_MPFR_VERSION := 2.3.1 HOST_MPFR := mpfr-$(HOST_MPFR_VERSION) HOST_MPFR_SUFFIX := tar.bz2 -HOST_MPFR_URL := http://www.mpfr.org/mpfr-current/$(HOST_MPFR).$(HOST_MPFR_SUFFIX) +HOST_MPFR_URL := http://www.mpfr.org/mpfr-current/$(HOST_MPFR).$(HOST_MPFR_SUFFIX) HOST_MPFR_SOURCE := $(SRCDIR)/$(HOST_MPFR).$(HOST_MPFR_SUFFIX) -HOST_MPFR_DIR := $(HOST_BUILDDIR)/$(HOST_MPFR) +HOST_MPFR_DIR := $(HOST_BUILDDIR)/$(HOST_MPFR) # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -host-mpfr_get: $(STATEDIR)/host-mpfr.get - -$(STATEDIR)/host-mpfr.get: $(host-mpfr_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(HOST_MPFR_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, HOST_MPFR) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -host-mpfr_extract: $(STATEDIR)/host-mpfr.extract - $(STATEDIR)/host-mpfr.extract: $(host-mpfr_extract_deps_default) - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(HOST_MPFR_DIR)) @$(call extract, HOST_MPFR, $(HOST_BUILDDIR)) @$(call patchin, HOST_MPFR, $(HOST_MPFR_DIR)) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare @@ -63,37 +55,10 @@ HOST_MPFR_ENV := $(HOST_ENV) # # autoconf # -HOST_MPFR_AUTOCONF := $(HOST_AUTOCONF) - -$(STATEDIR)/host-mpfr.prepare: $(host-mpfr_prepare_deps_default) - @$(call targetinfo, $@) - @$(call clean, $(HOST_MPFR_DIR)/config.cache) - cd $(HOST_MPFR_DIR) && \ - $(HOST_MPFR_PATH) $(HOST_MPFR_ENV) \ - ./configure $(HOST_MPFR_AUTOCONF) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Compile -# ---------------------------------------------------------------------------- - -host-mpfr_compile: $(STATEDIR)/host-mpfr.compile - -$(STATEDIR)/host-mpfr.compile: $(host-mpfr_compile_deps_default) - @$(call targetinfo, $@) - cd $(HOST_MPFR_DIR) && $(HOST_MPFR_PATH) $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Install -# ---------------------------------------------------------------------------- - -host-mpfr_install: $(STATEDIR)/host-mpfr.install - -$(STATEDIR)/host-mpfr.install: $(host-mpfr_install_deps_default) - @$(call targetinfo, $@) - @$(call install, HOST_MPFR,,h) - @$(call touch, $@) +HOST_MPFR_AUTOCONF := \ + $(HOST_AUTOCONF) \ + --disable-shared \ + --enable-static # ---------------------------------------------------------------------------- # Clean diff --git a/rules/kernel-headers.in b/rules/kernel-headers.in index 7869c87..8aba25b 100644 --- a/rules/kernel-headers.in +++ b/rules/kernel-headers.in @@ -12,7 +12,7 @@ config KERNEL_HEADERS_VERSION help Specify the kernel version here. -config KERNEL_HEADERS_SANIZIZED +config KERNEL_HEADERS_SANITIZED depends on KERNEL_HEADERS bool prompt "use sanitized headers" diff --git a/rules/kernel-headers.make b/rules/kernel-headers.make index 95e6ea8..73647be 100644 --- a/rules/kernel-headers.make +++ b/rules/kernel-headers.make @@ -28,44 +28,34 @@ KERNEL_HEADERS_DIR := $(BUILDDIR)/$(KERNEL_HEADERS) # Get # ---------------------------------------------------------------------------- -kernel-headers_get: $(STATEDIR)/kernel-headers.get - -$(STATEDIR)/kernel-headers.get: - @$(call targetinfo, $@) - @$(call touch, $@) - $(KERNEL_HEADERS_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, KERNEL_HEADERS) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -kernel-headers_extract: $(STATEDIR)/kernel-headers.extract - $(STATEDIR)/kernel-headers.extract: - @$(call targetinfo, $@) + @$(call targetinfo) @$(call clean, $(KERNEL_HEADERS_DIR)) @$(call extract, KERNEL_HEADERS) @$(call patchin, KERNEL_HEADERS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -kernel-headers_prepare: $(STATEDIR)/kernel-headers.prepare - KERNEL_HEADERS_PATH := PATH=$(HOST_PATH) KERNEL_HEADERS_ENV := $(HOST_ENV) KERNEL_HEADERS_MAKEVARS := ARCH=$(PTXCONF_ARCH) $(PARALLELMFLAGS) $(STATEDIR)/kernel-headers.prepare: - @$(call targetinfo, $@) + @$(call targetinfo) cp $(PTXDIST_WORKSPACE)/$(PTXCONF_KERNEL_HEADERS_CONFIG) \ $(KERNEL_HEADERS_DIR)/.config - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile @@ -74,7 +64,7 @@ $(STATEDIR)/kernel-headers.prepare: kernel-headers_compile: $(STATEDIR)/kernel-headers.compile $(STATEDIR)/kernel-headers.compile: - @$(call targetinfo, $@) + @$(call targetinfo) yes "" | $(MAKE) -C $(KERNEL_HEADERS_DIR) $(KERNEL_HEADERS_MAKEVARS) oldconfig # # this is used to generate asm and asm/mach links for arm @@ -85,16 +75,14 @@ $(STATEDIR)/kernel-headers.compile: # if the include/asm link is missing, it's really fatal # test -L $(KERNEL_HEADERS_DIR)/include/asm || exit 1 - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -kernel-headers_install: $(STATEDIR)/kernel-headers.install - $(STATEDIR)/kernel-headers.install: - @$(call targetinfo, $@) + @$(call targetinfo) ifdef PTXCONF_KERNEL_HEADERS_SANIZIZED $(MAKE) -C $(KERNEL_HEADERS_DIR) $(KERNEL_HEADERS_MAKEVARS) headers_install INSTALL_HDR_PATH=$(SYSROOT)/usr @@ -105,17 +93,15 @@ else cp -r $(KERNEL_HEADERS_DIR)/include/asm-generic $(SYSROOT)/usr/include/asm-generic endif - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -kernel-headers_targetinstall: $(STATEDIR)/kernel-headers.targetinstall - $(STATEDIR)/kernel-headers.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/libc-first.make b/rules/libc-first.make index 0ef16f3..ddcb7af 100644 --- a/rules/libc-first.make +++ b/rules/libc-first.make @@ -21,8 +21,8 @@ PACKAGES-$(PTXCONF_LIBC_FIRST) += libc-first libc-first_get: $(STATEDIR)/libc-first.get $(STATEDIR)/libc-first.get: $(libc-first_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract @@ -31,8 +31,8 @@ $(STATEDIR)/libc-first.get: $(libc-first_get_deps_default) libc-first_extract: $(STATEDIR)/libc-first.extract $(STATEDIR)/libc-first.extract: $(libc-first_extract_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare @@ -41,8 +41,8 @@ $(STATEDIR)/libc-first.extract: $(libc-first_extract_deps_default) libc-first_prepare: $(STATEDIR)/libc-first.prepare $(STATEDIR)/libc-first.prepare: $(libc-first_prepare_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Compile @@ -51,8 +51,8 @@ $(STATEDIR)/libc-first.prepare: $(libc-first_prepare_deps_default) libc-first_compile: $(STATEDIR)/libc-first.compile $(STATEDIR)/libc-first.compile: $(libc-first_compile_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Install @@ -61,8 +61,8 @@ $(STATEDIR)/libc-first.compile: $(libc-first_compile_deps_default) libc-first_install: $(STATEDIR)/libc-first.install $(STATEDIR)/libc-first.install: $(libc-first_install_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install @@ -71,8 +71,8 @@ $(STATEDIR)/libc-first.install: $(libc-first_install_deps_default) libc-first_targetinstall: $(STATEDIR)/libc-first.targetinstall $(STATEDIR)/libc-first.targetinstall: $(libc-first_targetinstall_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/libc-second.make b/rules/libc-second.make index e52a42c..2381eaf 100644 --- a/rules/libc-second.make +++ b/rules/libc-second.make @@ -1,7 +1,7 @@ # -*-makefile-*- # $Id: template 6655 2007-01-02 12:55:21Z rsc $ # -# Copyright (C) 2006, 2007 by Marc Kleine-Budde <mkl@ppengutronix.de> +# Copyright (C) 2006-2008 by Marc Kleine-Budde <mkl@ppengutronix.de> # # See CREDITS for details about who has contributed to this project. # @@ -12,74 +12,62 @@ # # We provide this package # -PACKAGES-$(PTXCONF_LIBC_SECOND) += libc-second +PACKAGES-$(PTXCONF_LIBC) += libc # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -libc-second_get: $(STATEDIR)/libc-second.get - -$(STATEDIR)/libc-second.get: $(libc-second_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.get: $(libc_get_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -libc-second_extract: $(STATEDIR)/libc-second.extract - -$(STATEDIR)/libc-second.extract: $(libc-second_extract_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.extract: $(libc_extract_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -libc-second_prepare: $(STATEDIR)/libc-second.prepare - -$(STATEDIR)/libc-second.prepare: $(libc-second_prepare_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.prepare: $(libc_prepare_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -libc-second_compile: $(STATEDIR)/libc-second.compile - -$(STATEDIR)/libc-second.compile: $(libc-second_compile_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.compile: $(libc_compile_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -libc-second_install: $(STATEDIR)/libc-second.install - -$(STATEDIR)/libc-second.install: $(libc-second_install_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.install: $(libc_install_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -libc-second_targetinstall: $(STATEDIR)/libc-second.targetinstall - -$(STATEDIR)/libc-second.targetinstall: $(libc-second_targetinstall_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/libc.targetinstall: $(libc_targetinstall_deps_default) + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean # ---------------------------------------------------------------------------- -libc-second_clean: - rm -rf $(STATEDIR)/libc-second.* - rm -rf $(IMAGEDIR)/libc-second_* +libc_clean: + rm -rf $(STATEDIR)/libc.* + rm -rf $(IMAGEDIR)/libc_* # vim: syntax=make diff --git a/rules/libc.in b/rules/libc.in index b2cd971..4f17674 100644 --- a/rules/libc.in +++ b/rules/libc.in @@ -1,22 +1,22 @@ config LIBC_HEADERS bool - select GLIBC_HEADERS if LIBC_GLIBC - select UCLIBC_HEADERS if LIBC_UCLIBC - select W32API_HEADERS if LIBC_MINGW - select MINGW_RUNTIME_HEADERS if LIBC_MINGW + select GLIBC_HEADERS if LIBC_GLIBC + select UCLIBC_HEADERS if LIBC_UCLIBC + select W32API_HEADERS if LIBC_MINGW + select MINGW_RUNTIME_HEADERS if LIBC_MINGW config LIBC_FIRST bool - select GLIBC_FIRST if LIBC_GLIBC - select UCLIBC if LIBC_UCLIBC - select NEWLIB if LIBC_NEWLIB - select W32API if LIBC_MINGW - select MINGW_RUNTIME if LIBC_MINGW + select GLIBC_FIRST if LIBC_GLIBC -config LIBC_SECOND +config LIBC bool select CROSS_GCC_SECOND - select GLIBC_SECOND if LIBC_GLIBC + select GLIBC if LIBC_GLIBC + select UCLIBC if LIBC_UCLIBC + select NEWLIB if LIBC_NEWLIB + select W32API if LIBC_MINGW + select MINGW_RUNTIME if LIBC_MINGW choice prompt "C library" diff --git a/rules/newlib.make b/rules/newlib.make index 326787b..67569f2 100644 --- a/rules/newlib.make +++ b/rules/newlib.make @@ -29,37 +29,27 @@ NEWLIB_BUILDDIR := $(BUILDDIR)/$(NEWLIB)-build # Get # ---------------------------------------------------------------------------- -newlib_get: $(STATEDIR)/newlib.get - -$(STATEDIR)/newlib.get: $(newlib_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(NEWLIB_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, NEWLIB) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- -newlib_extract: $(STATEDIR)/newlib.extract - -$(STATEDIR)/newlib.extract: $(newlib_extract_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/newlib.extract: + @$(call targetinfo) @$(call clean, $(NEWLIB_DIR)) @$(call clean, $(NEWLIB_BUILDDIR)) @$(call extract, NEWLIB, $(BUILDDIR_DEBUG)) @$(call patchin, NEWLIB, $(NEWLIB_DIR)) mkdir -p $(NEWLIB_BUILDDIR) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -newlib_prepare: $(STATEDIR)/newlib.prepare - NEWLIB_PATH := PATH=$(CROSS_PATH) NEWLIB_ENV := CC_FOR_BUILD=$(HOSTCC) @@ -67,7 +57,7 @@ NEWLIB_ENV := CC_FOR_BUILD=$(HOSTCC) # autoconf # NEWLIB_AUTOCONF := \ - --prefix=$(PTXCONF_PREFIX) \ + --prefix=$(PTXCONF_SYSROOT_TARGET) \ --build=$(GNU_BUILD) \ --target=$(PTXCONF_GNU_TARGET) \ --disable-shared \ @@ -75,46 +65,40 @@ NEWLIB_AUTOCONF := \ --with-newlib -$(STATEDIR)/newlib.prepare: $(newlib_prepare_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/newlib.prepare: + @$(call targetinfo) cd $(NEWLIB_BUILDDIR) && eval \ $(NEWLIB_ENV) $(NEWLIB_PATH) \ $(NEWLIB_DIR)/configure $(NEWLIB_AUTOCONF) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- -newlib_compile: $(STATEDIR)/newlib.compile - -$(STATEDIR)/newlib.compile: $(newlib_compile_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/newlib.compile: + @$(call targetinfo) cd $(NEWLIB_BUILDDIR) && $(NEWLIB_PATH) \ $(MAKE) $(PARALLELMFLAGS) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- -newlib_install: $(STATEDIR)/newlib.install - -$(STATEDIR)/newlib.install: $(newlib_install_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/newlib.install: + @$(call targetinfo) cd $(NEWLIB_BUILDDIR) && \ $(NEWLIB_PATH) $(MAKE) install - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -newlib_targetinstall: $(STATEDIR)/newlib.targetinstall - -$(STATEDIR)/newlib.targetinstall: $(newlib_targetinstall_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) +$(STATEDIR)/newlib.targetinstall: + @$(call targetinfo) + @$(call touch) # ---------------------------------------------------------------------------- # Clean diff --git a/rules/pre/toolchain.make b/rules/pre/toolchain.make index 8ba4222..cc85c29 100644 --- a/rules/pre/toolchain.make +++ b/rules/pre/toolchain.make @@ -1,13 +1,21 @@ # -*-makefile-*- -SYSROOT := $(call remove_quotes,$(PTXCONF_PREFIX)/sysroot-$(PTXCONF_GNU_TARGET)) +PTXCONF_GLIBC_HEADERS_FAKE_CROSS := $(call remove_quotes, $(PTXCONF_GLIBC_HEADERS_FAKE_CROSS)) +PTXCONF_GLIBC_EXTRA_CONFIG := $(call remove_quotes, $(PTXCONF_GLIBC_EXTRA_CONFIG)) -CROSS_GCC_FIRST_PREFIX := $(call remove_quotes,$(PTXCONF_PREFIX)/gcc-first) -CROSS_PATH := $(call remove_quotes,$(PTXCONF_PREFIX)/bin:$(PTXCONF_PREFIX)/usr/bin:$(CROSS_GCC_FIRST_PREFIX)/bin):$$PATH +PTXCONF_CROSS_GCC_EXTRA_CONFIG := $(call remove_quotes, $(PTXCONF_CROSS_GCC_EXTRA_CONFIG)) +PTXCONF_CROSS_GCC_EXTRA_CONFIG_LIBC := $(call remove_quotes, $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_LIBC)) +PTXCONF_CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT := $(call remove_quotes, $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT)) +PTXCONF_CROSS_GCC_EXTRA_CONFIG_SHARED := $(call remove_quotes, $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_SHARED)) +PTXCONF_ARCH := $(call remove_quotes, $(PTXCONF_ARCH)) + + +CROSS_GCC_FIRST_PREFIX := $(PTXCONF_SYSROOT_CROSS)/gcc-first +CROSS_PATH := $(PTXCONF_SYSROOT_CROSS)/bin:$(PTXCONF_SYSROOT_CROSS)/sbin:$(CROSS_GCC_FIRST_PREFIX)/bin:$$PATH ifdef PTXCONF_TOOLCHAIN_DEBUG -BUILDDIR_DEBUG := $(PTXCONF_PREFIX)/src/target -BUILDDIR_CROSS_DEBUG := $(PTXCONF_PREFIX)/src/cross +BUILDDIR_DEBUG := $(PTXCONF_SYSROOT_CROSS)/src/target +BUILDDIR_CROSS_DEBUG := $(PTXCONF_SYSROOT_CROSS)/src/cross else BUILDDIR_DEBUG := $(BUILDDIR) BUILDDIR_CROSS_DEBUG := $(CROSS_BUILDDIR) |