Skip to content

Commit

Permalink
Build companion libs for target.
Browse files Browse the repository at this point in the history
Currently, only libelf has a for-target step - but it generalizes
the step to hook other libraries into this step.

Signed-off-by: Alexey Neyman <[email protected]>
  • Loading branch information
stilor committed Nov 13, 2015
1 parent e78251b commit 6f7e6b9
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 21 deletions.
7 changes: 7 additions & 0 deletions scripts/build/companion_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ do_companion_libs_for_host() {
done
}

# Build the companion libs facilities for target
do_companion_libs_for_target() {
for f in ${CT_COMP_LIBS_FACILITY_LIST}; do
do_${f}_for_target
done
}

1 change: 1 addition & 0 deletions scripts/build/companion_libs/100-gmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ do_gmp_get() { :; }
do_gmp_extract() { :; }
do_gmp_for_build() { :; }
do_gmp_for_host() { :; }
do_gmp_for_target() { :; }

# Overide functions depending on configuration
if [ "${CT_GMP}" = "y" ]; then
Expand Down
1 change: 1 addition & 0 deletions scripts/build/companion_libs/110-mpfr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ do_mpfr_get() { :; }
do_mpfr_extract() { :; }
do_mpfr_for_build() { :; }
do_mpfr_for_host() { :; }
do_mpfr_for_target() { :; }

# Overide function depending on configuration
if [ "${CT_MPFR}" = "y" ]; then
Expand Down
1 change: 1 addition & 0 deletions scripts/build/companion_libs/120-ppl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ do_ppl_get() { :; }
do_ppl_extract() { :; }
do_ppl_for_build() { :; }
do_ppl_for_host() { :; }
do_ppl_for_target() { :; }

# Overide functions depending on configuration
if [ "${CT_PPL}" = "y" ]; then
Expand Down
1 change: 1 addition & 0 deletions scripts/build/companion_libs/121-isl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ do_isl_get() { :; }
do_isl_extract() { :; }
do_isl_for_build() { :; }
do_isl_for_host() { :; }
do_isl_for_target() { :; }

# Overide functions depending on configuration
if [ "${CT_ISL}" = "y" ]; then
Expand Down
7 changes: 4 additions & 3 deletions scripts/build/companion_libs/130-cloog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ do_cloog_get() { :; }
do_cloog_extract() { :; }
do_cloog_for_build() { :; }
do_cloog_for_host() { :; }
do_cloog_for_target() { :; }

# Overide functions depending on configuration
if [ "${CT_CLOOG}" = "y" ]; then

cloog_basename() {
printf "cloog"
Expand All @@ -18,9 +22,6 @@ cloog_basename_version() {
printf -- "-${CT_CLOOG_VERSION}"
}

# Overide functions depending on configuration
if [ "${CT_CLOOG}" = "y" ]; then

# Download CLooG
do_cloog_get() {
CT_GetFile "$(cloog_basename_version)" \
Expand Down
1 change: 1 addition & 0 deletions scripts/build/companion_libs/140-mpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ do_mpc_get() { :; }
do_mpc_extract() { :; }
do_mpc_for_build() { :; }
do_mpc_for_host() { :; }
do_mpc_for_target() { :; }

# Overide functions depending on configuration
if [ "${CT_MPC}" = "y" ]; then
Expand Down
36 changes: 18 additions & 18 deletions steps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ help-env::
# 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 \
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 \
companion_libs_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.
Expand Down

0 comments on commit 6f7e6b9

Please sign in to comment.