diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-11 14:23:25 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-11 14:23:25 +0000 |
commit | cbc6149e3b5eb5bf871875c1005022206de49d1c (patch) | |
tree | 46bb042be81f508bd4f6ec9eab6823f6d76d0ca4 | |
parent | 1ec7f8b20678e46ee894eb9e55be831088a25909 (diff) |
WIP: FDPIC supportfdpic
Change-Id: I7293fc3839466b8b9c5c2021f02572d1987827a6
-rwxr-xr-x | abe.sh | 27 | ||||
-rw-r--r-- | config/gcc.conf | 8 | ||||
-rw-r--r-- | config/sources.conf | 1 | ||||
-rw-r--r-- | lib/common.sh | 3 | ||||
-rw-r--r-- | lib/configure.sh | 12 | ||||
-rw-r--r-- | lib/control.sh | 2 | ||||
-rw-r--r-- | lib/make.sh | 3 |
7 files changed, 44 insertions, 12 deletions
@@ -41,7 +41,7 @@ usage() [--set {cflags|ldflags|runtestflags|makeflags}=XXX] [--set {gcc_override_configure}=XXX] [--set {languages}={c|c++|fortran|go|lto|objc|java|ada}] - [--set {libc}={glibc|eglibc|newlib}] + [--set {libc}={glibc|eglibc|newlib|uclibcng}] [--set {multilib}={aprofile|rmprofile}] [--set {linker}={ld|gold}] [--set {packages}={toolchain|gdb|sysroot}] @@ -50,7 +50,7 @@ usage() [--testcontainer [user@]ipaddress:ssh_port] [--timeout <timeout_value>] [--usage] - [{binutils|dejagnu|gcc|gdb|gdbserver|gmp|mpfr|mpc|eglibc|glibc|newlib|qemu} + [{binutils|dejagnu|gcc|gdb|gdbserver|gmp|mpfr|mpc|eglibc|glibc|newlib|qemu|uclibcng} =<id|snapshot|url>[~branch][@revision]]] EOF @@ -289,7 +289,7 @@ OPTIONS The default set for most platforms is c, c++, go, fortran, and lto. - --set {libc}={glibc|eglibc|newlib} + --set {libc}={glibc|eglibc|newlib|uclibcng} The default value is stored in lib/globals.sh. This setting overrides the default. Specifying a libc @@ -346,6 +346,7 @@ OPTIONS x86_64-linux-gnu arm-linux-gnueabi arm-linux-gnueabihf + arm-uclinuxfdpiceabi arm-none-eabi armeb-none-eabi armeb-linux-gnueabihf @@ -373,7 +374,7 @@ OPTIONS --usage Display synopsis information. - [{binutils|dejagnu|gcc|gdb|gdbserver|gmp|mpfr|mpc|eglibc|glibc|newlib|qemu}=<id|snapshot|url>[~branch][@revision]] + [{binutils|dejagnu|gcc|gdb|gdbserver|gmp|mpfr|mpc|eglibc|glibc|newlib|qemu|uclibcng}=<id|snapshot|url>[~branch][@revision]] This option specifies a particular version of a package that might differ from the default version in the @@ -494,9 +495,15 @@ crosscheck_clibrary_target() return 1 fi ;; + arm-uclinuxfdpiceabi) + if test x"${test_clibrary}" != x"uclibcng"; then + error "${test_target} is only compatible with uclibc-ng." + return 1 + fi + ;; *) case ${test_clibrary} in - glibc|eglibc|newlib) + glibc|eglibc|newlib|uclibcng) ;; *) error "Invalid clibrary ${test_clibrary}." @@ -512,7 +519,7 @@ select_clibrary() { # Range check user input against supported C libraries. case "${clibrary}" in - glibc|eglibc|newlib) + glibc|eglibc|newlib|uclibcng) notice "Using '${clibrary}' as the C library as directed by \"--set libc=${clibrary}\"." ;; auto) @@ -524,6 +531,9 @@ select_clibrary() arm*-eabi*|arm*-elf|aarch64*-*elf|*-mingw32|powerpc*-eabi|ppc*-eabi) clibrary="newlib" ;; + arm-uclinuxfdpiceabi) + clibrary="uclibcng" + ;; *) # we should use eglibc or glibc, depending on the selected # configuration @@ -1168,7 +1178,7 @@ while test $# -gt 0; do mpc) mpc_version="${value}" ;; - eglibc|glibc|newlib) + eglibc|glibc|newlib|uclibcng) # Test if --target follows one of these clibrary set # commands. If so, put $1 onto the back of the inputs. # This is because clibrary validity depends on the target. @@ -1193,6 +1203,9 @@ while test $# -gt 0; do newlib) newlib_version="${value}" ;; + uclibcng) + uclibcng_version="${value}" + ;; *) error "FIXME: Execution should never reach this point." build_failure diff --git a/config/gcc.conf b/config/gcc.conf index 8ad87091..dfc0910d 100644 --- a/config/gcc.conf +++ b/config/gcc.conf @@ -91,7 +91,7 @@ default_makeflags="MAKEINFOFLAGS=--force" # floating-point abi/fpu case ${target} in - arm*linux-gnueabihf) + arm*linux-gnueabihf|arm*-uclinuxfdpiceabihf) default_configure_flags="${default_configure_flags} --with-float=hard" # FPU (no --with-fpu for non-hf configurations, nor AArch64) @@ -100,13 +100,13 @@ case ${target} in armv8l-*linux-gnueabihf) default_configure_flags="${default_configure_flags} --with-fpu=neon-fp-armv8" ;; - arm*-*linux-gnueabihf) + arm*-*linux-gnueabihf|arm*-uclinuxfdpiceabi) default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16" ;; esac fi ;; - arm*linux-gnueabi) + arm*linux-gnueabi|arm*-uclinuxfdpiceabi) default_configure_flags="${default_configure_flags} --with-float=soft" ;; esac @@ -209,6 +209,8 @@ if test x"${build}" != x"${target}"; then # bare metal targets don't support threads. default_configure_flags="${default_configure_flags} --with-newlib" ;; + uclibcng) + ;; *) fixme "\${clibrary} not specified." ;; diff --git a/config/sources.conf b/config/sources.conf index ca48fa61..2ebd381f 100644 --- a/config/sources.conf +++ b/config/sources.conf @@ -31,6 +31,7 @@ eglibc.git http://git-us.linaro.org/git/toolchain/eglibc.git glibc.git http://git-us.linaro.org/git/toolchain/glibc.git newlib.git http://git-us.linaro.org/git/toolchain/newlib.git libgloss.git http://git-us.linaro.org/git/toolchain/newlib.git +uclibc-ng.git https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git qemu.git git://git.qemu.org/qemu.git diff --git a/lib/common.sh b/lib/common.sh index 52b72758..133872b6 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -245,6 +245,9 @@ create_release_tag() newlib) # newlib doesn't have a version. ;; + uclibcng) + local version="FIXME UCLIBCNG VERSION IN COMMON.sh" + ;; *) ;; esac diff --git a/lib/configure.sh b/lib/configure.sh index 69d91ea1..119db658 100644 --- a/lib/configure.sh +++ b/lib/configure.sh @@ -201,7 +201,17 @@ configure_build() # qemu's configure does not accept a parameter like SHELL=/bin/bash FORCESHELL="" ;; - *) + uclibcng) + dryrun "rsync -av ${srcdir}/* ${builddir}" + sed "s;__KERNEL_HEADERS__;${sysroots}/usr/include;g" ${builddir}/config_template | \ + sed "s;__CROSS_COMPILER_PREFIX__;${target}-;g" | \ + sed "s;__DODEBUG__;DODEBUG=y;g" | \ + sed "s;__DODEBUG_PT__;# DODEBUG_PT is not set;g" | \ + sed "s;# COMPILE_IN_THUMB_MODE is not set;COMPILE_IN_THUMB_MODE=y;g" | \ + sed "s;__DOSTRIP__;# DOSTRIP is not set;g" > ${builddir}/.config + exit 1 + ;; + *) local opts="${opts} --build=${build} --host=${host} --target=${target} --prefix=${sysroots}/usr" ;; esac diff --git a/lib/control.sh b/lib/control.sh index d8ceb9d8..3fa3558c 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -77,7 +77,7 @@ build_step_CHECK() local check="" # Replace pseudo component names by the actual component name: # stage[12] -> gcc - # libc -> newlib|glibc|eglibc + # libc -> newlib|glibc|eglibc|uclibcng local build_names="$(echo $build_component_list | sed -e 's/stage[12]/gcc/' -e s/\\blibc\\b/${clibrary}/)" local component for component in $check_component_list; do diff --git a/lib/make.sh b/lib/make.sh index c829a37e..734ad015 100644 --- a/lib/make.sh +++ b/lib/make.sh @@ -933,6 +933,9 @@ make_docs() qemu) return 0 ;; + uclibcng) + return 0 + ;; *) record_artifact "log_makedoc_${component}${2:+-$2}" "${builddir}/makedoc.log" dryrun "make SHELL=${bash_shell} ${make_flags} -w -C ${builddir} info man 2>&1 | tee -a ${builddir}/makedoc.log" |