Subject: [PATCH v5 1/2] gnu: gcc-arm-none-eabi: Fix C++ header location

From: [email-masked]
Date: Wed, 7 Apr 2021 15:09:46 -0400

From: Morgan Smith <[email-masked]>

* gnu/packages/embedded.scm (gcc-arm-none-eabi-4.9)[native-search-paths]:
Add C++ header locations

* gnu/packages/embedded.scm (gcc-arm-none-eabi-7-2018-q2-update)[native-search-paths]:
Add C++ header locations

* gnu/packages/embedded.scm (make-libstdc++-arm-none-eabi)[arguments]: Change
C++ header install location to include/c++

Previously the C++ headers where installed in the include folder, overwriting
some C headers
---
 gnu/packages/embedded.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 413760ab72..a3f1d85580 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -147,7 +147,9 @@ (define-public gcc-arm-none-eabi-4.9
               (files '("arm-none-eabi/include")))
              (search-path-specification
               (variable "CROSS_CPLUS_INCLUDE_PATH")
-              (files '("arm-none-eabi/include")))
+              (files '("arm-none-eabi/include"
+                       "arm-none-eabi/include/c++"
+                       "arm-none-eabi/include/c++/arm-none-eabi")))
              (search-path-specification
               (variable "CROSS_LIBRARY_PATH")
               (files '("arm-none-eabi/lib"))))))))
@@ -317,7 +319,9 @@ (define-public 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")))
+              (files '("arm-none-eabi/include"
+                       "arm-none-eabi/include/c++"
+                       "arm-none-eabi/include/c++/arm-none-eabi")))
              (search-path-specification
               (variable "CROSS_LIBRARY_PATH")
               (files '("arm-none-eabi/lib"))))))))
@@ -380,7 +384,7 @@ (define (make-libstdc++-arm-none-eabi xgcc newlib)
              "--with-newlib"
              ,(string-append "--with-gxx-include-dir="
                              (assoc-ref %outputs "out")
-                             "/arm-none-eabi/include")))))
+                             "/arm-none-eabi/include/c++")))))
       (native-inputs
        `(("newlib" ,newlib)
          ("xgcc" ,xgcc)
-- 
2.31.1