* [RFC PATCH 0/1] Change newlib configuration to require libgloss
@ 2020-02-14 18:34 Mark Hatle
2020-02-14 18:34 ` [RFC PATCH 1/1] newlib: Move syscalls from newlib to libgloss Mark Hatle
0 siblings, 1 reply; 2+ messages in thread
From: Mark Hatle @ 2020-02-14 18:34 UTC (permalink / raw)
To: openembedded-core, raj.khem
This is an RFC, because I only know of my particular use-case. So I'm not
sure how generic of a change this really is.
In my own use-case, we want to build a generic newlib and then customize
our equivalent to libgloss when linking baremetal applications.
I found that if we don't pass --disable-newlib-supplied-syscalls, even if
libgloss was linked in, the syscalls -always- came from newlib (on 32-bit
arm) and would not permit my implementations to override the built-in
newlib versions.
By setting the disable in BOTH newlib an libgloss, newlib syscalls are
disabled, while libgloss syscalls are enabled. This results in a newlib
that will now require to be linked against a 'BSP' implementation, such
as libgloss, in order to build baremetal applications.
Alternatively to this I'd suggest we add pkgconfigs (or even distro
flags) to be able to change this behavior as well as flip some other
newlib switches if desired.
Mark Hatle (1):
newlib: Move syscalls from newlib to libgloss
meta/recipes-core/newlib/newlib.inc | 1 +
1 file changed, 1 insertion(+)
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC PATCH 1/1] newlib: Move syscalls from newlib to libgloss
2020-02-14 18:34 [RFC PATCH 0/1] Change newlib configuration to require libgloss Mark Hatle
@ 2020-02-14 18:34 ` Mark Hatle
0 siblings, 0 replies; 2+ messages in thread
From: Mark Hatle @ 2020-02-14 18:34 UTC (permalink / raw)
To: openembedded-core, raj.khem
By passing --disabled-newlib-supplied-syscalls, newlib will disable the
generation of builtin syscalls and move this to libgloss. (This also
affects the generation of crt0.o.)
libgloss SHOULD then provide the syscalls, crt0.o and other functions that
are no longer part of newlib itself. This now means that you must link
with both newlib and libgloss, whereas before newlib would run in many
configurations by itself.
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
meta/recipes-core/newlib/newlib.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc
index d7ac8bff17..5edea8aba1 100644
--- a/meta/recipes-core/newlib/newlib.inc
+++ b/meta/recipes-core/newlib/newlib.inc
@@ -42,6 +42,7 @@ EXTRA_OECONF = " \
--with-gnu-as \
--with-gnu-ld \
--disable-multilib \
+ --disable-newlib-supplied-syscalls \
"
do_configure[cleandirs] = "${B}"
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-14 18:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-14 18:34 [RFC PATCH 0/1] Change newlib configuration to require libgloss Mark Hatle
2020-02-14 18:34 ` [RFC PATCH 1/1] newlib: Move syscalls from newlib to libgloss Mark Hatle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.