[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: gnu: gcc-arm-none-eabi-4.9: Fix incompatible redeclaration.
From: |
guix-commits |
Subject: |
01/03: gnu: gcc-arm-none-eabi-4.9: Fix incompatible redeclaration. |
Date: |
Sun, 23 Apr 2023 13:31:07 -0400 (EDT) |
rekado pushed a commit to branch core-updates
in repository guix.
commit e6994d7e3f3f4a69f984c9e67df27abe1bc07c1c
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sun Apr 23 13:08:48 2023 +0200
gnu: gcc-arm-none-eabi-4.9: Fix incompatible redeclaration.
* gnu/packages/patches/gcc-4.9-inline.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/embedded.scm (gcc-arm-none-eabi-4.9)[source]: Use it.
---
gnu/local.mk | 1 +
gnu/packages/embedded.scm | 14 ++++++++------
gnu/packages/patches/gcc-4.9-inline.patch | 13 +++++++++++++
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index a2b7defe30..27df8f00ee 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1155,6 +1155,7 @@ dist_patch_DATA =
\
%D%/packages/patches/gcc-cross-gxx-include-dir.patch \
%D%/packages/patches/gcc-fix-texi2pod.patch \
%D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \
+ %D%/packages/patches/gcc-4.9-inline.patch \
%D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \
%D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \
%D%/packages/patches/gcc-libsanitizer-ustat.patch \
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index f2d0def2f2..5b3291f397 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -98,12 +98,14 @@
(base32
"113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))
- ;; Remove the one patch that doesn't apply to this 4.9 snapshot (the
- ;; patch is for 4.9.4 and later but this svn snapshot is older).
- (patches (remove (lambda (patch)
- (string=? (basename patch)
- "gcc-arm-bug-71399.patch"))
- (origin-patches (package-source xgcc))))))
+ (patches (cons (search-patch "gcc-4.9-inline.patch")
+ ;; Remove the one patch that doesn't apply to this 4.9
+ ;; snapshot (the patch is for 4.9.4 and later but this
+ ;; svn snapshot is older).
+ (remove (lambda (patch)
+ (string=? (basename patch)
+ "gcc-arm-bug-71399.patch"))
+ (origin-patches (package-source xgcc)))))))
(native-inputs
`(("flex" ,flex)
("gcc@5" ,gcc-5)
diff --git a/gnu/packages/patches/gcc-4.9-inline.patch
b/gnu/packages/patches/gcc-4.9-inline.patch
new file mode 100644
index 0000000000..f2762c903a
--- /dev/null
+++ b/gnu/packages/patches/gcc-4.9-inline.patch
@@ -0,0 +1,13 @@
+diff -ru a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+--- a/gcc/cp/cfns.h 1970-01-01 01:00:01.000000000 +0100
++++ b/gcc/cp/cfns.h 2023-04-23 09:23:28.883815598 +0200
+@@ -53,6 +53,9 @@
+ static unsigned int hash (const char *, unsigned int);
+ #ifdef __GNUC__
+ __inline
++#ifdef __GNUC_STDC_INLINE__
++__attribute__ ((__gnu_inline__))
++#endif
+ #endif
+ const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */