[rtems-source-builder commit] newlib: Support --with/without-newlib-tls

Sebastian Huber sebh at rtems.org
Thu Jul 21 08:25:02 UTC 2022


Module:    rtems-source-builder
Branch:    master
Commit:    958de508aa141deb4c8a115560aeec80dbdad3e8
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=958de508aa141deb4c8a115560aeec80dbdad3e8

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jun 22 08:44:44 2022 +0200

newlib: Support --with/without-newlib-tls

This RSB option defines if the --enable-newlib-reent-thread-local
(_REENT_THREAD_LOCAL_STORAGE) Newlib configuration option is used or not.

Update #4560.

---

 source-builder/config/checks.cfg       | 9 +++++++++
 source-builder/config/gcc-common-1.cfg | 1 +
 2 files changed, 10 insertions(+)

diff --git a/source-builder/config/checks.cfg b/source-builder/config/checks.cfg
index 93d4c97..da1c1da 100644
--- a/source-builder/config/checks.cfg
+++ b/source-builder/config/checks.cfg
@@ -23,6 +23,8 @@
 %{?without_java:%define enable_java 0}
 %{?with_objc:%define enable_objc 1}
 %{?without_objc:%define enable_objc 0}
+%{?with_newlib_tls:%define enable_newlib_tls 1}
+%{?without_newlib_tls:%define enable_newlib_tls 0}
 
 #
 # Default to C++ on.
@@ -72,3 +74,10 @@
 %ifn %{defined enable_obsolete}
  %define enable_obsolete 0
 %endif
+
+#
+# Default to Newlib thread-local storage instead of struct _reent off.
+#
+%ifn %{defined enable_newlib_tls}
+ %define enable_newlib_tls 0
+%endif
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 694a1f3..0eb032b 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -192,6 +192,7 @@ URL: 	   http://gcc.gnu.org/
     --enable-version-specific-runtime-libs \
     --enable-newlib-io-c99-formats \
     %{?disable_MAKEINFO:MAKEINFO=missing} \
+    %{?enable_newlib_tls:--enable-newlib-reent-thread-local} \
     %{?with_iconv:--enable-newlib-iconv} \
     %{?with_iconv:--enable-newlib-iconv-encodings=%{_newlib_iconv_encodings}} \
     %{?with_threads:--enable-threads}%{!?with_threads:--disable-threads} \



More information about the vc mailing list