Я пытаюсь обновить нашу древнюю встроенную систему, и первым шагом является использование Crosstool-ng вместо crosstool. Версия ядра нашего хоста - 2.6.22, а версия g cc на хосте - 4.2.1. Мы используем g cc 3.3.6, kernel, 2.6.12, glib c 2.3.6 и binutils 2.15 для сборки нашего кросс-компилятора с помощью crosstool. Я установил старую версию crosstool-ng (0.0.5) и с той же конфигурацией, но всегда получаю одну и ту же ошибку при сборке ядра компилятора Stati c:
[ALL ] In file included from ./tm.h:11,
[ALL ] from /crosstool-ng/targets/src/gcc-3.4.0/gcc/libgcc2.c:43:
[ALL ] crosstool-ng/targets/src/gcc-3.4.0/gcc/config/i386/linux.h:217:20: signal.h: No such file or directory
[ALL ] crosstool-ng/targets/src/gcc-3.4.0/gcc/config/i386/linux.h:218:26: sys/ucontext.h: No such file or directory
[ALL ] make[3]: *** [libgcc/./_muldi3.o] Error 1
Я изменил crosstool- нг версия, но это не помогает. Я заметил, что если я использую ag cc новее, чем 4.1.1, то ошибки не будет. Но при сборке библиотеки c сборка взломает sh, кроме того, мы используем библиотеку, созданную g cc 3.6.6. Кто-нибудь знает кто в чем проблема?
Вот файл .config, созданный crosstool-ng после menuconfig:
#
# Automatically generated make config: don't edit
# crosstool-NG version: 0.0.5
# Thu Jan 30 21:52:59 2020
#
# CT_FOOBAR is not set
#
# Paths and misc options
#
#
# Crosstool-ng behavior
#
CT_EXPERIMENTAL=y
CT_OBSOLETE=y
# CT_DEBUG_CT is not set
#
# Build behavior
#
CT_PARALLEL_JOBS=1
CT_LOAD=0
CT_NICE=0
CT_USE_PIPES=y
#
# Paths
#
CT_LOCAL_TARBALLS_DIR=""
CT_PREFIX_DIR="${CT_TOP_DIR}/output/gcc-3.4-glibc-2.5/${CT_TARGET}"
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
# CT_CUSTOM_PATCH is not set
# CT_REMOVE_DOCS is not set
# CT_INSTALL_DIR_RO is not set
#
# Downloading
#
# CT_FORCE_DOWNLOAD is not set
# CT_ONLY_DOWNLOAD is not set
#
# Extracting
#
# CT_FORCE_EXTRACT is not set
# CT_ONLY_EXTRACT is not set
#
# Logging
#
# CT_LOG_ERROR is not set
# CT_LOG_WARN is not set
# CT_LOG_INFO is not set
# CT_LOG_EXTRA is not set
# CT_LOG_DEBUG is not set
CT_LOG_ALL=y
CT_LOG_LEVEL_MAX="ALL"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_TO_FILE=y
# CT_LOG_FILE_COMPRESS is not set
#
# Target options
#
#
# General target options
#
CT_ARCH="x86"
# CT_ARCH_ARM is not set
# CT_ARCH_MIPS is not set
CT_ARCH_x86=y
# CT_ARCH_x86_64 is not set
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
#
# Target optimisations
#
CT_ARCH_ARCH="i586"
CT_ARCH_ABI=""
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
CT_ARCH_FPU=""
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_ARCH_SUPPORTS_LIBFLOAT=y
CT_TARGET_CFLAGS=""
#
# Toolchain options
#
#
# General toolchain options
#
CT_USE_SYSROOT=y
CT_SHARED_LIBS=y
CT_THREADS_NPTL=y
# CT_THREADS_LINUXTHREADS is not set
# CT_THREADS_NONE is not set
CT_THREADS="nptl"
# CT_TARGET_MULTILIB is not set
CT_TARGET_VENDOR="unknown"
CT_TARGET_ALIAS=""
#
# Toolchain type
#
# CT_NATIVE is not set
CT_CROSS=y
# CT_CROSS_NATIVE is not set
# CT_CANADIAN is not set
CT_TOOLCHAIN_TYPE="cross"
CT_BUILD=""
CT_CC_NATIVE="gcc3.3.6"
#
# Kernel
#
CT_KERNEL_LINUX=y
# CT_KERNEL_LINUX_HEADERS_INSTALL is not set
# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
# CT_KERNEL_LINUX_HEADERS_COPY is not set
CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR=y
CT_KERNEL="linux"
CT_KERNEL_LINUX_HEADERS_CUSTOM_DIR="${CT_TOP_DIR}/linux-2.6.12"
#
# binutils
#
CT_BINUTILS_VERSION="2.15"
# CT_BINUTILS_V_2_11_2 is not set
# CT_BINUTILS_V_2_13_90 is not set
# CT_BINUTILS_V_2_14 is not set
# CT_BINUTILS_V_2_14_90 is not set
# CT_BINUTILS_V_2_14_92 is not set
CT_BINUTILS_V_2_15=y
# CT_BINUTILS_V_2_15_90 is not set
# CT_BINUTILS_V_2_15_91 is not set
# CT_BINUTILS_V_2_16 is not set
# CT_BINUTILS_V_2_16_1 is not set
# CT_BINUTILS_V_2_17 is not set
# CT_BINUTILS_V_2_17_50_0_1 is not set
# CT_BINUTILS_V_2_17_50_0_2 is not set
# CT_BINUTILS_V_2_17_50_0_3 is not set
# CT_BINUTILS_V_2_17_50_0_4 is not set
# CT_BINUTILS_V_2_17_50_0_5 is not set
# CT_BINUTILS_V_2_17_50_0_6 is not set
# CT_BINUTILS_V_2_17_50_0_7 is not set
# CT_BINUTILS_V_2_17_50_0_8 is not set
# CT_BINUTILS_V_2_17_50_0_9 is not set
# CT_BINUTILS_V_2_17_50_0_10 is not set
# CT_BINUTILS_V_2_17_50_0_11 is not set
# CT_BINUTILS_V_2_17_50_0_12 is not set
# CT_BINUTILS_V_2_17_50_0_13 is not set
# CT_BINUTILS_V_2_17_50_0_14 is not set
# CT_BINUTILS_V_2_17_50_0_15 is not set
# CT_BINUTILS_V_2_17_50_0_16 is not set
CT_BINUTILS_EXTRA_CONFIG=""
#
# C compiler
#
#
# Core C Compiler (used to build the C library)
#
CT_CC_USE_CORE=y
CT_CC_CORE_GCC=y
CT_CC_CORE_VERSION="4.1.1"
CT_CC_CORE="gcc"
# CT_CC_CORE_V_2_95_3 is not set
# CT_CC_CORE_V_3_2_3 is not set
# CT_CC_CORE_V_3_3 is not set
# CT_CC_CORE_V_3_3_1 is not set
# CT_CC_CORE_V_3_3_2 is not set
# CT_CC_CORE_V_3_3_3 is not set
# CT_CC_CORE_V_3_3_4 is not set
# CT_CC_CORE_V_3_3_5 is not set
# CT_CC_CORE_V_3_3_6 is not set
# CT_CC_CORE_V_3_4_0 is not set
# CT_CC_CORE_V_3_4_1 is not set
# CT_CC_CORE_V_3_4_2 is not set
# CT_CC_CORE_V_3_4_3 is not set
# CT_CC_CORE_V_3_4_4 is not set
# CT_CC_CORE_V_3_4_5 is not set
# CT_CC_CORE_V_3_4_6 is not set
# CT_CC_CORE_V_4_0_0 is not set
# CT_CC_CORE_V_4_0_1 is not set
# CT_CC_CORE_V_4_0_2 is not set
# CT_CC_CORE_V_4_0_3 is not set
# CT_CC_CORE_V_4_0_4 is not set
# CT_CC_CORE_V_4_1_0 is not set
CT_CC_CORE_V_4_1_1=y
# CT_CC_CORE_V_4_1_2 is not set
# CT_CC_CORE_V_4_2_0 is not set
CT_CC_CORE_EXTRA_CONFIG=""
#
# Final C compiler
#
CT_CC_GCC=y
CT_CC_VERSION="3.3.6"
CT_CC="gcc"
# CT_CC_V_2_95_3 is not set
# CT_CC_V_3_2_3 is not set
# CT_CC_V_3_3 is not set
# CT_CC_V_3_3_1 is not set
# CT_CC_V_3_3_2 is not set
# CT_CC_V_3_3_3 is not set
# CT_CC_V_3_3_4 is not set
# CT_CC_V_3_3_5 is not set
CT_CC_V_3_3_6=y
# CT_CC_V_3_4_0 is not set
# CT_CC_V_3_4_1 is not set
# CT_CC_V_3_4_2 is not set
# CT_CC_V_3_4_3 is not set
# CT_CC_V_3_4_4 is not set
# CT_CC_V_3_4_5 is not set
# CT_CC_V_3_4_6 is not set
# CT_CC_V_4_0_0 is not set
# CT_CC_V_4_0_1 is not set
# CT_CC_V_4_0_2 is not set
# CT_CC_V_4_0_3 is not set
# CT_CC_V_4_0_4 is not set
# CT_CC_V_4_1_0 is not set
# CT_CC_V_4_1_1 is not set
# CT_CC_V_4_1_2 is not set
# CT_CC_V_4_2_0 is not set
CT_CC_CXA_ATEXIT=y
CT_CC_EXTRA_CONFIG=""
CT_CC_SUPPORT_CXX=y
CT_CC_SUPPORT_FORTRAN=y
CT_CC_SUPPORT_JAVA=y
CT_CC_SUPPORT_ADA=y
CT_CC_SUPPORT_OBJC=y
CT_CC_SUPPORT_OBJCXX=y
#
# Additionnal supported languages:
#
CT_CC_LANG_CXX=y
# CT_CC_LANG_FORTRAN is not set
# CT_CC_LANG_JAVA is not set
# CT_CC_LANG_ADA is not set
# CT_CC_LANG_OBJC is not set
# CT_CC_LANG_OBJCXX is not set
CT_CC_LANG_OTHERS=""
#
# C-library
#
CT_LIBC_GLIBC=y
# CT_LIBC_UCLIBC is not set
CT_LIBC_VERSION="2.3.6"
CT_LIBC="glibc"
CT_LIBC_SUPPORT_NPTL=y
CT_LIBC_SUPPORT_LINUXTHREADS=y
# CT_LIBC_V_1_09_1 is not set
# CT_LIBC_V_2_0_1 is not set
# CT_LIBC_V_2_0_6 is not set
# CT_LIBC_V_2_1_1 is not set
# CT_LIBC_V_2_1_2 is not set
# CT_LIBC_V_2_1_3 is not set
# CT_LIBC_V_2_2 is not set
# CT_LIBC_V_2_2_1 is not set
# CT_LIBC_V_2_2_2 is not set
# CT_LIBC_V_2_2_3 is not set
# CT_LIBC_V_2_2_4 is not set
# CT_LIBC_V_2_2_5 is not set
# CT_LIBC_V_2_3 is not set
# CT_LIBC_V_2_3_1 is not set
# CT_LIBC_V_2_3_2 is not set
# CT_LIBC_V_2_3_3 is not set
# CT_LIBC_V_2_3_4 is not set
# CT_LIBC_V_2_3_5 is not set
CT_LIBC_V_2_3_6=y
# CT_LIBC_V_2_4 is not set
# CT_LIBC_V_2_5 is not set
CT_LIBC_GLIBC_EXTRA_CONFIG="--enable-kernel=2.6.12"
CT_LIBC_GLIBC_EXTRA_CFLAGS=""
CT_LIBC_EXTRA_CC_ARGS=""
CT_LIBC_GLIBC_CONFIGPARMS=""
# CT_LIBC_GLIBC_USE_PORTS is not set
# CT_LIBC_ADDONS is not set
#
# Tools facilities
#
# CT_SSTRIP is not set
#
# Debug facilities
#
# CT_DMALLOC is not set
# CT_GDB is not set