mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-25 15:31:05 +00:00
d776140189
Currently, we rely on an existing external cross-compiler targetting the target, to build the C library. This can pause quite a few problems if that compiler is different from the one we are building, because it could introduce some ABI issues. This patch removes this dependency, by building the core compilers as we do for standard cross, and also by building the binutils and gcc, for running on the build machine. This means we no longer need to offer the cross-sompiler selection in the menuconfig. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
81 lines
2.7 KiB
Makefile
81 lines
2.7 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 \
|
|
gmp_for_build \
|
|
mpfr_for_build \
|
|
ppl_for_build \
|
|
cloog_for_build \
|
|
mpc_for_build \
|
|
libelf_for_build \
|
|
binutils_for_build \
|
|
elf2flt_for_build \
|
|
gmp_for_host \
|
|
mpfr_for_host \
|
|
ppl_for_host \
|
|
cloog_for_host \
|
|
mpc_for_host \
|
|
libelf_for_host \
|
|
binutils_for_host \
|
|
elf2flt_for_host \
|
|
sstrip_for_host \
|
|
cc_core_pass_1 \
|
|
kernel_headers \
|
|
libc_start_files \
|
|
cc_core_pass_2 \
|
|
libc \
|
|
cc_for_build \
|
|
cc_for_host \
|
|
libc_finish \
|
|
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
|