Skip to content

Commit a3acf28

Browse files
Use full-fat newlib printf, 4.4.0+ broke stdc++ (#70)
Newlib 4.4.0 and beyond broke linking when nana-printf was used with the stdc++ library, with linking errors related to swprintf and fputwc. Move to the full printf implementation which doesn't allow removing float support (but we always enable it anyway) and adds about 20K to the build process.
1 parent 2025447 commit a3acf28

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

Makefile

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,7 @@ NEWLIB_BRANCH := newlib-4.5.0
4040

4141
# Depending on the GCC version get proper branch and support libs
4242
GNUHTTP := https://gcc.gnu.org/pub/gcc/infrastructure
43-
ifeq ($(GCC), 6.3)
44-
ISL := 0.16.1
45-
GCC_BRANCH := releases/gcc-6.3.0
46-
GCC_PKGREL := 60300
47-
GCC_REPO := https://gcc.gnu.org/git/gcc.git
48-
GCC_DIR := gcc-gnu
49-
BINUTILS_BRANCH := binutils-2_32
50-
BINUTILS_REPO := https://sourceware.org/git/binutils-gdb.git
51-
BINUTILS_DIR := binutils-gdb-gnu
52-
NEWLIB_BRANCH := newlib-2_4_0
53-
else ifeq ($(GCC), 9.3)
54-
ISL := 0.18
55-
GCC_BRANCH := releases/gcc-9.3.0
56-
GCC_PKGREL := 90300
57-
GCC_REPO := https://gcc.gnu.org/git/gcc.git
58-
GCC_DIR := gcc-gnu
59-
BINUTILS_BRANCH := binutils-2_32
60-
BINUTILS_REPO := https://sourceware.org/git/binutils-gdb.git
61-
BINUTILS_DIR := binutils-gdb-gnu
62-
else ifeq ($(GCC), 10.2)
43+
ifeq ($(GCC), 10.2)
6344
ISL := 0.18
6445
GCC_BRANCH := releases/gcc-10.2.0
6546
GCC_PKGREL := 100200
@@ -159,7 +140,7 @@ else ifeq ($(GCC), 14.3)
159140
BINUTILS_REPO := https://sourceware.org/git/binutils-gdb.git
160141
BINUTILS_DIR := binutils-gdb-gnu
161142
else
162-
$(error Need to specify a supported GCC version "GCC={9.3, 10.2, 10.3, 12.1}")
143+
$(error Need to specify a supported GCC version "GCC={10.2, 10.3, 12.1}")
163144
endif
164145

165146
# Define the build and output naming, don't use directly (see below)
@@ -337,15 +318,10 @@ configure += $(call over,$(1))
337318
CONFIGURENEWLIBCOM = --with-newlib
338319
CONFIGURENEWLIBCOM += --disable-newlib-io-c99-formats
339320
CONFIGURENEWLIBCOM += --disable-newlib-supplied-syscalls
340-
CONFIGURENEWLIBCOM += --enable-newlib-nano-formatted-io
341-
CONFIGURENEWLIBCOM += --disable-newlib-wide-orient
342321
CONFIGURENEWLIBCOM += --enable-newlib-reent-small
343322
CONFIGURENEWLIBCOM += --disable-target-optspace
344323
CONFIGURENEWLIBCOM += --disable-option-checking
345-
#CONFIGURENEWLIBCOM += --target=$(ARCH)
346324
CONFIGURENEWLIBCOM += --disable-shared
347-
#CONFIGURENEWLIBCOM += --with-cpu=cortex-m0plus
348-
#CONFIGURENEWLIBCOM += --with-no-thumb-interwork
349325
CONFIGURENEWLIBCOM += --enable-newlib-retargetable-locking
350326

351327
# OpenOCD configuration

0 commit comments

Comments
 (0)