diff options
author | Quentin Boswank <qubos@oulook.de> | 2023-08-12 20:11:58 +0200 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2023-08-14 16:12:12 +1200 |
commit | fd04f436170a208ae30fe42ab2f56b543b0b81c5 (patch) | |
tree | b6e4f7b589d6477a53a9e3055eaa9e9557568554 /scripts/build | |
parent | cd8a5b72b550f23a79b8d330bf57652a231df095 (diff) | |
download | crosstool-ng-fd04f436170a208ae30fe42ab2f56b543b0b81c5.tar.gz crosstool-ng-fd04f436170a208ae30fe42ab2f56b543b0b81c5.tar.bz2 crosstool-ng-fd04f436170a208ae30fe42ab2f56b543b0b81c5.zip |
Add option to re-enable ˋlibstdc++ˋ on avr targets.
Due to the small flash space on AVR devices the library containing the
standard types in C++ (ˋlibstdc++ˋ) does not get built normally when
enabling the C++ language support.
This option is an easy way to go back to the PC-way where ˋlibstdc++ˋ is
built.
Signed-off-by: Quentin Boswank <qubos@outlook.de>
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/gcc.sh | 2 | ||||
-rw-r--r-- | scripts/build/libc/avr-libc.sh | 68 |
2 files changed, 52 insertions, 18 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index f14f31da..275e239c 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -1052,6 +1052,8 @@ do_gcc_backend() { if [ "${build_libstdcxx}" = "no" ]; then extra_config+=(--disable-libstdcxx) + elif [ "${CT_CC_GCC_EXTRA_LIBSTDCXX}" = "y" ]; then + extra_config+=(--enable-libstdcxx) fi if [ "${CT_LIBC_PICOLIBC}" = "y" ]; then diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh index 34eb0f55..c13ae39b 100644 --- a/scripts/build/libc/avr-libc.sh +++ b/scripts/build/libc/avr-libc.sh @@ -2,28 +2,60 @@ avr_libc_post_cc() { - CT_DoStep INFO "Installing C library" + if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then + CT_DoStep INFO "Installing C library" - CT_DoLog EXTRA "Copying sources to build directory" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc/." \ - "${CT_BUILD_DIR}/build-libc-post-cc" - cd "${CT_BUILD_DIR}/build-libc-post-cc" + CT_DoLog EXTRA "Copying sources to build directory" + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc/." \ + "${CT_BUILD_DIR}/build-libc-post-cc" + cd "${CT_BUILD_DIR}/build-libc-post-cc" - CT_DoLog EXTRA "Configuring C library" + CT_DoLog EXTRA "Configuring C library" - CT_DoExecLog CFG \ - ${CONFIG_SHELL} \ - ./configure \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=${CT_PREFIX_DIR} \ - "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}" + CT_DoExecLog CFG \ + ${CONFIG_SHELL} \ + ./configure \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=${CT_PREFIX_DIR} \ + "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}" - CT_DoLog EXTRA "Building C library" - CT_DoExecLog ALL make ${CT_JOBSFLAGS} + CT_DoLog EXTRA "Building C library" + CT_DoExecLog ALL make ${CT_JOBSFLAGS} - CT_DoLog EXTRA "Installing C library" - CT_DoExecLog ALL make install + CT_DoLog EXTRA "Installing C library" + CT_DoExecLog ALL make install - CT_EndStep + CT_EndStep + fi +} + +avr_libc_main() +{ + if [ "${CT_CC_CORE_PASS_2_NEEDED}" = "y" ]; then + CT_DoStep INFO "Installing C library" + + CT_DoLog EXTRA "Copying sources to build directory" + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc/." \ + "${CT_BUILD_DIR}/build-libc" + cd "${CT_BUILD_DIR}/build-libc" + + CT_DoLog EXTRA "Configuring C library" + + CT_DoExecLog CFG \ + ${CONFIG_SHELL} \ + ./configure \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=${CT_PREFIX_DIR} \ + "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}" + + CT_DoLog EXTRA "Building C library" + CT_DoExecLog ALL make ${CT_JOBSFLAGS} + + CT_DoLog EXTRA "Installing C library" + CT_DoExecLog ALL make install + + CT_EndStep + fi } |