forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libc: rework libc selection and reduce Kconfigs
Moved all libc Kconfigs to where the code is and remove the default Kconfig for selecting the minimal libc. Minimal libc is now the default if nothing else is configured in. Removed the options for extended libc, this obviously was restricting features in the minimal libc without a good reason, most of the functions are available directly when using newlib, so there is no reason why we need to restrict those in minimal libc. Jira: ZEP-1440 Change-Id: If0a3adf4314e2ebdf0e139dee3eb4f47ce07aa89 Signed-off-by: Anas Nashif <[email protected]>
- Loading branch information
Showing
36 changed files
with
57 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ source "lib/crypto/tinycrypt/Kconfig" | |
endmenu | ||
|
||
source "lib/iot/Kconfig" | ||
|
||
source "lib/libc/Kconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Kconfig - C library | ||
|
||
# | ||
# Copyright (c) 2016 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
menu "C Library" | ||
|
||
config NEWLIB_LIBC | ||
bool | ||
prompt "Build with newlib c library" | ||
help | ||
Build with newlib library. The newlib library is expected to be | ||
part of the SDK in this case. | ||
|
||
config NEWLIB_LIBC_FLOAT_PRINTF | ||
bool "Build with newlib float printf" | ||
default n | ||
depends on NEWLIB_LIBC | ||
help | ||
Build with floating point printf enabled. This will increase the size of | ||
the image. | ||
|
||
config NEWLIB_LIBC_FLOAT_SCANF | ||
bool "Build with newlib float scanf" | ||
default n | ||
depends on NEWLIB_LIBC | ||
help | ||
Build with floating point scanf enabled. This will increase the size of | ||
the image. | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
obj-$(CONFIG_MINIMAL_LIBC) += minimal/ | ||
obj-$(CONFIG_NEWLIB_LIBC) += newlib/ | ||
ifeq ($(CONFIG_NEWLIB_LIBC),y) | ||
obj-y += newlib/ | ||
else | ||
obj-y += minimal/ | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
obj-$(CONFIG_MINIMAL_LIBC_EXTENDED) += strtol.o strtoul.o atoi.o | ||
obj-y += strtol.o strtoul.o atoi.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
obj-y := string.o | ||
obj-$(CONFIG_MINIMAL_LIBC_EXTENDED) += strncasecmp.o strstr.o | ||
obj-y += string.o | ||
obj-y += strncasecmp.o strstr.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_BLUETOOTH_BREDR=y | ||
CONFIG_BLUETOOTH_RFCOMM=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_RANDOM_GENERATOR=y | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
CONFIG_BLUETOOTH=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
CONFIG_STDOUT_CONSOLE=y | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
|
||
CONFIG_SYS_LOG=y | ||
CONFIG_NET_LOG=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
CONFIG_STDOUT_CONSOLE=y | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
|
||
CONFIG_NETWORKING=y | ||
CONFIG_NET_IPV6=n | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
CONFIG_STDOUT_CONSOLE=y | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
|
||
CONFIG_NETWORKING=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_CONSOLE_HANDLER=y | ||
CONFIG_BLUETOOTH_DEBUG_LOG=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_CONSOLE_HANDLER=y | ||
CONFIG_BLUETOOTH_DEBUG_LOG=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_BLUETOOTH_BREDR=y | ||
CONFIG_BLUETOOTH_RFCOMM=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_BLUETOOTH_CUSTOM=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_BLUETOOTH=y | ||
CONFIG_CONSOLE_HANDLER=y | ||
CONFIG_BLUETOOTH_DEBUG_LOG=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# Comment the following line if you want to try another libc | ||
CONFIG_MINIMAL_LIBC_EXTENDED=y | ||
CONFIG_HTTP_PARSER=y | ||
# Enable strict parser by uncommenting the following line | ||
# CONFIG_HTTP_PARSER_STRICT=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
CONFIG_DEBUG=y | ||
CONFIG_STDOUT_CONSOLE=y | ||
CONFIG_NEWLIB_LIBC=y | ||
CONFIG_MINIMAL_LIBC=n | ||
|