From fa1fdc4cc2b77834d3e1f9b10232e17fdf08e5a5 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:01:31 +0900 Subject: [PATCH 01/14] Support newlib retargetable locking configuration This commit adds a patch for supporting the newlib retargetable locking configuration in the crosstool-ng. The patch is derived from the upstream pull request for the retargetable locking configuration (crosstool-ng/crosstool-ng#1284) cherry-picked on top of the newlib nano variant pull request (crosstool-ng/crosstool-ng#1279). The work branch for this patch is available at the following location: stephanosio/crosstool-ng/newlib_nano_variant_with_retargetable_locking Signed-off-by: Stephanos Ioannidis --- ...d-newlib-nano-variant-configurations.patch | 2 +- ...Support-building-newlib-nano-variant.patch | 2 +- ...upport-building-libstdc-nano-variant.patch | 2 +- ...ault-for-building-gcc-target-librari.patch | 2 +- ...stripping-target-toolchain-libraries.patch | 2 +- ...b-retargetable-locking-configuration.patch | 61 +++++++++++++++++++ 6 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 patches/0006-Add-newlib-retargetable-locking-configuration.patch diff --git a/patches/0001-Add-newlib-nano-variant-configurations.patch b/patches/0001-Add-newlib-nano-variant-configurations.patch index a865f0cc..873437d2 100644 --- a/patches/0001-Add-newlib-nano-variant-configurations.patch +++ b/patches/0001-Add-newlib-nano-variant-configurations.patch @@ -1,7 +1,7 @@ From 62f28beb597e8299a79add217281143fc6cb5ac2 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 28 Nov 2019 23:32:10 +0900 -Subject: [PATCH 1/5] Add newlib nano variant configurations +Subject: [PATCH 1/6] Add newlib nano variant configurations This commit adds the new configuration option 'LIBC_NANO_NEWLIB' for specifying the additional 'nano' variant of newlib to be built. diff --git a/patches/0002-Support-building-newlib-nano-variant.patch b/patches/0002-Support-building-newlib-nano-variant.patch index 2ef54913..58a14f22 100644 --- a/patches/0002-Support-building-newlib-nano-variant.patch +++ b/patches/0002-Support-building-newlib-nano-variant.patch @@ -1,7 +1,7 @@ From c7e4eafab9bd940058ce38ca0484dd897c6202c1 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 29 Nov 2019 01:35:57 +0900 -Subject: [PATCH 2/5] Support building newlib nano variant +Subject: [PATCH 2/6] Support building newlib nano variant This commit updates the newlib build script to build the additional newlib nano variant using the nano variant-specific build options. diff --git a/patches/0003-Support-building-libstdc-nano-variant.patch b/patches/0003-Support-building-libstdc-nano-variant.patch index ddf2dd06..5d48e42e 100644 --- a/patches/0003-Support-building-libstdc-nano-variant.patch +++ b/patches/0003-Support-building-libstdc-nano-variant.patch @@ -1,7 +1,7 @@ From 3fe25cedd9b6db08dcf1d990784dc3ab89c10e86 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 29 Nov 2019 20:44:21 +0900 -Subject: [PATCH 3/5] Support building libstdc++ nano variant +Subject: [PATCH 3/6] Support building libstdc++ nano variant This commit adds the new configuration option 'CC_GCC_LIBSTDCXX_NANO' for specifying the additional 'nano' variant of libstdc++ to be built diff --git a/patches/0004-Assume-O2-by-default-for-building-gcc-target-librari.patch b/patches/0004-Assume-O2-by-default-for-building-gcc-target-librari.patch index 5124d0b0..94ea557c 100644 --- a/patches/0004-Assume-O2-by-default-for-building-gcc-target-librari.patch +++ b/patches/0004-Assume-O2-by-default-for-building-gcc-target-librari.patch @@ -1,7 +1,7 @@ From 6a20aad951cd79b4141842f261b68614b10088d1 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Sat, 30 Nov 2019 01:42:18 +0900 -Subject: [PATCH 4/5] Assume '-O2' by default for building gcc target libraries +Subject: [PATCH 4/6] Assume '-O2' by default for building gcc target libraries The gcc target libraries (e.g. libstdc++) are currently built without any optimisation flag when 'CT_CC_GCC_ENABLE_TARGET_OPTSPACE' is not diff --git a/patches/0005-Allow-stripping-target-toolchain-libraries.patch b/patches/0005-Allow-stripping-target-toolchain-libraries.patch index 6800f5ed..148a091f 100644 --- a/patches/0005-Allow-stripping-target-toolchain-libraries.patch +++ b/patches/0005-Allow-stripping-target-toolchain-libraries.patch @@ -1,7 +1,7 @@ From 6fca4742a80e26ae00c1ca947e93ed20f8845714 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 29 Nov 2019 22:25:17 +0900 -Subject: [PATCH 5/5] Allow stripping target toolchain libraries +Subject: [PATCH 5/6] Allow stripping target toolchain libraries This commit adds an option to strip the target toolchain libraries (e.g. libc, libstdc++) of any unneeded or debugging information. diff --git a/patches/0006-Add-newlib-retargetable-locking-configuration.patch b/patches/0006-Add-newlib-retargetable-locking-configuration.patch new file mode 100644 index 00000000..f89eb900 --- /dev/null +++ b/patches/0006-Add-newlib-retargetable-locking-configuration.patch @@ -0,0 +1,61 @@ +From 968bf7d65812bba490c4222b3d05fa94cf856472 Mon Sep 17 00:00:00 2001 +From: Stephanos Ioannidis +Date: Fri, 20 Dec 2019 11:18:46 +0900 +Subject: [PATCH 6/6] Add newlib retargetable locking configuration + +This commit adds support for the newlib configuration option +'--enable-newlib-retargetable-locking'. + +Signed-off-by: Stephanos Ioannidis +--- + config/libc/newlib.in | 14 ++++++++++++++ + scripts/build/libc/newlib.sh | 1 + + 2 files changed, 15 insertions(+) + +diff --git a/config/libc/newlib.in b/config/libc/newlib.in +index bd193cd8..d84db70b 100644 +--- a/config/libc/newlib.in ++++ b/config/libc/newlib.in +@@ -152,6 +152,13 @@ config LIBC_NEWLIB_MULTITHREAD + help + Enable support for multiple threads. + ++config LIBC_NEWLIB_RETARGETABLE_LOCKING ++ bool ++ prompt "Enable retargetable locking" ++ help ++ Enable retargetable locking to allow the operating system to override ++ the dummy lock functions defined within the newlib. ++ + config LIBC_NEWLIB_EXTRA_SECTIONS + bool + prompt "Place each function & data element in their own section" +@@ -355,6 +362,13 @@ config LIBC_NANO_NEWLIB_MULTITHREAD + help + Enable support for multiple threads. + ++config LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING ++ bool ++ prompt "Enable retargetable locking" ++ help ++ Enable retargetable locking to allow the operating system to override ++ the dummy lock functions defined within the newlib. ++ + config LIBC_NANO_NEWLIB_EXTRA_SECTIONS + bool + prompt "Place each function & data element in their own section" +diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh +index ca53c7f8..299698ac 100644 +--- a/scripts/build/libc/newlib.sh ++++ b/scripts/build/libc/newlib.sh +@@ -220,6 +220,7 @@ GLOBAL_ATEXIT:newlib-global-atexit + LITE_EXIT:lite-exit + REENT_SMALL:newlib-reent-small + MULTITHREAD:newlib-multithread ++RETARGETABLE_LOCKING:newlib-retargetable-locking + WIDE_ORIENT:newlib-wide-orient + UNBUF_STREAM_OPT:newlib-unbuf-stream-opt + ENABLE_TARGET_OPTSPACE:target-optspace +-- +2.17.1 + From afac761262b77710fce847012e92c9ad4e3b5d9e Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:27:52 +0900 Subject: [PATCH 02/14] arc: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/arc.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/arc.config b/configs/arc.config index 93974d08..fa046ed7 100644 --- a/configs/arc.config +++ b/configs/arc.config @@ -17,6 +17,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -29,6 +30,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From ff5f6ff72ae95d1d70c549547e89f2ae8bc8ec3b Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:30:57 +0900 Subject: [PATCH 03/14] arm: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/arm.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/arm.config b/configs/arm.config index 172cfb4a..e09ebb41 100644 --- a/configs/arm.config +++ b/configs/arm.config @@ -17,6 +17,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -29,6 +30,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From b5b8b165d71f862152ac68e4dee762acd91890fd Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:31:16 +0900 Subject: [PATCH 04/14] arm64: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/arm64.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/arm64.config b/configs/arm64.config index 7c662d90..0ef81f19 100644 --- a/configs/arm64.config +++ b/configs/arm64.config @@ -17,6 +17,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -29,6 +30,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From 0b9dfb16b6b14af08865550bf79e385d374d0e30 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:31:33 +0900 Subject: [PATCH 05/14] i586: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/i586.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/i586.config b/configs/i586.config index 51fe7877..68f2309a 100644 --- a/configs/i586.config +++ b/configs/i586.config @@ -18,6 +18,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -30,6 +31,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From bdb38f91c94ee91aeeb94c1cfb8f967f9a3cfe66 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:31:46 +0900 Subject: [PATCH 06/14] iamcu: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/iamcu.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/iamcu.config b/configs/iamcu.config index ce2c33ae..adc08e6b 100644 --- a/configs/iamcu.config +++ b/configs/iamcu.config @@ -18,6 +18,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -30,6 +31,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From 0e21bb9101b7580de20a17450454d577df1e0b04 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:32:00 +0900 Subject: [PATCH 07/14] mips: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/mips.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/mips.config b/configs/mips.config index 7cff664a..d7289cc8 100644 --- a/configs/mips.config +++ b/configs/mips.config @@ -16,6 +16,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -28,6 +29,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From d0721a73bff6cf6b85499485e7f35fd30ea73595 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:32:13 +0900 Subject: [PATCH 08/14] nios2: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/nios2.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/nios2.config b/configs/nios2.config index 494a993c..21ca2ead 100644 --- a/configs/nios2.config +++ b/configs/nios2.config @@ -17,6 +17,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -29,6 +30,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From fd53164ba3e02cb5b1b629ded5f06d916558ad4b Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:32:25 +0900 Subject: [PATCH 09/14] riscv64: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/riscv64.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/riscv64.config b/configs/riscv64.config index b0dfc1fe..e00e7e43 100644 --- a/configs/riscv64.config +++ b/configs/riscv64.config @@ -20,6 +20,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -32,6 +33,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From d7ab597a20d806d934cb85a84b582e6634d3b84f Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:32:39 +0900 Subject: [PATCH 10/14] sparc: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/sparc.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/sparc.config b/configs/sparc.config index c4dcc10d..7cf5497f 100644 --- a/configs/sparc.config +++ b/configs/sparc.config @@ -16,6 +16,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -28,6 +29,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From 379d5dfa3391995c219c0f03d2989b90d79d2a3e Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:32:51 +0900 Subject: [PATCH 11/14] x86_64: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/x86_64-zephyr-elf.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/x86_64-zephyr-elf.config b/configs/x86_64-zephyr-elf.config index bcfad790..1062b1ba 100644 --- a/configs/x86_64-zephyr-elf.config +++ b/configs/x86_64-zephyr-elf.config @@ -16,6 +16,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -28,6 +29,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From e1d9fc26bf5a7df14f8f6f4853269b75181c9dfd Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:33:05 +0900 Subject: [PATCH 12/14] xtensa_intel_apl_adsp: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/xtensa_intel_apl_adsp.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/xtensa_intel_apl_adsp.config b/configs/xtensa_intel_apl_adsp.config index c4258a6b..5b97a949 100644 --- a/configs/xtensa_intel_apl_adsp.config +++ b/configs/xtensa_intel_apl_adsp.config @@ -23,6 +23,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -35,6 +36,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From 5889a1cd56d735e72f1aae756a9f2b9e67162a95 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:33:37 +0900 Subject: [PATCH 13/14] xtensa_intel_s1000: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/xtensa_intel_s1000.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/xtensa_intel_s1000.config b/configs/xtensa_intel_s1000.config index ff2f9e0c..8092cfb6 100644 --- a/configs/xtensa_intel_s1000.config +++ b/configs/xtensa_intel_s1000.config @@ -22,6 +22,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -34,6 +35,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y From ad9dd89f775bd84226ed65c4173523e2627a773a Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 20 Dec 2019 12:33:52 +0900 Subject: [PATCH 14/14] xtensa_sample_controller: Enable newlib retargetable locking This commit enables the newlib retargetable locking option to allow the Zephyr operating system to override the dummy lock functions defined within the newlib. Signed-off-by: Stephanos Ioannidis --- configs/xtensa_sample_controller.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/xtensa_sample_controller.config b/configs/xtensa_sample_controller.config index 84d5ae75..e4aa41f2 100644 --- a/configs/xtensa_sample_controller.config +++ b/configs/xtensa_sample_controller.config @@ -22,6 +22,7 @@ CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NEWLIB_LITE_EXIT=y # CT_LIBC_NEWLIB_MULTITHREAD is not set +CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NEWLIB_WIDE_ORIENT is not set # CT_LIBC_NEWLIB_NANO_MALLOC is not set # CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set @@ -34,6 +35,7 @@ CT_LIBC_NANO_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_LIBC_NANO_NEWLIB_GLOBAL_ATEXIT=y CT_LIBC_NANO_NEWLIB_LITE_EXIT=y # CT_LIBC_NANO_NEWLIB_MULTITHREAD is not set +CT_LIBC_NANO_NEWLIB_RETARGETABLE_LOCKING=y # CT_LIBC_NANO_NEWLIB_WIDE_ORIENT is not set CT_LIBC_NANO_NEWLIB_NANO_MALLOC=y CT_LIBC_NANO_NEWLIB_NANO_FORMATTED_IO=y