This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libc/newlib: add a config option allowing to disable builtin syscalls


Hi all,

Here's an attached patch to crosstool-ng that :

"Allows to choose if one wants to keep or not the syscalls that are
provided with
newlib. It passes the --disable-newlib-supplied-syscalls or
--enable-newlib-supplied-syscalls to the configure script. If one chooses to
disable the builtin syscalls, he/she will have to write his/her own.
This can
be usefull to port newlib to a new platform/board."

Regards,

Kévin PETIT
# HG changeset patch
# User Kévin PETIT <kpet@free.fr>
# Date 1314555146 -7200
# Node ID cb0f31fe253544349e72be36c0d4a4017e99d1dc
# Parent  e5078db4bd2c612dfd4d43b7a12dd35bf6ae0fbc
libc/newlib: add a config option allowing to disable builtin syscalls

Allows to choose if one wants to keep or not the syscalls that are provided with
newlib. It passes the --disable-newlib-supplied-syscalls or
--enable-newlib-supplied-syscalls to the configure script. If one chooses to
disable the builtin syscalls, he/she will have to write his/her own. This can
be usefull to port newlib to a new platform/board.

Signed-off-by: Kévin PETIT <kpet@free.fr>

diff -r e5078db4bd2c -r cb0f31fe2535 config/libc/newlib.in.2
--- a/config/libc/newlib.in.2	ven. août 26 00:07:51 2011 +0200
+++ b/config/libc/newlib.in.2	dim. août 28 20:12:26 2011 +0200
@@ -25,3 +25,13 @@
     depends on LIBC_NEWLIB_IO_FLOAT
     help
       Enable support for IOs on long doubles.
+
+config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
+    bool
+    prompt "Disable the syscalls supplied with newlib"
+    help
+      Disable the syscalls that come with newlib. You
+	  will have to implement your own _sbrk, _read,
+	  _write... If you plan to port newlib to a new
+	  platform/board, say Yes.
+
diff -r e5078db4bd2c -r cb0f31fe2535 scripts/build/libc/newlib.sh
--- a/scripts/build/libc/newlib.sh	ven. août 26 00:07:51 2011 +0200
+++ b/scripts/build/libc/newlib.sh	dim. août 28 20:12:26 2011 +0200
@@ -79,6 +79,11 @@
         newlib_opts+=( "--disable-newlib-io-float" )
         newlib_opts+=( "--disable-newlib-io-long-double" )
     fi
+    if [ "${CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS}" = "y" ]; then
+        newlib_opts+=( "--disable-newlib-supplied-syscalls" )
+    else
+        newlib_opts+=( "--enable-newlib-supplied-syscalls" )
+    fi
 
     # Note: newlib handles the build/host/target a little bit differently
     # than one would expect:

--
For unsubscribe information see http://sourceware.org/lists.html#faq

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]