aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-06-27 14:21:58 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2017-07-04 15:26:59 +0000
commitc62e01b4fbf68113ab7cda5f7f69f2f0dbe543e1 (patch)
treed6807c3cc0e485ae273e9f58d034e7bcbcc3191e
parent8a07fe20dc969609a38d295ddb987e8a069f68bc (diff)
Fix bug #3040: CC1 and cc1plus cannot convert UTF-8
When building a toolchain for a mingwin host, use a pre-built libiconv. We also update the manifest version to 1.5 to account for this new component. [ABE_PREV_CMD_ALL] [ABE_PREV_MANIFEST_ALL] Change-Id: I6b7ab0c8b62c452815570d9a2de1ba702ac31dad
-rw-r--r--config/gcc.conf3
-rw-r--r--config/libiconv.conf12
-rw-r--r--config/sources.conf1
-rw-r--r--lib/globals.sh13
-rwxr-xr-xlib/make.sh8
5 files changed, 31 insertions, 6 deletions
diff --git a/config/gcc.conf b/config/gcc.conf
index 6a3a6048..179729cc 100644
--- a/config/gcc.conf
+++ b/config/gcc.conf
@@ -214,6 +214,9 @@ else
fi
fi
+# When building for a mingw host, supply pre-built libiconv
+mingw_extraconf="--with-libiconv-prefix=${local_builds}/destdir/${host}/usr"
+
# stage2 flags are used for native builds too
if test x"${release}" = x; then
stage2_flags="${stage2_flags} --enable-checking=yes"
diff --git a/config/libiconv.conf b/config/libiconv.conf
new file mode 100644
index 00000000..0043fde1
--- /dev/null
+++ b/config/libiconv.conf
@@ -0,0 +1,12 @@
+# This is the latest version of this toolchain component
+# TODO: there is a line in lib/make.sh which hardcodes this version in
+# an environment variable. This ought to be cleaned up some time.
+latest="libiconv-1.14-3-mingw32-dev.tar.xz"
+
+# This is a list of default flags always supplied to configure
+default_configure_flags=""
+
+# If yes, only static linking will be used
+static_link=yes
+
+mingw_only=yes
diff --git a/config/sources.conf b/config/sources.conf
index 3e5739c6..0fde1e36 100644
--- a/config/sources.conf
+++ b/config/sources.conf
@@ -14,6 +14,7 @@ installjammer-1.2.15 http://snapshots.linaro.org/components/toolchain/infrastruc
linux http://snapshots.linaro.org/components/toolchain/infrastructure/
gcc http://148.251.136.42/snapshots-ref
binutils http://148.251.136.42/snapshots-ref
+libiconv http://snapshots.linaro.org/components/toolchain/infrastructure/
# These URLS are for repositories, ie... git
dejagnu.git http://git.linaro.org/git/toolchain/dejagnu.git
diff --git a/lib/globals.sh b/lib/globals.sh
index 13dc1b2f..d9726f1d 100644
--- a/lib/globals.sh
+++ b/lib/globals.sh
@@ -41,7 +41,7 @@ override_arch=
override_cpu=
override_tune=
-manifest_version=1.4
+manifest_version=1.5
# The prefix for installing the toolchain
prefix=
@@ -153,6 +153,7 @@ import_manifest()
fixup_mingw=true ;;
1.3) fixup_mingw=true ;;
1.4) ;;
+ 1.5) ;;
*)
error "Imported manifest version $manifest_format is not supported."
return 1
@@ -258,12 +259,12 @@ get_component_list()
if is_host_mingw; then
# As Mingw32 requires a cross compiler to be already built, so we
# don't need to rebuild the sysroot.
- builds="${builds} expat python binutils libc stage2 gdb"
+ builds="${builds} expat python libiconv binutils libc stage2 gdb"
else
- # Non-linux builds skip expat and python, but are here so that
- # they are included in the manifest, so linux and mingw
- # manifests can be identical.
- builds="${builds} expat python binutils stage1 libc stage2 gdb"
+ # Non-mingw builds skip expat, python and libiconv, but
+ # are here so that they are included in the manifest, so
+ # linux and mingw manifests can be identical.
+ builds="${builds} expat python libiconv binutils stage1 libc stage2 gdb"
fi
if test "$(echo ${target} | grep -c -- -linux-)" -eq 1; then
builds="${builds} gdbserver"
diff --git a/lib/make.sh b/lib/make.sh
index dcef0e18..6e5d7184 100755
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -115,6 +115,14 @@ build_all()
export PYTHONPATH=${local_builds}/destdir/${host}/bin/pylib
warning "You must set PYTHONPATH in your environment to ${PYTHONPATH}"
;;
+ libiconv)
+ # TODO: avoid hardcoding the version in the path here
+ dryrun "rsync -av ${local_snapshots}/libiconv-1.14-3/include ${local_snapshots}/libiconv-1.14-3/lib ${local_builds}/destdir/${host}/usr/"
+ if [ $? -ne 0 ]; then
+ error "rsync of libiconv failed"
+ return 1
+ fi
+ ;;
*)
build $i
build_all_ret=$?