steps.mk
author Martin Guy <martinwguy@gmail.com>
Sun Mar 31 04:07:38 2013 +0000 (2013-03-31)
changeset 3203 74fd467be5aa
parent 3123 6a5946fbc728
permissions -rw-r--r--
arch/avr32: Fix download of header files

This patch fixes the download of the avr32 headers in crosstool-ng by
fetching them directly from Atmel's web site instead of the now-broken URL
given by the original author of the avr32-header-fetching modification,
who fetched them from a copy on his own, now-defunct server.

It also adds the necessary logic to extract from a zip file, as that is
how the headers are packaged.

To configure it for avr32 after launching ct-ng menuconfig in an empty
directory:

Paths and misc options ->
Shell to use as CONFIG_SHELL = sh
Target options ->
Target Architecture = avr32
Toolchain options ->
Tuple's alias = avr32
Binary utilities ->
binutils version = 2.18a
C compiler
gcc version = 4.2.2
C-library
newlib version = 1.17.0
Enable IOs on long long = yes
Enable IOs on floats and doubles = yes
Disable the syscalls supplied with newlib = yes

CONFIG_SHELL is necessary to get round the "fragment: command not
found" bug when binutils-2.18 is configured using bash.

Prepared against crosstool-ng mercurial trunk on 31 March 2012.

Signed-off-by: Martin Guy <martinwguy@gmail.com>
[yann.morin.1998@free.fr: update bundles sample accordingly]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CAL4-wQrg_NQ7jm-NCADqeyQr9twyhtx42OUGNThP6gWeqZc=kw@mail.gmail.com>
Patchwork-Id: 232612
yann@136
     1
# Makefile for each steps
yann@2908
     2
# Copyright 2006 Yann E. MORIN <yann.morin.1998@free.fr>
yann@136
     3
yann@1001
     4
# ----------------------------------------------------------
yann@1001
     5
# This is the steps help entry
yann@1001
     6
yann@1001
     7
help-build::
yann@1001
     8
	@echo  '  list-steps         - List all build steps'
yann@1001
     9
yann@1015
    10
help-env::
yann@1876
    11
	@echo  '  STOP=step          - Stop the build just after this step (list with list-steps)'
yann@1876
    12
	@echo  '  RESTART=step       - Restart the build just before this step (list with list-steps)'
yann@1015
    13
yann@1001
    14
# ----------------------------------------------------------
yann@1001
    15
# The steps list
yann@1001
    16
yann@2936
    17
# The _for_build steps are noop for native and cross,
yann@2936
    18
# but are actual steps for canadian and cross-native.
yann@1149
    19
# Please keep the last line with a '\' and keep the following empy line:
yann@1001
    20
# it helps when diffing and merging.
Yann@3115
    21
CT_STEPS := libc_check_config        \
Yann@3115
    22
            companion_libs_for_build \
Yann@3115
    23
            binutils_for_build       \
Yann@3115
    24
            companion_libs_for_host  \
Yann@3115
    25
            binutils_for_host        \
Yann@3115
    26
            cc_core_pass_1           \
Yann@3115
    27
            kernel_headers           \
Yann@3115
    28
            libc_start_files         \
Yann@3115
    29
            cc_core_pass_2           \
Yann@3115
    30
            libc                     \
Yann@3115
    31
            cc_for_build             \
Yann@3115
    32
            cc_for_host              \
Yann@3115
    33
            libelf_for_target        \
Yann@3115
    34
            binutils_for_target      \
Yann@3115
    35
            debug                    \
Yann@3115
    36
            test_suite               \
Yann@3115
    37
            finish                   \
yann@461
    38
yann@2936
    39
# Keep an empty line above this comment, so the last
yann@2936
    40
# back-slash terminated line works as expected.
yann@2936
    41
yann@1143
    42
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
yann@461
    43
export CT_STEPS
yann@181
    44
yann@1001
    45
# Print the steps list
yann@1001
    46
PHONY += list-steps
yann@1001
    47
list-steps:
yann@1001
    48
	@echo  'Available build steps, in order:'
yann@1001
    49
	@for step in $(CT_STEPS); do    \
yann@1001
    50
	     echo "  - $${step}";       \
yann@1001
    51
	 done
yann@1001
    52
	@echo  'Use "<step>" as action to execute only that step.'
yann@1001
    53
	@echo  'Use "+<step>" as action to execute up to that step.'
yann@1001
    54
	@echo  'Use "<step>+" as action to execute from that step onward.'
yann@1001
    55
yann@1001
    56
# ----------------------------------------------------------
yann@1001
    57
# This part deals with executing steps
yann@1001
    58
yann@181
    59
$(CT_STEPS):
yann@1010
    60
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
yann@136
    61
yann@304
    62
$(patsubst %,+%,$(CT_STEPS)):
yann@1010
    63
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
yann@136
    64
yann@304
    65
$(patsubst %,%+,$(CT_STEPS)):
yann@1010
    66
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build