You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/11 15:42:31 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request, #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

anchao opened a new pull request, #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284

   ## Summary
   
   tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022
   
   https://gcc.gnu.org/gcc-11/changes.html
   
   ## Impact
   
   N/A
   
   ## Testing
   Ci check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284#issuecomment-1275092828

   Seems recently we merged PR with wrong logic
   ```
   Error: ./misc/lib_impure.c:48:28: error: token "@" is not valid in preprocessor expressions
      48 |    (defined(__NEWLIB__) || __NEWLIB__ < 4 || \
   ```
   need to be
   ```
   #if defined(_REENT_SMALL) && \
      (defined(__NEWLIB__) && (__NEWLIB__ < 4 || \
       __NEWLIB__ == 4 && __NEWLIB_MINOR__ < 2))
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
anchao commented on PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284#issuecomment-1275697599

   > Anyway statement `defined(__NEWLIB__) || __NEWLIB__ < 4` seems to be wrong. If `__NEWLIB__` is not defined the `__NEWLIB__ < 4` will be evaluated and will produce compiler warning. So I think we should perform `__NEWLIB__` and `__NEWLIB_MINOR__` evaluation by preprocessor only if `__NEWLIB__` is defined.
   
   Thanks, please review this PR:
   https://github.com/apache/incubator-nuttx/pull/7289


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284#discussion_r993064760


##########
tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch:
##########
@@ -0,0 +1,38 @@
+From 819ab4ac433b809fdaca33246e2bffa1426acc0f Mon Sep 17 00:00:00 2001
+From: chao an <an...@xiaomi.com>
+Date: Tue, 11 Oct 2022 15:27:37 +0800
+Subject: [PATCH] arm-none-eabi: workaround for newlib version break
+
+Signed-off-by: chao an <an...@xiaomi.com>
+---
+ arm-none-eabi/include/_newlib_version.h | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/arm-none-eabi/include/_newlib_version.h gcc-arm-none-eabi/arm-none-eabi/include/_newlib_version.h
+index 0dbf962e..c5d2be6d 100644
+--- a/arm-none-eabi/include/_newlib_version.h
++++ gcc-arm-none-eabi/arm-none-eabi/include/_newlib_version.h
+@@ -3,16 +3,9 @@
+ #ifndef _NEWLIB_VERSION_H__
+ #define _NEWLIB_VERSION_H__ 1
+
+-/* The newlib version in string format. */
+-#define _NEWLIB_VERSION "@NEWLIB_VERSION@"
+-
+-/* The newlib major version number. */
+-#define __NEWLIB__ @NEWLIB_MAJOR_VERSION@
+-
+-/* The newlib minor version number. */
+-#define __NEWLIB_MINOR__ @NEWLIB_MINOR_VERSION@
+-
+-/* The newlib patch level. */
+-#define __NEWLIB_PATCHLEVEL__ @NEWLIB_PATCHLEVEL_VERSION@
++#define _NEWLIB_VERSION "4.2.0"
++#define __NEWLIB__ 4
++#define __NEWLIB_MINOR__ 2

Review Comment:
   But the link that you shared states `__NEWLIB_MINOR__ 1`, so why we have 2 here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284#discussion_r993079572


##########
tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch:
##########
@@ -0,0 +1,38 @@
+From 819ab4ac433b809fdaca33246e2bffa1426acc0f Mon Sep 17 00:00:00 2001
+From: chao an <an...@xiaomi.com>
+Date: Tue, 11 Oct 2022 15:27:37 +0800
+Subject: [PATCH] arm-none-eabi: workaround for newlib version break
+
+Signed-off-by: chao an <an...@xiaomi.com>
+---
+ arm-none-eabi/include/_newlib_version.h | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/arm-none-eabi/include/_newlib_version.h gcc-arm-none-eabi/arm-none-eabi/include/_newlib_version.h
+index 0dbf962e..c5d2be6d 100644
+--- a/arm-none-eabi/include/_newlib_version.h
++++ gcc-arm-none-eabi/arm-none-eabi/include/_newlib_version.h
+@@ -3,16 +3,9 @@
+ #ifndef _NEWLIB_VERSION_H__
+ #define _NEWLIB_VERSION_H__ 1
+
+-/* The newlib version in string format. */
+-#define _NEWLIB_VERSION "@NEWLIB_VERSION@"
+-
+-/* The newlib major version number. */
+-#define __NEWLIB__ @NEWLIB_MAJOR_VERSION@
+-
+-/* The newlib minor version number. */
+-#define __NEWLIB_MINOR__ @NEWLIB_MINOR_VERSION@
+-
+-/* The newlib patch level. */
+-#define __NEWLIB_PATCHLEVEL__ @NEWLIB_PATCHLEVEL_VERSION@
++#define _NEWLIB_VERSION "4.2.0"
++#define __NEWLIB__ 4
++#define __NEWLIB_MINOR__ 2

Review Comment:
   gcc10.3 uses newlib 4.1 , gcc 11.3 uses newlib 4.2



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] anchao commented on pull request #7284: tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022

Posted by GitBox <gi...@apache.org>.
anchao commented on PR #7284:
URL: https://github.com/apache/incubator-nuttx/pull/7284#issuecomment-1275516392

   > Seems recently we merged PR with wrong logic
   
   This is a toolchain bug, it seems that the release of arm-none-eabi-gcc 11-12 did not replace the newlib version macro properly, I think we need prepare a workaround patch for ci flow.
   
   https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org