summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-06-09 20:32:17 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-12-19 15:55:30 +0100
commite5adbbda37eee1d603990d9f95a33cc8cea34c7c (patch)
tree2fdcf74d7665ae6f6a02d7f18a1f27f94dadea61
parent6609dad7c8d3ffed051f334f4faa87d9ca2719dd (diff)
downloadOSELAS.Toolchain-e5adbbda37eee1d603990d9f95a33cc8cea34c7c.tar.gz
OSELAS.Toolchain-e5adbbda37eee1d603990d9f95a33cc8cea34c7c.tar.xz
cross-gcc: cleanup
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/cross-gcc-first.make42
-rw-r--r--rules/cross-gcc.make46
2 files changed, 13 insertions, 75 deletions
diff --git a/rules/cross-gcc-first.make b/rules/cross-gcc-first.make
index 3ebb4e8..5fc4a84 100644
--- a/rules/cross-gcc-first.make
+++ b/rules/cross-gcc-first.make
@@ -19,32 +19,16 @@ CROSS_PACKAGES-$(PTXCONF_CROSS_GCC_FIRST) += cross-gcc-first
CROSS_GCC_FIRST_BUILDDIR = $(CROSS_BUILDDIR)/$(CROSS_GCC)-first-build
# ----------------------------------------------------------------------------
-# Get
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/cross-gcc-first.get: $(STATEDIR)/cross-gcc.get
- @$(call targetinfo)
- @$(call touch)
-
-# ----------------------------------------------------------------------------
-# Extract
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/cross-gcc-first.extract: $(STATEDIR)/cross-gcc.extract
- @$(call targetinfo)
- @$(call touch)
-
-# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
-CROSS_GCC_FIRST_PATH := PATH=$(CROSS_PATH)
CROSS_GCC_FIRST_ENV := $(HOST_ENV) MAKEINFO=:
#
# autoconf
#
-CROSS_GCC_FIRST_AUTOCONF = \
+CROSS_GCC_FIRST_CONF_TOOL := autoconf
+CROSS_GCC_FIRST_CONF_OPT = \
$(CROSS_GCC_AUTOCONF_COMMON) \
--prefix=$(CROSS_GCC_FIRST_PREFIX) \
\
@@ -62,23 +46,13 @@ CROSS_GCC_FIRST_AUTOCONF = \
--disable-libatomic \
--with-system-zlib
-$(STATEDIR)/cross-gcc-first.prepare:
+$(STATEDIR)/cross-gcc-first.prepare: $(STATEDIR)/cross-gcc.extract
@$(call targetinfo)
@$(call clean, $(CROSS_GCC_FIRST_BUILDDIR))
mkdir -p $(CROSS_GCC_FIRST_BUILDDIR)
cd $(CROSS_GCC_FIRST_BUILDDIR) && \
$(CROSS_GCC_FIRST_PATH) $(CROSS_GCC_FIRST_ENV) \
- $(CROSS_GCC_DIR)/configure $(CROSS_GCC_FIRST_AUTOCONF)
- @$(call touch)
-
-# ----------------------------------------------------------------------------
-# Compile
-# ----------------------------------------------------------------------------
-
-$(STATEDIR)/cross-gcc-first.compile:
- @$(call targetinfo)
- cd $(CROSS_GCC_FIRST_BUILDDIR) && $(CROSS_GCC_FIRST_PATH) \
- $(MAKE) $(PARALLELMFLAGS)
+ $(CROSS_GCC_DIR)/configure $(CROSS_GCC_FIRST_CONF_OPT)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -98,12 +72,4 @@ $(STATEDIR)/cross-gcc-first.install:
@$(call touch)
-# ----------------------------------------------------------------------------
-# Clean
-# ----------------------------------------------------------------------------
-
-cross-gcc-first_clean:
- rm -rf $(STATEDIR)/cross-gcc-first.*
- rm -rf $(CROSS_GCC_FIRST_BUILDDIR)
-
# vim: syntax=make
diff --git a/rules/cross-gcc.make b/rules/cross-gcc.make
index d8eb201..89a921e 100644
--- a/rules/cross-gcc.make
+++ b/rules/cross-gcc.make
@@ -25,8 +25,9 @@ CROSS_GCC_SUFFIX := tar.bz2
CROSS_GCC_SOURCE := $(SRCDIR)/$(CROSS_GCC).$(CROSS_GCC_SUFFIX)
CROSS_GCC_DIR := $(BUILDDIR_CROSS_DEBUG)/$(CROSS_GCC)
CROSS_GCC_BUILDDIR := $(CROSS_BUILDDIR)/$(CROSS_GCC)-build
+CROSS_GCC_BUILD_OOT := YES
-CROSS_GCC_URL := \
+CROSS_GCC_URL := \
$(call ptx/mirror, GNU, gcc/$(CROSS_GCC)/$(CROSS_GCC).$(CROSS_GCC_SUFFIX)) \
ftp://sourceware.org/pub/gcc/snapshots/$(CROSS_GCC_DL_VERSION)/$(CROSS_GCC).$(CROSS_GCC_SUFFIX) \
ftp://sourceware.org/pub/gcc/releases/$(CROSS_GCC)/$(CROSS_GCC).$(CROSS_GCC_SUFFIX) \
@@ -37,14 +38,6 @@ CROSS_GCC_URL := \
ptx/abs2rel := $(PTXDIST_WORKSPACE)/scripts/ptxd_abs2rel.sh
# ----------------------------------------------------------------------------
-# Get
-# ----------------------------------------------------------------------------
-
-$(CROSS_GCC_SOURCE):
- @$(call targetinfo)
- @$(call get, CROSS_GCC)
-
-# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
@@ -62,8 +55,8 @@ endif
# Prepare
# ----------------------------------------------------------------------------
-CROSS_GCC_PATH := PATH=$(CROSS_PATH)
-CROSS_GCC_ENV := $(HOST_ENV) MAKEINFO=:
+CROSS_GCC_DEVPKG := NO
+CROSS_GCC_CONF_ENV := $(HOST_ENV) MAKEINFO=:
#
# autoconf
@@ -117,7 +110,8 @@ CROSS_GCC_LANG-$(PTXCONF_CROSS_GCC_LANG_CXX) += c++
CROSS_GCC_LANG-$(PTXCONF_CROSS_GCC_LANG_JAVA) += java
CROSS_GCC_LANG-$(PTXCONF_CROSS_GCC_LANG_FORTRAN) += fortran
-CROSS_GCC_AUTOCONF := \
+CROSS_GCC_CONF_TOOL := autoconf
+CROSS_GCC_CONF_OPT := \
$(CROSS_GCC_AUTOCONF_COMMON) \
$(PTX_HOST_CROSS_AUTOCONF_PREFIX) \
\
@@ -132,15 +126,6 @@ CROSS_GCC_AUTOCONF := \
\
$(if $(filter 3.%,$(CROSS_GCC_VERSION)),,--enable-checking=release)
-$(STATEDIR)/cross-gcc.prepare:
- @$(call targetinfo)
- @$(call clean, $(CROSS_GCC_BUILDDIR))
- mkdir -p $(CROSS_GCC_BUILDDIR)
- cd $(CROSS_GCC_BUILDDIR) && \
- $(CROSS_GCC_PATH) $(CROSS_GCC_ENV) \
- $(CROSS_GCC_DIR)/configure $(CROSS_GCC_AUTOCONF)
- @$(call touch)
-
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
@@ -148,8 +133,7 @@ $(STATEDIR)/cross-gcc.prepare:
$(STATEDIR)/cross-gcc.compile:
@$(call targetinfo)
@ln -sf `which $(HOSTCC)` $(PTXCONF_SYSROOT_HOST)/bin/$(GNU_BUILD)-gcc
- cd $(CROSS_GCC_BUILDDIR) && $(CROSS_GCC_PATH) \
- $(MAKE) $(PARALLELMFLAGS)
+ @$(call world/compile, CROSS_GCC)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -158,8 +142,7 @@ $(STATEDIR)/cross-gcc.compile:
$(STATEDIR)/cross-gcc.install:
@$(call targetinfo)
- @cd $(CROSS_GCC_BUILDDIR) && \
- $(CROSS_GCC_PATH) $(MAKE) install
+ @$(call world/install, CROSS_GCC)
@cd "$(PTXCONF_SYSROOT_CROSS)/$(PTX_TOUPLE_TARGET)/lib"; \
dst="$(SYSROOT)/usr/lib"; \
@@ -185,19 +168,8 @@ $(STATEDIR)/cross-gcc.install:
fi || exit 1; \
done
- @find $(PTXCONF_SYSROOT_CROSS) -name "*.la" | while read la_file; do \
- rm -v $${la_file}; \
- done
+ @find $(PTXCONF_SYSROOT_CROSS) -name "*.la" -print0 | xargs -0 rm -v -f
@$(call touch)
-# ----------------------------------------------------------------------------
-# Clean
-# ----------------------------------------------------------------------------
-
-cross-gcc_clean:
- rm -rf $(STATEDIR)/cross-gcc.*
- rm -rf $(CROSS_GCC_DIR)
- rm -rf $(CROSS_GCC_BUILDDIR)
-
# vim: syntax=make