summaryrefslogtreecommitdiff
path: root/defconfigs
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-12-25 21:24:42 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-12-25 21:24:42 +0100
commitaa4c5240bc62b9b791878166247efc54067cb944 (patch)
treeba5ff496c41f8591252dcc6569943c2cee8dd7d8 /defconfigs
parent46114f5969ea5207609489a32596ddbbf4c1f0a2 (diff)
downloadembtoolkit-aa4c5240bc62b9b791878166247efc54067cb944.tar.gz
embtoolkit-aa4c5240bc62b9b791878166247efc54067cb944.tar.bz2
embtoolkit-aa4c5240bc62b9b791878166247efc54067cb944.tar.xz
CI BUILD: add glibc and musl C libraries
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'defconfigs')
-rwxr-xr-xdefconfigs/arm/arm-ci-build.sh45
-rwxr-xr-xdefconfigs/ci-build.sh63
-rwxr-xr-xdefconfigs/mips/mips-ci-build.sh44
3 files changed, 62 insertions, 90 deletions
diff --git a/defconfigs/arm/arm-ci-build.sh b/defconfigs/arm/arm-ci-build.sh
index 457cfb6..434738f 100755
--- a/defconfigs/arm/arm-ci-build.sh
+++ b/defconfigs/arm/arm-ci-build.sh
@@ -71,53 +71,8 @@ set_float() {
esac
}
-set_os() {
- case "$os" in
- linux|LINUX)
- echo "CONFIG_EMBTK_OS_LINUX=y" >> $cibuild_kconfig
- ;;
- *)
- arm_perror "Unsupported OS $os for ARM, please help to support it"
- exit 1
- ;;
- esac
-}
-
-set_xcompiler() {
- case "$toolchain" in
- gcc|GCC)
- echo "CONFIG_EMBTK_GCC_TOOLCHAIN=y" >> $cibuild_kconfig
- ;;
- Clang+llvm)
- echo "CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN=y" >> $cibuild_kconfig
- ;;
- *)
- arm_perror "Unsupported cross compiler $toolchain for ARM, please help to support it"
- exit 1
- ;;
- esac
-}
-
-set_clibrary() {
- case "$clibrary" in
- eglibc)
- echo "CONFIG_EMBTK_CLIB_EGLIBC=y" >> $cibuild_kconfig
- ;;
- uClibc)
- echo "CONFIG_EMBTK_CLIB_UCLIBC=y" >> $cibuild_kconfig
- ;;
- *)
- arm_perror "Unsupported c library $clibrary for ARM, please help to support it"
- exit 1
- ;;
- esac
-}
-
-set_os
set_endian
set_arch_family
set_float
-set_xcompiler
-set_clibrary
cat $cibuild_kconfig >> $workspace/.config && rm -rf $cibuild_kconfig
diff --git a/defconfigs/ci-build.sh b/defconfigs/ci-build.sh
index 3511f3f..0b86386 100755
--- a/defconfigs/ci-build.sh
+++ b/defconfigs/ci-build.sh
@@ -14,6 +14,60 @@ pinfo() {
echo "[CI-BUILD-INFO] : $1"
}
+set_os() {
+ local x_os=$1
+ local x_cibuild_kconfig=$2
+ case "$x_os" in
+ linux|LINUX)
+ echo "CONFIG_EMBTK_OS_LINUX=y" >> $x_cibuild_kconfig
+ ;;
+ *)
+ perror "Unsupported OS $x_os , please help to support it"
+ exit 1
+ ;;
+ esac
+}
+
+set_xcompiler() {
+ local x_toolchain=$1
+ local x_cibuild_kconfig=$2
+ case "$x_toolchain" in
+ gcc|GCC)
+ echo "CONFIG_EMBTK_GCC_TOOLCHAIN=y" >> $x_cibuild_kconfig
+ ;;
+ Clang+llvm)
+ echo "CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN=y" >> $x_cibuild_kconfig
+ ;;
+ *)
+ perror "Unsupported cross compiler $x_toolchain , please help to support it"
+ exit 1
+ ;;
+ esac
+}
+
+set_clibrary() {
+ local x_clibrary=$1
+ local x_cibuild_kconfig=$2
+ case "$x_clibrary" in
+ eglibc)
+ echo "CONFIG_EMBTK_CLIB_EGLIBC=y" >> $x_cibuild_kconfig
+ ;;
+ uClibc)
+ echo "CONFIG_EMBTK_CLIB_UCLIBC=y" >> $x_cibuild_kconfig
+ ;;
+ glibc)
+ echo "CONFIG_EMBTK_CLIB_GLIBC=y" >> $x_cibuild_kconfig
+ ;;
+ musl)
+ echo "CONFIG_EMBTK_CLIB_MUSL=y" >> $x_cibuild_kconfig
+ ;;
+ *)
+ perror "Unsupported c library $x_clibrary , please help to support it"
+ exit 1
+ ;;
+ esac
+}
+
options=$(echo $* | sed 's/=/ /g')
set -- $options
@@ -99,7 +153,14 @@ pinfo "Generating .config file"
. $workspace/defconfigs/$arch/$arch-ci-build.sh
#
-# Now generating .config
+# toolchain and OS
+#
+set_os $os $workspace/.config
+set_xcompiler $toolchain $workspace/.config
+set_clibrary $clibrary $workspace/.config
+
+#
+# Now generating final .config
#
if [ ! "x$downloaddir" = "x" ]; then
diff --git a/defconfigs/mips/mips-ci-build.sh b/defconfigs/mips/mips-ci-build.sh
index 28dcb5e..93f58bf 100755
--- a/defconfigs/mips/mips-ci-build.sh
+++ b/defconfigs/mips/mips-ci-build.sh
@@ -68,53 +68,9 @@ set_float() {
esac
}
-set_os() {
- case "$os" in
- linux|LINUX)
- echo "CONFIG_EMBTK_OS_LINUX=y" >> $cibuild_kconfig
- ;;
- *)
- mips_perror "Unsupported OS $os, please help to support it"
- exit 1
- ;;
- esac
-}
-
-set_xcompiler() {
- case "$toolchain" in
- gcc|GCC)
- echo "CONFIG_EMBTK_GCC_TOOLCHAIN=y" >> $cibuild_kconfig
- ;;
- Clang+llvm)
- echo "CONFIG_EMBTK_LLVM_ONLY_TOOLCHAIN=y" >> $cibuild_kconfig
- ;;
- *)
- mips_perror "Unsupported cross compiler $toolchain, please help to support it"
- exit 1
- ;;
- esac
-}
-
-set_clibrary() {
- case "$clibrary" in
- eglibc)
- echo "CONFIG_EMBTK_CLIB_EGLIBC=y" >> $cibuild_kconfig
- ;;
- uClibc)
- echo "CONFIG_EMBTK_CLIB_UCLIBC=y" >> $cibuild_kconfig
- ;;
- *)
- mips_perror "Unsupported c library $clibrary, please help to support it"
- exit 1
- ;;
- esac
-}
-
set_mips_isa
set_abi
set_endian
set_float
-set_xcompiler
-set_clibrary
cat $cibuild_kconfig >> $workspace/.config && rm -rf $cibuild_kconfig