diff options
-rw-r--r-- | rules/cross-gcc-first.make | 5 | ||||
-rw-r--r-- | rules/cross-gcc.in | 4 | ||||
-rw-r--r-- | rules/cross-gdb.in | 2 | ||||
-rw-r--r-- | rules/glibc-crt.make | 114 | ||||
-rw-r--r-- | rules/glibc-first.make | 17 | ||||
-rw-r--r-- | rules/glibc-headers.make | 10 | ||||
-rw-r--r-- | rules/glibc-linuxthreads.make | 2 | ||||
-rw-r--r-- | rules/glibc-ports.make | 2 | ||||
-rw-r--r-- | rules/glibc-second.make | 110 | ||||
-rw-r--r-- | rules/glibc.in | 29 | ||||
-rw-r--r-- | rules/glibc.make | 188 | ||||
-rw-r--r-- | rules/kernel-headers.in | 1 | ||||
-rw-r--r-- | rules/libc-second.make (renamed from rules/libc.make) | 37 | ||||
-rw-r--r-- | rules/libc.in | 15 |
14 files changed, 294 insertions, 242 deletions
diff --git a/rules/cross-gcc-first.make b/rules/cross-gcc-first.make index 815e837..16d3d24 100644 --- a/rules/cross-gcc-first.make +++ b/rules/cross-gcc-first.make @@ -173,9 +173,12 @@ $(STATEDIR)/cross-gcc-first.install: @$(call targetinfo, $@) cd $(CROSS_GCC_FIRST_BUILDDIR) && \ $(CROSS_GCC_FIRST_PATH) $(MAKE) install #install-gcc - ln -sv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \ + ln -sfv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \ -print-libgcc-file-name | \ sed 's/libgcc/&_eh/'` + ln -sfv libgcc.a `$(CROSS_GCC_FIRST_PREFIX)/bin/$(PTXCONF_GNU_TARGET)-gcc \ + -print-libgcc-file-name | \ + sed 's/libgcc/&_s/'` @$(call touch, $@) # ---------------------------------------------------------------------------- diff --git a/rules/cross-gcc.in b/rules/cross-gcc.in index 2372f5b..cc27abc 100644 --- a/rules/cross-gcc.in +++ b/rules/cross-gcc.in @@ -49,12 +49,12 @@ config CROSS_GCC_EXTRA_CONFIG config CROSS_GCC_EXTRA_CONFIG_LIBC string - default "--with-newlib" if LIBC_NEWLIB # --disable-libssp + default "--with-newlib" if LIBC_NEWLIB config CROSS_GCC_SECOND bool - select LIBC + select LIBC_FIRST prompt "gcc (second)" diff --git a/rules/cross-gdb.in b/rules/cross-gdb.in index 4aeda76..c99a2b2 100644 --- a/rules/cross-gdb.in +++ b/rules/cross-gdb.in @@ -1,6 +1,6 @@ config CROSS_GDB bool "cross gdb" - select CROSS_GCC_SECOND + 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/glibc-crt.make b/rules/glibc-crt.make new file mode 100644 index 0000000..91c1384 --- /dev/null +++ b/rules/glibc-crt.make @@ -0,0 +1,114 @@ +# -*-makefile-*- +# $Id$ +# +# Copyright (C) 2006 by Robert Schwebel <r.schwebel@pengutronix.de> +# +# 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_CRT) += glibc-crt + +# +# Paths and names +# +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, $@) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +glibc-crt_extract: $(STATEDIR)/glibc-crt.extract + +$(STATEDIR)/glibc-crt.extract: $(STATEDIR)/glibc.extract + @$(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 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, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +glibc-crt_compile: $(STATEDIR)/glibc-crt.compile + +$(STATEDIR)/glibc-crt.compile: + @$(call targetinfo, $@) + cd $(GLIBC_CRT_DIR) && $(GLIBC_CRT_PATH) \ + $(MAKE) $(PARALLELMFLAGS) csu/subdir_lib + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +glibc-crt_install: $(STATEDIR)/glibc-crt.install + +$(STATEDIR)/glibc-crt.install: + @$(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, $@) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +glibc-crt_targetinstall: $(STATEDIR)/glibc-crt.targetinstall + +$(STATEDIR)/glibc-crt.targetinstall: + @$(call targetinfo, $@) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +glibc-crt_clean: + rm -rf $(STATEDIR)/glibc-crt.* + rm -rf $(GLIBC_CRT_DIR) + +# vim: syntax=make diff --git a/rules/glibc-first.make b/rules/glibc-first.make index 1d5169c..c0c19e8 100644 --- a/rules/glibc-first.make +++ b/rules/glibc-first.make @@ -1,7 +1,8 @@ # -*-makefile-*- # $Id: template 6655 2007-01-02 12:55:21Z rsc $ # -# Copyright (C) 2007 by +# Copyright (C) 2006 by Robert Schwebel +# 2007 by Marc Kleine-Budde # # See CREDITS for details about who has contributed to this project. # @@ -23,7 +24,7 @@ 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)-build +GLIBC_FIRST_BUILDDIR := $(BUILDDIR)/$(GLIBC_FIRST)-first-build # ---------------------------------------------------------------------------- # Get @@ -31,7 +32,7 @@ GLIBC_FIRST_BUILDDIR := $(BUILDDIR)/$(GLIBC_FIRST)-build glibc-first_get: $(STATEDIR)/glibc-first.get -$(STATEDIR)/glibc-first.get: $(glibc-first_get_deps_default) +$(STATEDIR)/glibc-first.get: @$(call targetinfo, $@) @$(call touch, $@) @@ -45,7 +46,7 @@ $(GLIBC_FIRST_SOURCE): glibc-first_extract: $(STATEDIR)/glibc-first.extract -$(STATEDIR)/glibc-first.extract: $(glibc-first_extract_deps_default) +$(STATEDIR)/glibc-first.extract: @$(call targetinfo, $@) @$(call clean, $(GLIBC_FIRST_DIR)) @$(call extract, GLIBC_FIRST, $(BUILDDIR_DEBUG)) @@ -116,7 +117,7 @@ GLIBC_FIRST_AUTOCONF := \ --without-gd \ --enable-shared -$(STATEDIR)/glibc-first.prepare: $(glibc-first_prepare_deps_default) +$(STATEDIR)/glibc-first.prepare: @$(call targetinfo, $@) @$(call clean, $(GLIBC_FIRST_BUILDDIR)) mkdir -p $(GLIBC_FIRST_BUILDDIR) @@ -131,7 +132,7 @@ $(STATEDIR)/glibc-first.prepare: $(glibc-first_prepare_deps_default) glibc-first_compile: $(STATEDIR)/glibc-first.compile -$(STATEDIR)/glibc-first.compile: $(glibc-first_compile_deps_default) +$(STATEDIR)/glibc-first.compile: @$(call targetinfo, $@) cd $(GLIBC_FIRST_BUILDDIR) && $(GLIBC_FIRST_PATH) $(MAKE) $(PARALLELMFLAGS) lib @$(call touch, $@) @@ -142,7 +143,7 @@ $(STATEDIR)/glibc-first.compile: $(glibc-first_compile_deps_default) glibc-first_install: $(STATEDIR)/glibc-first.install -$(STATEDIR)/glibc-first.install: $(glibc-first_install_deps_default) +$(STATEDIR)/glibc-first.install: @$(call targetinfo, $@) cd $(GLIBC_FIRST_BUILDDIR) && \ $(GLIBC_FIRST_PATH) $(MAKE) $(GLIBC_FIRST_MAKEVARS) \ @@ -155,7 +156,7 @@ $(STATEDIR)/glibc-first.install: $(glibc-first_install_deps_default) glibc-first_targetinstall: $(STATEDIR)/glibc-first.targetinstall -$(STATEDIR)/glibc-first.targetinstall: $(glibc-first_targetinstall_deps_default) +$(STATEDIR)/glibc-first.targetinstall: @$(call targetinfo, $@) @$(call touch, $@) diff --git a/rules/glibc-headers.make b/rules/glibc-headers.make index c25034b..47e8438 100644 --- a/rules/glibc-headers.make +++ b/rules/glibc-headers.make @@ -17,7 +17,7 @@ PACKAGES-$(PTXCONF_GLIBC_HEADERS) += glibc-headers # # Paths and names # -GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC)-headers +GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC_FIRST)-headers # ---------------------------------------------------------------------------- # Get @@ -25,7 +25,7 @@ GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC)-headers glibc-headers_get: $(STATEDIR)/glibc-headers.get -$(STATEDIR)/glibc-headers.get: $(STATEDIR)/glibc.get +$(STATEDIR)/glibc-headers.get: $(STATEDIR)/glibc-first.get @$(call targetinfo, $@) @$(call touch, $@) @@ -35,7 +35,7 @@ $(STATEDIR)/glibc-headers.get: $(STATEDIR)/glibc.get glibc-headers_extract: $(STATEDIR)/glibc-headers.extract -$(STATEDIR)/glibc-headers.extract: $(STATEDIR)/glibc.extract +$(STATEDIR)/glibc-headers.extract: $(STATEDIR)/glibc-first.extract @$(call targetinfo, $@) @$(call clean, $(GLIBC_HEADERS_DIR)) mkdir -p $(GLIBC_HEADERS_DIR) @@ -82,7 +82,7 @@ $(STATEDIR)/glibc-headers.prepare: $(STATEDIR)/glibc.extract @$(call targetinfo, $@) cd $(GLIBC_HEADERS_DIR) && \ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \ - $(GLIBC_DIR)/configure $(GLIBC_AUTOCONF) + $(GLIBC_FIRST_DIR)/configure $(GLIBC_HEADERS_AUTOCONF) @$(call touch, $@) # ---------------------------------------------------------------------------- @@ -116,7 +116,7 @@ $(STATEDIR)/glibc-headers.install: mkdir -p $(SYSROOT)/usr/include/gnu touch $(SYSROOT)/usr/include/gnu/stubs.h - cp $(GLIBC_DIR)/include/features.h $(SYSROOT)/usr/include/features.h + cp $(GLIBC_FIRST_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, $@) diff --git a/rules/glibc-linuxthreads.make b/rules/glibc-linuxthreads.make index 63661e9..52053bb 100644 --- a/rules/glibc-linuxthreads.make +++ b/rules/glibc-linuxthreads.make @@ -43,7 +43,7 @@ $(GLIBC_LINUXTHREADS_SOURCE): # ---------------------------------------------------------------------------- ifdef PTXCONF_GLIBC_LINUXTHREADS -$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-linuxthreads.extract +$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc-linuxthreads.extract endif glibc-linuxthreads_extract: $(STATEDIR)/glibc-linuxthreads.extract diff --git a/rules/glibc-ports.make b/rules/glibc-ports.make index 412a334..de1de86 100644 --- a/rules/glibc-ports.make +++ b/rules/glibc-ports.make @@ -43,7 +43,7 @@ $(GLIBC_PORTS_SOURCE): # ---------------------------------------------------------------------------- ifdef PTXCONF_GLIBC_PORTS -$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-ports.extract +$(STATEDIR)/glibc-first.extract: $(STATEDIR)/glibc-ports.extract endif glibc-ports_extract: $(STATEDIR)/glibc-ports.extract diff --git a/rules/glibc-second.make b/rules/glibc-second.make new file mode 100644 index 0000000..ca089fb --- /dev/null +++ b/rules/glibc-second.make @@ -0,0 +1,110 @@ +# -*-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 590b38c..badd2c1 100644 --- a/rules/glibc.in +++ b/rules/glibc.in @@ -1,8 +1,9 @@ # config for glibc -menuconfig GLIBC +menuconfig GLIBC_FIRST bool select CROSS_GCC_FIRST +# select GLIBC_CRT select GLIBC_PORTS if GLIBC_ADDON_NPTL && ( ARCH_ARM || ARCH_MIPS ) select GLIBC_LINUXTHREADS if GLIBC_ADDON_LINUXTHREADS @@ -12,7 +13,7 @@ menuconfig GLIBC prompt "glibc " config GLIBC_VERSION - depends on GLIBC + depends on GLIBC_FIRST string prompt "glibc version" default "2.5" @@ -20,25 +21,30 @@ config GLIBC_VERSION Specify the glibc version here. config GLIBC_SERIES - depends on GLIBC + depends on GLIBC_FIRST string prompt "glibc patch series file" +config GLIBC_FIRST_SERIES + depends on GLIBC_FIRST + string + default "${PTXCONF_GLIBC_SERIES}" + config GLIBC_ENABLE_KERNEL - depends on GLIBC + depends on GLIBC_FIRST string prompt "mininum kernel version" default "2.6.16" config GLIBC_EXTRA_CONFIG - depends on GLIBC + depends on GLIBC_FIRST string prompt "extra configure options" help Add these extra options to glibc's configure script. config GLIBC_HEADERS_FAKE_CROSS - depends on GLIBC + depends on GLIBC_FIRST string prompt "fake cross args" help @@ -46,7 +52,7 @@ config GLIBC_HEADERS_FAKE_CROSS choice prompt "Thread implementation" - depends on GLIBC + depends on GLIBC_FIRST default GLIBC_ADDON_NPTL config GLIBC_ADDON_LINUXTHREADS @@ -64,8 +70,15 @@ choice endchoice config GLIBC_TLS - depends on GLIBC + depends on GLIBC_FIRST 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 deleted file mode 100644 index e94acb7..0000000 --- a/rules/glibc.make +++ /dev/null @@ -1,188 +0,0 @@ -# -*-makefile-*- -# $Id$ -# -# Copyright (C) 2006 by Robert Schwebel -# -# 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_get: $(STATEDIR)/glibc.get - -$(STATEDIR)/glibc.get: - @$(call targetinfo, $@) - @$(call touch, $@) - -$(GLIBC_SOURCE): - @$(call targetinfo, $@) - @$(call get, GLIBC) - -# ---------------------------------------------------------------------------- -# Extract -# ---------------------------------------------------------------------------- - -glibc_extract: $(STATEDIR)/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_prepare: $(STATEDIR)/glibc.prepare - -GLIBC_PATH := PATH=$(CROSS_PATH) -GLIBC_ENV := \ - BUILD_CC=$(HOSTCC) \ - libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes - -# libc_cv_as_noexecstack=no \ -# libc_cv_hashstyle=no - -GLIBC_MAKEVARS := AUTOCONF=no - -# -# libc_cv_forced_unwind=yes -# libc_cv_c_cleanup=yes -# -# is needed for nptl (mkl) -# - -# -# 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_AUTOCONF := \ - $(GLIBC_AUTOCONF_COMMON) \ - \ - --enable-kernel=$(PTXCONF_GLIBC_ENABLE_KERNEL) \ - --enable-debug \ - --without-gd \ - --enable-shared - -# -# --enable-profile -# -# is broken, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28516 -# - -$(STATEDIR)/glibc.prepare: - @$(call targetinfo, $@) - @$(call clean, $(GLIBC_BUILDDIR)) - mkdir -p $(GLIBC_BUILDDIR) - cd $(GLIBC_BUILDDIR) && \ - eval $(GLIBC_ENV) $(GLIBC_PATH) \ - $(GLIBC_DIR)/configure $(GLIBC_AUTOCONF) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Compile -# ---------------------------------------------------------------------------- - -glibc_compile: $(STATEDIR)/glibc.compile - -$(STATEDIR)/glibc.compile: - @$(call targetinfo, $@) - cd $(GLIBC_BUILDDIR) && $(GLIBC_PATH) \ - $(MAKE) $(GLIBC_MAKEVARS) $(PARALLELMFLAGS) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Install -# ---------------------------------------------------------------------------- - -glibc_install: $(STATEDIR)/glibc.install - -$(STATEDIR)/glibc.install: - @$(call targetinfo, $@) - cd $(GLIBC_BUILDDIR) && \ - $(GLIBC_PATH) $(MAKE) $(GLIBC_MAKEVARS) \ - install_root=$(SYSROOT) install - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Target-Install -# ---------------------------------------------------------------------------- - -glibc_targetinstall: $(STATEDIR)/glibc.targetinstall - -$(STATEDIR)/glibc.targetinstall: - @$(call targetinfo, $@) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Clean -# ---------------------------------------------------------------------------- - -glibc_clean: - rm -rf $(STATEDIR)/glibc.* - rm -rf $(GLIBC_DIR) - -# vim: syntax=make diff --git a/rules/kernel-headers.in b/rules/kernel-headers.in index f02c9a2..d83b9ea 100644 --- a/rules/kernel-headers.in +++ b/rules/kernel-headers.in @@ -28,4 +28,3 @@ config KERNEL_HEADERS_CONFIG prompt "kernel config file" help This kernel .config file is being used. - diff --git a/rules/libc.make b/rules/libc-second.make index f1936c7..e52a42c 100644 --- a/rules/libc.make +++ b/rules/libc-second.make @@ -1,8 +1,8 @@ # -*-makefile-*- -# $Id: template 6001 2006-08-12 10:15:00Z mkl $ +# $Id: template 6655 2007-01-02 12:55:21Z rsc $ +# +# Copyright (C) 2006, 2007 by Marc Kleine-Budde <mkl@ppengutronix.de> # -# Copyright (C) 2006, 2007 by Marc Kleine-Budde <mkl@pengutronix.de> -# # See CREDITS for details about who has contributed to this project. # # For further information about the PTXdist project and license conditions @@ -12,15 +12,15 @@ # # We provide this package # -PACKAGES-$(PTXCONF_LIBC) += libc +PACKAGES-$(PTXCONF_LIBC_SECOND) += libc-second # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -libc_get: $(STATEDIR)/libc.get +libc-second_get: $(STATEDIR)/libc-second.get -$(STATEDIR)/libc.get: +$(STATEDIR)/libc-second.get: $(libc-second_get_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -28,9 +28,9 @@ $(STATEDIR)/libc.get: # Extract # ---------------------------------------------------------------------------- -libc_extract: $(STATEDIR)/libc.extract +libc-second_extract: $(STATEDIR)/libc-second.extract -$(STATEDIR)/libc.extract: +$(STATEDIR)/libc-second.extract: $(libc-second_extract_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -38,9 +38,9 @@ $(STATEDIR)/libc.extract: # Prepare # ---------------------------------------------------------------------------- -libc_prepare: $(STATEDIR)/libc.prepare +libc-second_prepare: $(STATEDIR)/libc-second.prepare -$(STATEDIR)/libc.prepare: +$(STATEDIR)/libc-second.prepare: $(libc-second_prepare_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -48,9 +48,9 @@ $(STATEDIR)/libc.prepare: # Compile # ---------------------------------------------------------------------------- -libc_compile: $(STATEDIR)/libc.compile +libc-second_compile: $(STATEDIR)/libc-second.compile -$(STATEDIR)/libc.compile: +$(STATEDIR)/libc-second.compile: $(libc-second_compile_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -58,9 +58,9 @@ $(STATEDIR)/libc.compile: # Install # ---------------------------------------------------------------------------- -libc_install: $(STATEDIR)/libc.install +libc-second_install: $(STATEDIR)/libc-second.install -$(STATEDIR)/libc.install: +$(STATEDIR)/libc-second.install: $(libc-second_install_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -68,9 +68,9 @@ $(STATEDIR)/libc.install: # Target-Install # ---------------------------------------------------------------------------- -libc_targetinstall: $(STATEDIR)/libc.targetinstall +libc-second_targetinstall: $(STATEDIR)/libc-second.targetinstall -$(STATEDIR)/libc.targetinstall: +$(STATEDIR)/libc-second.targetinstall: $(libc-second_targetinstall_deps_default) @$(call targetinfo, $@) @$(call touch, $@) @@ -78,7 +78,8 @@ $(STATEDIR)/libc.targetinstall: # Clean # ---------------------------------------------------------------------------- -libc_clean: - rm -rf $(STATEDIR)/libc.* +libc-second_clean: + rm -rf $(STATEDIR)/libc-second.* + rm -rf $(IMAGEDIR)/libc-second_* # vim: syntax=make diff --git a/rules/libc.in b/rules/libc.in index 2ee5d41..20ad387 100644 --- a/rules/libc.in +++ b/rules/libc.in @@ -1,33 +1,32 @@ -config LIBC_NEEDS_KERNEL_HEADERS - bool - config LIBC_HEADERS bool select GLIBC_HEADERS if LIBC_GLIBC select UCLIBC_HEADERS if LIBC_UCLIBC -config LIBC +config LIBC_FIRST bool - select GLIBC if LIBC_GLIBC + select GLIBC_FIRST if LIBC_GLIBC select UCLIBC if LIBC_UCLIBC select NEWLIB if LIBC_NEWLIB +config LIBC_SECOND + bool + select CROSS_GCC_SECOND + select GLIBC_SECOND if LIBC_GLIBC + choice prompt "C library" default LIBC_GLIBC config LIBC_GLIBC -# select GLIBC bool prompt "glibc" config LIBC_UCLIBC -# select UCLIBC bool prompt "uClibc" config LIBC_NEWLIB -# select NEWLIB bool prompt "newlib" |