Subject: [bug#73118] [PATCH v2 1/5] gnu: make-gcc-arm-none-eabi: reorder C++ native search paths

From: Rutherther <[email-masked]>
Date: Fri, 13 Sep 2024 11:41:57 +0000

This fixes native-search-paths of arm-none-eabi toolchains
The toolchains CROSS_CPLUS_INCLUDE_PATH had C include directory
first, and the C++ as second. Since <cstdlib> does #include_next <stdlib.h>,
the toolchains could not build anything using <cstdlib>. The C include
has to come later than C++ one. This is already fixed in xgcc search-path.

* gnu/packages/embedded.scm (make-gcc-arm-none-eabi-4.9,
make-gcc-arm-none-eabi-7-2018-q2-update): [native-search-paths]: Put C include
path as last.

Change-Id: Ib7e36e57e510ac87960375cad40ff0b9e749101c
---
 gnu/packages/embedded.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index bee65663b6..a7ba9ebe98 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -201,9 +201,9 @@ (define make-gcc-arm-none-eabi-4.9
                 (files '("arm-none-eabi/include")))
                (search-path-specification
                 (variable "CROSS_CPLUS_INCLUDE_PATH")
-                (files '("arm-none-eabi/include"
-                         "arm-none-eabi/include/c++"
-                         "arm-none-eabi/include/c++/arm-none-eabi")))
+                (files '("arm-none-eabi/include/c++"
+                         "arm-none-eabi/include/c++/arm-none-eabi"
+                         "arm-none-eabi/include")))
                (search-path-specification
                 (variable "CROSS_LIBRARY_PATH")
                 (files '("arm-none-eabi/lib")))))))))
@@ -423,9 +423,9 @@ (define make-gcc-arm-none-eabi-7-2018-q2-update
                        (files '("arm-none-eabi/include")))
                       (search-path-specification
                        (variable "CROSS_CPLUS_INCLUDE_PATH")
-                       (files '("arm-none-eabi/include"
-                                "arm-none-eabi/include/c++"
-                                "arm-none-eabi/include/c++/arm-none-eabi")))
+                       (files '("arm-none-eabi/include/c++"
+                                "arm-none-eabi/include/c++/arm-none-eabi"
+                                "arm-none-eabi/include")))
                       (search-path-specification
                        (variable "CROSS_LIBRARY_PATH")
                        (files '("arm-none-eabi/lib")))))))))
-- 
2.46.0