mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-03-01 11:41:27 +00:00
Fix installing uClibc headers for versions prior to 0.9.30.
Fix a comment about installing uClibc. Automatically enable // build for uClibc versions that can be built in //. -------- diffstat follows -------- /trunk/scripts/build/libc/uClibc.sh | 32 23 9 0 +++++++++++++++++++++++--------- /trunk/config/libc/uClibc.in | 12 7 5 0 +++++++----- 2 files changed, 30 insertions(+), 14 deletions(-)
This commit is contained in:
parent
d9378214cc
commit
7032dea8ba
@ -38,10 +38,12 @@ config LIBC_V_0_9_29
|
|||||||
config LIBC_V_0_9_30
|
config LIBC_V_0_9_30
|
||||||
bool
|
bool
|
||||||
prompt "0.9.30"
|
prompt "0.9.30"
|
||||||
|
select LIBC_UCLIBC_0_9_30_or_later
|
||||||
|
|
||||||
config LIBC_V_0_9_30_1
|
config LIBC_V_0_9_30_1
|
||||||
bool
|
bool
|
||||||
prompt "0.9.30.1"
|
prompt "0.9.30.1"
|
||||||
|
select LIBC_UCLIBC_0_9_30_or_later
|
||||||
|
|
||||||
# CT_INSERT_VERSION_ABOVE
|
# CT_INSERT_VERSION_ABOVE
|
||||||
# Don't remove above line!
|
# Don't remove above line!
|
||||||
@ -72,14 +74,14 @@ config LIBC_VERSION
|
|||||||
# CT_INSERT_VERSION_STRING_ABOVE
|
# CT_INSERT_VERSION_STRING_ABOVE
|
||||||
# Don't remove above line!
|
# Don't remove above line!
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_0_9_30_or_later
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
select LIBC_UCLIBC_PARALLEL
|
||||||
|
|
||||||
config LIBC_UCLIBC_PARALLEL
|
config LIBC_UCLIBC_PARALLEL
|
||||||
bool
|
bool
|
||||||
prompt "Build uClibc in //" if LIBC_V_snapshot || LIBC_V_specific_date
|
|
||||||
default n
|
default n
|
||||||
help
|
|
||||||
Build uClibc using parallel jobs.
|
|
||||||
Some 'old' versions won't build in //, but it works starting with
|
|
||||||
0.9.30 release candidates.
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
bool
|
bool
|
||||||
|
@ -54,6 +54,8 @@ do_libc_check_config() {
|
|||||||
|
|
||||||
# This functions installs uClibc's headers
|
# This functions installs uClibc's headers
|
||||||
do_libc_headers() {
|
do_libc_headers() {
|
||||||
|
local install_rule
|
||||||
|
|
||||||
CT_DoStep INFO "Installing C library headers"
|
CT_DoStep INFO "Installing C library headers"
|
||||||
|
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
|
mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
|
||||||
@ -61,7 +63,7 @@ do_libc_headers() {
|
|||||||
|
|
||||||
# Simply copy files until uClibc has the ablity to build out-of-tree
|
# Simply copy files until uClibc has the ablity to build out-of-tree
|
||||||
CT_DoLog EXTRA "Copying sources to build dir"
|
CT_DoLog EXTRA "Copying sources to build dir"
|
||||||
{ cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
|
tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
|
||||||
|
|
||||||
# Retrieve the config file
|
# Retrieve the config file
|
||||||
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||||
@ -76,8 +78,14 @@ do_libc_headers() {
|
|||||||
CT_DoLog EXTRA "Building headers"
|
CT_DoLog EXTRA "Building headers"
|
||||||
CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers
|
CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers
|
||||||
|
|
||||||
|
if [ "${CT_LIBC_UCLIBC_0_9_30_or_later}" = "y" ]; then
|
||||||
|
install_rule=install_headers
|
||||||
|
else
|
||||||
|
install_rule=install_dev
|
||||||
|
fi
|
||||||
|
|
||||||
CT_DoLog EXTRA "Installing headers"
|
CT_DoLog EXTRA "Installing headers"
|
||||||
CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_headers
|
CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" ${install_rule}"
|
||||||
|
|
||||||
CT_EndStep
|
CT_EndStep
|
||||||
}
|
}
|
||||||
@ -96,7 +104,7 @@ do_libc() {
|
|||||||
|
|
||||||
# Simply copy files until uClibc has the ablity to build out-of-tree
|
# Simply copy files until uClibc has the ablity to build out-of-tree
|
||||||
CT_DoLog EXTRA "Copying sources to build dir"
|
CT_DoLog EXTRA "Copying sources to build dir"
|
||||||
{ cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
|
tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
|
||||||
|
|
||||||
# Retrieve the config file
|
# Retrieve the config file
|
||||||
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||||
@ -126,14 +134,20 @@ do_libc() {
|
|||||||
${CT_LIBC_UCLIBC_VERBOSITY} \
|
${CT_LIBC_UCLIBC_VERBOSITY} \
|
||||||
all
|
all
|
||||||
|
|
||||||
# YEM-FIXME: we want to install libraries in $SYSROOT/lib, but we don't want
|
# YEM-FIXME:
|
||||||
# to install headers in $SYSROOT/include, thus making only install_runtime.
|
# - we want to install 'runtime' files, eg. lib*.{a,so*}, crti.o and
|
||||||
# Plus, the headers were previously installed earlier with install_headers,
|
# such files, except the headers as they already are installed
|
||||||
# so all should be well. Unfortunately, the install_headers target does not
|
# - "make install_dev" installs the headers, the crti.o... and the
|
||||||
# install crti.o and consorts... :-( So reverting to target 'install'.
|
# static libs, but not the dynamic libs
|
||||||
# Note: PARALLELMFLAGS is not usefull for installation.
|
# - "make install_runtime" installs the dynamic libs only
|
||||||
|
# - "make install" calls install_runtime and install_dev
|
||||||
|
# - so we're left with re-installing the headers... Sigh...
|
||||||
|
#
|
||||||
# We do _not_ want to strip anything for now, in case we specifically
|
# We do _not_ want to strip anything for now, in case we specifically
|
||||||
# asked for a debug toolchain, hence the STRIPTOOL= assignment
|
# asked for a debug toolchain, hence the STRIPTOOL= assignment
|
||||||
|
#
|
||||||
|
# Note: PARALLELMFLAGS is not usefull for installation.
|
||||||
|
#
|
||||||
CT_DoLog EXTRA "Installing C library"
|
CT_DoLog EXTRA "Installing C library"
|
||||||
CT_DoExecLog ALL \
|
CT_DoExecLog ALL \
|
||||||
make CROSS=${CT_TARGET}- \
|
make CROSS=${CT_TARGET}- \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user