diff options
author | Keith Packard <keithp@keithp.com> | 2023-02-12 23:20:44 -0800 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2023-03-08 16:54:12 +1300 |
commit | 9e13e83068afbc3b93728fa4512d8c199617be03 (patch) | |
tree | 92939b07e09cd307742dbbbf968c016f418d87b2 /scripts/build | |
parent | 90cbc880af2d979468b17529abf465b61b8433ae (diff) | |
download | crosstool-ng-9e13e83068afbc3b93728fa4512d8c199617be03.tar.gz crosstool-ng-9e13e83068afbc3b93728fa4512d8c199617be03.tar.bz2 crosstool-ng-9e13e83068afbc3b93728fa4512d8c199617be03.zip |
gcc: Add --disable-wchar_t and --enable-stdio=pure for picolibc
Picolibc needs two additional gcc build options so that libstdc++
works correctly. When building picolibc as a companion library, those
are added in do_cc_libstdcxx_picolibc, but when built with picolibc as
the main C libary, those need to be added in the main GCC build.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/gcc.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 6eeda28d..352f6518 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -392,6 +392,12 @@ do_gcc_core_backend() { extra_config+=(--disable-libstdcxx) fi + if [ "${CT_LIBC_PICOLIBC}" = "y" ]; then + extra_config+=("--with-default-libc=picolibc") + extra_config+=("--enable-stdio=pure") + extra_config+=("--disable-wchar_t") + fi + core_LDFLAGS+=("${ldflags}") # *** WARNING ! *** @@ -1043,6 +1049,12 @@ do_gcc_backend() { extra_config+=(--disable-libstdcxx) fi + if [ "${CT_LIBC_PICOLIBC}" = "y" ]; then + extra_config+=("--with-default-libc=picolibc") + extra_config+=("--enable-stdio=pure") + extra_config+=("--disable-wchar_t") + fi + final_LDFLAGS+=("${ldflags}") # *** WARNING ! *** |