You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/10/16 06:17:00 UTC

[incubator-nuttx] branch revert-7299-22101301 created (now 5f506bb64c)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch revert-7299-22101301
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


      at 5f506bb64c Revert "Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022""

This branch includes the following new commits:

     new 5f506bb64c Revert "Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022""

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-nuttx] 01/01: Revert "Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022""

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch revert-7299-22101301
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5f506bb64cc192fb66418792ee85b51ac620844f
Author: Xiang Xiao <xi...@gmail.com>
AuthorDate: Sun Oct 16 14:16:54 2022 +0800

    Revert "Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022""
    
    This reverts commit 8150534a2f2faf5e65e4b7804475b1d55c9bea63.
---
 tools/ci/cibuild.sh                                | 14 ++++----
 tools/ci/docker/linux/Dockerfile                   |  7 ++--
 ...-eabi-workaround-for-newlib-version-break.patch | 38 ++++++++++++++++++++++
 3 files changed, 51 insertions(+), 8 deletions(-)

diff --git a/tools/ci/cibuild.sh b/tools/ci/cibuild.sh
index 73b1865890..e300b676fa 100755
--- a/tools/ci/cibuild.sh
+++ b/tools/ci/cibuild.sh
@@ -176,17 +176,19 @@ function arm-gcc-toolchain {
     local flavor
     case ${os} in
       Darwin)
-        flavor=mac
+        flavor=-darwin
         ;;
       Linux)
-        flavor=x86_64-linux
+        flavor=
         ;;
     esac
     cd "${prebuilt}"
-    wget --quiet https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-${flavor}.tar.bz2
-    tar jxf gcc-arm-none-eabi-10.3-2021.10-${flavor}.tar.bz2
-    mv gcc-arm-none-eabi-10.3-2021.10 gcc-arm-none-eabi
-    rm gcc-arm-none-eabi-10.3-2021.10-${flavor}.tar.bz2
+    wget --quiet https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
   fi
   arm-none-eabi-gcc --version
 }
diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index c74de6c7a3..c98dadf62c 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -18,6 +18,7 @@ FROM ubuntu:20.04 AS builder-base
 # This should only be used for temp build images that artifacts will be copied from
 RUN apt-get update -qq && apt-get install -y -qq \
   curl \
+  patch \
   xz-utils
 
 ###############################################################################
@@ -84,8 +85,10 @@ WORKDIR /tools
 FROM nuttx-toolchain-base AS nuttx-toolchain-arm
 # Download the latest ARM GCC toolchain prebuilt by ARM
 RUN mkdir gcc-arm-none-eabi && \
-  curl -s -L  "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" \
-  | tar -C gcc-arm-none-eabi --strip-components 1 -xj
+  curl -s -L  "https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz" \
+  | tar -C gcc-arm-none-eabi --strip-components 1 -xJ  \
+  && curl -s -L -O "https://raw.githubusercontent.com/apache/incubator-nuttx/master/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch" \
+  && patch -p0 < arm-none-eabi-workaround-for-newlib-version-break.patch
 
 ###############################################################################
 # Build image for tool required by ARM64 builds
diff --git a/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch b/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
new file mode 100644
index 0000000000..cd10db3c5f
--- /dev/null
+++ b/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
++#define __NEWLIB_PATCHLEVEL__ 0
+
+ #endif /* !_NEWLIB_VERSION_H__ */
+--
+2.25.1
+