eglibc: use the PKGVERSION and BUGURL options

This patch makes eglibc benefit from the TOOLCHAIN_PKGVERSION and
TOOLCHAIN_BUGURL options.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
This commit is contained in:
Benoît THÉBAUDEAU" 2011-05-31 20:55:30 +02:00
parent 493672e977
commit d558bb995d
4 changed files with 53 additions and 3 deletions

View File

@ -22,22 +22,27 @@ config LIBC_EGLIBC_V_2_13
bool
prompt "2_13"
depends on EXPERIMENTAL
select LIBC_EGLIBC_2_13_or_later
config LIBC_EGLIBC_V_2_12
bool
prompt "2_12"
select LIBC_EGLIBC_2_12_or_later
config LIBC_EGLIBC_V_2_11
bool
prompt "2_11"
select LIBC_EGLIBC_2_11_or_later
config LIBC_EGLIBC_V_2_10
bool
prompt "2_10"
select LIBC_EGLIBC_2_10_or_later
config LIBC_EGLIBC_V_2_9
bool
prompt "2_9"
select LIBC_EGLIBC_2_9_or_later
config LIBC_EGLIBC_V_2_8
bool
@ -62,6 +67,7 @@ config LIBC_EGLIBC_V_2_5
config LIBC_EGLIBC_V_TRUNK
bool
prompt "'trunk'"
select LIBC_EGLIBC_2_13_or_later
help
Selecting this will export the trunk of the eglibc subversion repository.
@ -82,6 +88,29 @@ config LIBC_VERSION
default "2_5" if LIBC_EGLIBC_V_2_5
default "trunk" if LIBC_EGLIBC_V_TRUNK
config LIBC_EGLIBC_2_13_or_later
bool
select LIBC_EGLIBC_2_12_or_later
config LIBC_EGLIBC_2_12_or_later
bool
select LIBC_EGLIBC_2_11_or_later
config LIBC_EGLIBC_2_11_or_later
bool
select LIBC_EGLIBC_2_10_or_later
config LIBC_EGLIBC_2_10_or_later
bool
select LIBC_EGLIBC_2_9_or_later
config LIBC_EGLIBC_2_9_or_later
bool
select LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
config LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
bool
config EGLIBC_REVISION
string
prompt "Revision to use"

View File

@ -73,7 +73,7 @@ config TOOLCHAIN_PKGVERSION
help
Specify a string that identifies your package. You may wish to include
a build number or build date. This version string will be included in
the output of gcc --version, and also in binutils.
the output of gcc --version, and also in binutils, eglibc.
This is passed to the configure flag --with-pkgversion.

View File

@ -137,6 +137,22 @@ addToolVersion() {
SedExpr1="${SedExpr1}\n select BINUTILS_2_18_or_later"
fi
;;
eglibc)
# Extract 'M'ajor and 'm'inor from version string
ver_M=$(getVersionField "${version}" . 1)
ver_m=$(getVersionField "${version}" . 2)
if [ \( ${ver_M} -eq 2 -a ${ver_m} -eq 13 \) ]; then
SedExpr1="${SedExpr1}\n select LIBC_EGLIBC_2_13_or_later"
elif [ \( ${ver_M} -eq 2 -a ${ver_m} -eq 12 \) ]; then
SedExpr1="${SedExpr1}\n select LIBC_EGLIBC_2_12_or_later"
elif [ \( ${ver_M} -eq 2 -a ${ver_m} -eq 11 \) ]; then
SedExpr1="${SedExpr1}\n select LIBC_EGLIBC_2_11_or_later"
elif [ \( ${ver_M} -eq 2 -a ${ver_m} -eq 10 \) ]; then
SedExpr1="${SedExpr1}\n select LIBC_EGLIBC_2_10_or_later"
elif [ \( ${ver_M} -eq 2 -a ${ver_m} -eq 9 \) ]; then
SedExpr1="${SedExpr1}\n select LIBC_EGLIBC_2_9_or_later"
fi
;;
uClibc)
# uClibc-0.9.30 and above need some love
ver_M=$(getVersionField "${version}" . 1)

View File

@ -234,6 +234,11 @@ do_libc() {
*) extra_config+=("--enable-add-ons=$(do_libc_add_ons_list ,)");;
esac
if [ "${CT_LIBC_EGLIBC_HAS_PKGVERSION_BUGURL}" = "y" ]; then
[ -n "${CT_TOOLCHAIN_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_TOOLCHAIN_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
touch config.cache
@ -245,7 +250,7 @@ do_libc() {
# Pre-seed the configparms file with values from the config option
printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms
cross_cc=$(CT_Which "${CT_TARGET}-gcc")
cross_cc=$(CT_Which "${CT_TARGET}-gcc")
CT_DoLog DEBUG "Using gcc for target: '${cross_cc}'"
CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
@ -296,7 +301,7 @@ do_libc() {
--with-headers="${CT_HEADERS_DIR}" \
"${extra_config[@]}" \
"${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[@]}"
# build hacks
case "${CT_ARCH},${CT_ARCH_CPU}" in
powerpc,8??)