Skip to content

Commit c20c1c9

Browse files
Better handling if uClibc version string
arc-init.sh used to depend on variable version_str, which was set in build-uclibc.sh. Name was bad, since this is uclibc-specific, and this dependency overall looked not nice. This commit improves that, although still we have a dependency in arc-init, but now it depends on build-all.sh instead. Signed-off-by: Anton Kolesov <[email protected]>
1 parent a5397e7 commit c20c1c9

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

arc-init.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ configure_uclibc_stage1() {
380380
--without-newlib \
381381
--disable-c99 \
382382
--disable-libgomp \
383-
--with-pkgversion="$version_str" \
383+
--with-pkgversion="$UCLIBC_TOOLS_VERSION" \
384384
--with-bugurl="$ARC_COMMON_BUGURL" \
385385
$CONFIG_EXTRA \
386386
--with-sysroot="$SYSROOTDIR" \
@@ -413,7 +413,7 @@ configure_uclibc_stage2() {
413413
--target=$triplet \
414414
--with-cpu=${ISA_CPU} \
415415
$UCLIBC_DISABLE_MULTILIB \
416-
--with-pkgversion="$version_str" \
416+
--with-pkgversion="$UCLIBC_TOOLS_VERSION" \
417417
--with-bugurl="$ARC_COMMON_BUGURL" \
418418
--enable-fast-install=N/A \
419419
--with-endian=$ARC_ENDIAN \
@@ -455,7 +455,7 @@ configure_for_arc() {
455455
# calling "make install". Note - prefix is set to /usr, DESTDIR should
456456
# point to sysroot.
457457
if ! $srcdir/configure --prefix=/usr --host=$triplet \
458-
--with-pkgversion="${version_str}"\
458+
--with-pkgversion="$UCLIBC_TOOLS_VERSION"\
459459
--with-bugurl="$ARC_COMMON_BUGURL" \
460460
CFLAGS="$CFLAGS_FOR_TARGET" $* \
461461
>> "$logfile" 2>&1

build-all.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,18 @@ fi
754754

755755
PARALLEL="-j ${jobs} -l ${load}"
756756

757+
# Set version string for Linux uClibc toolchain, it will be used by arc-init. I
758+
# do not like this cross-file dependency, but otherwise it happens that
759+
# arc-init depends on either UCLIBC_TOOLS_VERSION, or on ISA_CPU+RELEASE_NAME.
760+
# Probably that stuff should be centralized is some better way or uClibc
761+
# configure procedures should take version string as an argument.
762+
if [ $ISA_CPU = arc700 ]
763+
then
764+
UCLIBC_TOOLS_VERSION="ARCompact ISA Linux uClibc toolchain $RELEASE_NAME"
765+
else
766+
UCLIBC_TOOLS_VERSION="ARCv2 ISA Linux uClibc toolchain $RELEASE_NAME"
767+
fi
768+
757769
# Standard setup
758770
. "${ARC_GNU}/toolchain/arc-init.sh"
759771

@@ -783,6 +795,7 @@ export NPTL_SUPPORT
783795
export CHECKOUT_CONFIG
784796
# Used by configure funcs in arc-init.sh
785797
export TOOLCHAIN_HOST
798+
export UCLIBC_TOOLS_VERSION
786799

787800
# Set up a logfile
788801
logfile="${LOGDIR}/all-build-$(date -u +%F-%H%M).log"

build-uclibc.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,6 @@ fi
188188
arch=arc
189189
triplet=${arche}-snps-linux-uclibc
190190

191-
if [ $ISA_CPU = arc700 ]
192-
then
193-
version_str="ARCompact ISA Linux uClibc toolchain $RELEASE_NAME"
194-
else
195-
version_str="ARCv2 ISA Linux uClibc toolchain $RELEASE_NAME"
196-
fi
197-
198191
# Set up a logfile
199192
logfile="${LOGDIR}/uclibc-build-$(date -u +%F-%H%M).log"
200193
rm -f "${logfile}"

0 commit comments

Comments
 (0)