mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 21:57:48 +00:00
Merge pull request #1201 from abrodkin/topic-glibc-multilib
ARC: Support building of multi-lib Glibc toolchain
This commit is contained in:
commit
be5d0317d2
7
samples/arc-multilib-linux-gnu/crosstool.config
Normal file
7
samples/arc-multilib-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CT_CONFIG_VERSION="3"
|
||||||
|
CT_ARCH_ARC=y
|
||||||
|
CT_MULTILIB=y
|
||||||
|
CT_TARGET_CFLAGS="-matomic"
|
||||||
|
CT_TARGET_VENDOR="multilib"
|
||||||
|
CT_TARGET_ALIAS="arc-linux"
|
||||||
|
CT_KERNEL_LINUX=y
|
3
samples/arc-multilib-linux-gnu/reported.by
Normal file
3
samples/arc-multilib-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
reporter_name="Alexey Brodkin"
|
||||||
|
reporter_url="http://embarc.org"
|
||||||
|
reporter_comment="ARC multilib GNU Linux toolchain"
|
@ -29,3 +29,39 @@ CT_DoArchUClibcCflags()
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Multilib: Adjust configure arguments for GLIBC
|
||||||
|
# Usage: CT_DoArchGlibcAdjustConfigure <configure-args-array-name> <cflags>
|
||||||
|
#
|
||||||
|
# From GCC's standpoint ARC's multilib items are defined by "mcpu" values
|
||||||
|
# which we have quite a few and for all of them might be built optimized
|
||||||
|
# cross-toolchain.
|
||||||
|
#
|
||||||
|
# From Glibc's standpoint multilib is multi-ABI and so very limited
|
||||||
|
# versions are supposed to co-exist.
|
||||||
|
#
|
||||||
|
# Here we force Glibc to install libraries in per-multilib folder to create
|
||||||
|
# a universal cross-toolchain that has libs optimized for multiple CPU types.
|
||||||
|
CT_DoArchGlibcAdjustConfigure() {
|
||||||
|
local -a add_args
|
||||||
|
local array="${1}"
|
||||||
|
local cflags="${2}"
|
||||||
|
local opt
|
||||||
|
local mcpu
|
||||||
|
|
||||||
|
# If building for multilib, set proper installation paths
|
||||||
|
if [ "${CT_MULTILIB}" = "y" ]; then
|
||||||
|
for opt in ${cflags}; do
|
||||||
|
case "${opt}" in
|
||||||
|
-mcpu=*)
|
||||||
|
mcpu="${opt#*=}"
|
||||||
|
add_args+=( "libc_cv_rtlddir=/lib/${mcpu}" )
|
||||||
|
add_args+=( "libc_cv_slibdir=/lib/${mcpu}" )
|
||||||
|
add_args+=( "--libdir=/usr/lib/${mcpu}" )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "${array}+=( \"\${add_args[@]}\" )"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user