crosstool-ng/steps.mk
Erico Nunes b8e64a0c08 avr-libc: add support for avr-libc C library
This commit adds support for the avr-libc C library.
According to the project page at http://www.nongnu.org/avr-libc , the
avr-libc package provides a subset of the standard C library for Atmel
AVR 8-bit RISC microcontrollers. In addition, the library provides the
basic startup code needed by most applications.

Support for this library in crosstool-ng is only enabled for the AVR
8-bit target.

The avr-libc manual and most distributions build the AVR 8-bit gcc
toolchain with the "avr" (non-canonical) target.
Some experimentation also led to the conclusion that other (canonical)
targets are not very well supported, so we force the "avr" target for
crosstool-ng as well.

The manual also recommends building avr-libc after the final gcc build.
To accomplish this with crosstool-ng, a new do_libc_post_cc step is
added, in which currently only avr-libc performs its build, and is a
no-op for the other libc options.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2015-06-21 20:53:06 -03:00

68 lines
2.3 KiB
Makefile

# Makefile for each steps
# Copyright 2006 Yann E. MORIN <yann.morin.1998@free.fr>
# ----------------------------------------------------------
# This is the steps help entry
help-build::
@echo ' list-steps - List all build steps'
help-env::
@echo ' STOP=step - Stop the build just after this step (list with list-steps)'
@echo ' RESTART=step - Restart the build just before this step (list with list-steps)'
# ----------------------------------------------------------
# The steps list
# The _for_build steps are noop for native and cross,
# but are actual steps for canadian and cross-native.
# Please keep the last line with a '\' and keep the following empy line:
# it helps when diffing and merging.
CT_STEPS := libc_check_config \
companion_libs_for_build \
binutils_for_build \
companion_libs_for_host \
binutils_for_host \
cc_core_pass_1 \
kernel_headers \
libc_start_files \
cc_core_pass_2 \
libc \
cc_for_build \
cc_for_host \
libc_post_cc \
libelf_for_target \
binutils_for_target \
debug \
test_suite \
finish \
# Keep an empty line above this comment, so the last
# back-slash terminated line works as expected.
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
export CT_STEPS
# Print the steps list
PHONY += list-steps
list-steps:
@echo 'Available build steps, in order:'
@for step in $(CT_STEPS); do \
echo " - $${step}"; \
done
@echo 'Use "<step>" as action to execute only that step.'
@echo 'Use "+<step>" as action to execute up to that step.'
@echo 'Use "<step>+" as action to execute from that step onward.'
# ----------------------------------------------------------
# This part deals with executing steps
$(CT_STEPS):
$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
$(patsubst %,+%,$(CT_STEPS)):
$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
$(patsubst %,%+,$(CT_STEPS)):
$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build