diff options
author | Alexey Neyman <stilor@att.net> | 2017-09-03 19:55:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-03 19:55:58 -0700 |
commit | f994d1c7d7cd62a474a09cadc89ddd15da427fef (patch) | |
tree | ab4683e03ce5cb5e0eeffb8137327170e637ecdd /scripts/build/libc | |
parent | 95de709fe3f7e58af210c2727a7b28608936068e (diff) | |
parent | 602304b23077b8cd58b99a836e8d9ffbedecd52c (diff) | |
download | crosstool-ng-f994d1c7d7cd62a474a09cadc89ddd15da427fef.tar.gz crosstool-ng-f994d1c7d7cd62a474a09cadc89ddd15da427fef.tar.bz2 crosstool-ng-f994d1c7d7cd62a474a09cadc89ddd15da427fef.zip |
Merge pull request #823 from stilor/sh-experiment-multilib
Better SuperH multilib support (different endian, glibc/uClibc for no-FPU, etc)
Diffstat (limited to 'scripts/build/libc')
-rw-r--r-- | scripts/build/libc/glibc.sh | 73 | ||||
-rw-r--r-- | scripts/build/libc/uClibc.sh | 4 |
2 files changed, 39 insertions, 38 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 0cf58f35..3b4b6268 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -150,6 +150,9 @@ do_libc_backend_once() { ;; esac + # FIXME static version of glibc seems to be broken: + # build tries to use libc-modules.h which is generated from + # soversions.i, which is only created for builds with shared libs. case "${CT_SHARED_LIBS}" in y) extra_config+=("--enable-shared");; *) extra_config+=("--disable-shared");; @@ -208,6 +211,7 @@ do_libc_backend_once() { ;; esac done + CT_DoArchGlibcAdjustConfigure extra_config "${glibc_cflags}" # ./configure is mislead by our tools override wrapper for bash # so just tell it where the real bash is _on_the_target_! @@ -308,42 +312,39 @@ do_libc_backend_once() { "${extra_make_args[@]}" \ install-headers - # For glibc, a few headers need to be manually installed - if [ "${CT_LIBC}" = "glibc" ]; then - # Two headers -- stubs.h and features.h -- aren't installed by install-headers, - # so do them by hand. We can tolerate an empty stubs.h for the moment. - # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html - mkdir -p "${CT_HEADERS_DIR}/gnu" - CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h" - CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc/include/features.h" \ - "${CT_HEADERS_DIR}/features.h" - - # Building the bootstrap gcc requires either setting inhibit_libc, or - # having a copy of stdio_lim.h... see - # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html - CT_DoExecLog ALL cp -v bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h" - - # Following error building gcc-4.0.0's gcj: - # error: bits/syscall.h: No such file or directory - # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html - # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html - # Of course, only copy it if it does not already exist - case "${CT_ARCH}" in - arm) ;; - *) if [ -f "${CT_HEADERS_DIR}/bits/syscall.h" ]; then - CT_DoLog ALL "Not over-writing existing bits/syscall.h" - elif [ -f "misc/bits/syscall.h" ]; then - CT_DoExecLog ALL cp -v "misc/bits/syscall.h" \ - "${CT_HEADERS_DIR}/bits/syscall.h" - else - # "Old" glibces do not have the above file, - # but provide this one: - CT_DoExecLog ALL cp -v "misc/syscall-list.h" \ - "${CT_HEADERS_DIR}/bits/syscall.h" - fi - ;; - esac - fi + # Two headers -- stubs.h and features.h -- aren't installed by install-headers, + # so do them by hand. We can tolerate an empty stubs.h for the moment. + # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html + mkdir -p "${CT_HEADERS_DIR}/gnu" + CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h" + CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc/include/features.h" \ + "${CT_HEADERS_DIR}/features.h" + + # Building the bootstrap gcc requires either setting inhibit_libc, or + # having a copy of stdio_lim.h... see + # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html + CT_DoExecLog ALL cp -v bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h" + + # Following error building gcc-4.0.0's gcj: + # error: bits/syscall.h: No such file or directory + # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html + # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html + # Of course, only copy it if it does not already exist + case "${CT_ARCH}" in + arm) ;; + *) if [ -f "${CT_HEADERS_DIR}/bits/syscall.h" ]; then + CT_DoLog ALL "Not over-writing existing bits/syscall.h" + elif [ -f "misc/bits/syscall.h" ]; then + CT_DoExecLog ALL cp -v "misc/bits/syscall.h" \ + "${CT_HEADERS_DIR}/bits/syscall.h" + else + # "Old" glibces do not have the above file, + # but provide this one: + CT_DoExecLog ALL cp -v "misc/syscall-list.h" \ + "${CT_HEADERS_DIR}/bits/syscall.h" + fi + ;; + esac elif [ "${libc_mode}" = "final" -a -r "${multi_root}/.libc_headers_installed" ]; then CT_DoExecLog ALL rm -f "${multi_root}/.libc_headers_installed" fi # installing headers diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index af078889..599283e3 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -224,13 +224,13 @@ manage_uClibc_config() { CT_DoExecLog ALL cp "${src}" "${dst}" case "${CT_ARCH_ENDIAN}" in - big) + big|big,little) CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${dst}" CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}" CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${dst}" CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" ;; - little) + little|little,big) CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${dst}" CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${dst}" |