[PATCH] gnu: gcc-arm-none-eabi: Fix C++ header location

  • Done
  • quality assurance status badge
Details
2 participants
  • Morgan.J.Smith
  • Efraim Flashner
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal

Debbugs page

Morgan.J.Smith wrote 4 years ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB36792B73BB3B7610CAFC3B50C5FF0@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/embedded.scm (gcc-arm-none-eabi-4.9)[native-search-paths]:
Change C++ header location to include/c++

* gnu/packages/embedded.scm (gcc-arm-none-eabi-7-2018-q2-update)[native-search-paths]:
Change C++ header location to include/c++

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

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

Toggle diff (41 lines)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index d6f487bd17..1af266e8cd 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -143,7 +144,7 @@
(files '("arm-none-eabi/include")))
(search-path-specification
(variable "CROSS_CPLUS_INCLUDE_PATH")
- (files '("arm-none-eabi/include")))
+ (files '("arm-none-eabi/include/c++")))
(search-path-specification
(variable "CROSS_LIBRARY_PATH")
(files '("arm-none-eabi/lib"))))))))
@@ -313,7 +314,7 @@ usable on embedded products.")
(files '("arm-none-eabi/include")))
(search-path-specification
(variable "CROSS_CPLUS_INCLUDE_PATH")
- (files '("arm-none-eabi/include")))
+ (files '("arm-none-eabi/include/c++")))
(search-path-specification
(variable "CROSS_LIBRARY_PATH")
(files '("arm-none-eabi/lib"))))))))
@@ -376,7 +377,7 @@ usable on embedded products.")
"--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.29.2
Morgan.J.Smith wrote 4 years ago
[PATCH v2] gnu: gcc-arm-none-eabi: Fix C++ header location
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB3679524A3D5D75B7656EA827C5F50@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

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

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

* 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
---

Apparently I needed to keep the original include directories as well. This
patch actually builds unlike the last one. I've successfully used the generated
arm-none-eabi to build a project that required stdlib.h (one of the headers
that got overridden)

---
gnu/packages/embedded.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (41 lines)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index d6f487bd17..73375a211d 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -143,7 +144,7 @@
(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++")))
(search-path-specification
(variable "CROSS_LIBRARY_PATH")
(files '("arm-none-eabi/lib"))))))))
@@ -313,7 +314,7 @@ usable on embedded products.")
(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++")))
(search-path-specification
(variable "CROSS_LIBRARY_PATH")
(files '("arm-none-eabi/lib"))))))))
@@ -376,7 +377,7 @@ usable on embedded products.")
"--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.29.2
Morgan.J.Smith wrote 4 years ago
I've done more testing
(address . 44750@debbugs.gnu.org)
SN4PR0801MB3679BC57386D45DE821FF023C5F50@SN4PR0801MB3679.namprd08.prod.outlook.com
So I had previously only tested this when it was in my profile. I decided to
check if other packages that depend on this worked. I determined that the
following packages depend on arm-none-eabi: axoloti-runtime, axoloti-patcher,
axoloti-patcher-next, arm-trusted-firmware-rk3399, rk3399-cortex-m0,
raspi-arm-chainloader.

With these two patches, everything builds for me except raspi-arm-chainloader
but according to this, that package never built:
Morgan.J.Smith wrote 4 years ago
[PATCH v3 1/2] gnu: gcc-arm-none-eabi: Fix C++ header location
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB3679CBA352404E435074D0F2C5F50@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* 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 | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index d6f487bd17..d2e2e6a676 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -143,7 +144,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"))))))))
@@ -313,7 +316,9 @@ usable on embedded products.")
(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"))))))))
@@ -376,7 +381,7 @@ usable on embedded products.")
"--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.29.2
Morgan.J.Smith wrote 4 years ago
[PATCH v3 2/2] gnu: axoloti-runtime: Update C++ header location
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
SN4PR0801MB3679E56852CA4452BC421BA2C5F50@SN4PR0801MB3679.namprd08.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/axoloti.scm (axoloti-runtime)[phase][build]: Update
arm-none-eabi C++ header locations
---
gnu/packages/axoloti.scm | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm
index 2a5cf8e0fc..580e18e894 100644
--- a/gnu/packages/axoloti.scm
+++ b/gnu/packages/axoloti.scm
@@ -142,13 +142,23 @@
;; Build Axoloti firmware with cross-compiler
(lambda* (#:key inputs #:allow-other-keys)
(let* ((toolchain (assoc-ref inputs "cross-toolchain"))
- (headers (string-append
- toolchain
- "/arm-none-eabi/include:"
- toolchain
- "/arm-none-eabi/include/arm-none-eabi/armv7e-m")))
- (setenv "CROSS_CPATH" headers)
- (setenv "CROSS_CPLUS_INCLUDE_PATH" headers)
+ (c-headers
+ (string-append
+ toolchain
+ "/arm-none-eabi/include:"
+ toolchain
+ "/arm-none-eabi/include/arm-none-eabi/armv7e-m"))
+ (c++-headers
+ (string-append
+ toolchain
+ "/arm-none-eabi/include/c++:"
+ toolchain
+ "/arm-none-eabi/include/c++/arm-none-eabi:"
+ toolchain
+ "/arm-none-eabi/include/arm-none-eabi/c++/arm-none-eabi/armv7e-m:"
+ c-headers)))
+ (setenv "CROSS_CPATH" c-headers)
+ (setenv "CROSS_CPLUS_INCLUDE_PATH" c++-headers)
(setenv "CROSS_LIBRARY_PATH"
(string-append toolchain
"/arm-none-eabi/lib")))
--
2.29.2
Morgan.J.Smith wrote 4 years ago
[PATCH v4] gnu: axoloti-runtime: Simplify build
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BYAPR05MB4023CCA3942F7B98CDB2CFCEC5759@BYAPR05MB4023.namprd05.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/axoloti.scm (axoloti-runtime)[arguments][phases][build]: Remove
unnecessary environment variable assignments
---
gnu/packages/axoloti.scm | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm
index 3049051486..0b12e4fe29 100644
--- a/gnu/packages/axoloti.scm
+++ b/gnu/packages/axoloti.scm
@@ -147,18 +147,7 @@ (define-public axoloti-runtime
(delete 'configure)
(replace 'build
;; Build Axoloti firmware with cross-compiler
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((toolchain (assoc-ref inputs "cross-toolchain"))
- (headers (string-append
- toolchain
- "/arm-none-eabi/include:"
- toolchain
- "/arm-none-eabi/include/arm-none-eabi/armv7e-m")))
- (setenv "CROSS_CPATH" headers)
- (setenv "CROSS_CPLUS_INCLUDE_PATH" headers)
- (setenv "CROSS_LIBRARY_PATH"
- (string-append toolchain
- "/arm-none-eabi/lib")))
+ (lambda _
(with-directory-excursion "platform_linux"
(invoke "sh" "compile_firmware.sh"))))
(replace 'install
--
2.31.1
Morgan.J.Smith wrote 4 years ago
[PATCH v5 1/2] gnu: gcc-arm-none-eabi: Fix C++ header location
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BYAPR05MB4023CFA59807A72976ABEE5AC5759@BYAPR05MB4023.namprd05.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* 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(-)

Toggle diff (37 lines)
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
Morgan.J.Smith wrote 4 years ago
[PATCH v5 2/2] gnu: axoloti-runtime: Simplify build
(address . 44750@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
BYAPR05MB4023D29D88F5C0295F235CD9C5759@BYAPR05MB4023.namprd05.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/axoloti.scm (axoloti-runtime)[arguments][phases][build]: Remove
unnecessary environment variable assignments
---
gnu/packages/axoloti.scm | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm
index 3049051486..0b12e4fe29 100644
--- a/gnu/packages/axoloti.scm
+++ b/gnu/packages/axoloti.scm
@@ -147,18 +147,7 @@ (define-public axoloti-runtime
(delete 'configure)
(replace 'build
;; Build Axoloti firmware with cross-compiler
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((toolchain (assoc-ref inputs "cross-toolchain"))
- (headers (string-append
- toolchain
- "/arm-none-eabi/include:"
- toolchain
- "/arm-none-eabi/include/arm-none-eabi/armv7e-m")))
- (setenv "CROSS_CPATH" headers)
- (setenv "CROSS_CPLUS_INCLUDE_PATH" headers)
- (setenv "CROSS_LIBRARY_PATH"
- (string-append toolchain
- "/arm-none-eabi/lib")))
+ (lambda _
(with-directory-excursion "platform_linux"
(invoke "sh" "compile_firmware.sh"))))
(replace 'install
--
2.31.1
Efraim Flashner wrote 4 years ago
Re: [bug#44750] [PATCH v5 1/2] gnu: gcc-arm-none-eabi: Fix C++ header location
(address . Morgan.J.Smith@outlook.com)(address . 44750-done@debbugs.gnu.org)
YG67AO1Q6E0hpXDK@3900XT
Pushed these two patches after testing the dependant packages still
build. Sorry for taking such a long time to return to them.

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBuuv0ACgkQQarn3Mo9
g1HRvBAAi4Ypci+cOLfzZ6I72dEvtaodt/KNVqdccurw2TIDAu+xUREU/NvT6/Er
gqMxTKDkYywxOdvlzRUzz0b+WCOLFiFbFh/Akaj5Z/5/SpkGyStNV66N3i8lzz06
DDC2mw1UlVwpkv63ONNLk3QEok83YNSrRCy2P3Yiu7Vyu7azcaVtZ7Ok49nocikU
tlqb7SmCA/uLgQ8UASp2DcM8ydHAVP6AU09Ak4C2BtE/C7dz8s1kuHh3pvTmRaIw
XA8hql343OdG0uss3XY1vdPzzBF9Il3yd227L0JkjFNP7gbdA710q/fGUaUrMvMV
dY5hot3SLj3edULpPvlP7BbG+RNl22SGprM3DCEzvlc2XxMwDw747tyREcEm5T/B
My8H3OwFFUurF9sw+Sa3MZjnE+e9v0V0u2qb+tejl8NYUcoQ9tD+wJikH/+COOqz
ymYymvhcl2K6mMJQTBZGxQNj/UskSA598zHkXhUiMzSXwmGueXyk+PAdCHi62Llw
RE4MC14paBT+G/2IFzHAybnsJM5Y3MUktCmHcydQQjwaswYtjnHhHynFa83HrOdK
oIxM59TTNseDAXEHTTaBRthl7d5t8TuYZZAU3esMndkEjQNGgOWT+24TvX6qyzmG
weJbnRUCfn2iaRIbH84Xf+j3X3gmY4tX/g8w+/8lJKFx2co8M+k=
=+ScB
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 44750@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44750
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help