1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 11:29:54 +00:00

hafnium: Fix build when _Noreturn is not available

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jon Mason <jon.mason@arm.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Khem Raj
2022-04-19 22:42:35 -07:00
committed by Jon Mason
parent 03f5819187
commit cb2eb8e373
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
From 0d941ba32a082023575fd0d14d52a12b7547b367 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 19 Apr 2022 22:32:56 -0700
Subject: [PATCH] define _Noreturn if needed
The new _Noreturn function specifier is not recognized by the parser and shows as a syntax error:
Fixes
../git/inc/hf/panic.h:13:1: error: '_Noreturn' is a C11 extension [-Werror,-Wc11-extensions]
noreturn void panic(const char *fmt, ...);
^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
inc/hf/panic.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/inc/hf/panic.h b/inc/hf/panic.h
index ec864e4f..588f1193 100644
--- a/inc/hf/panic.h
+++ b/inc/hf/panic.h
@@ -10,4 +10,8 @@
#include <stdnoreturn.h>
+#ifndef _Noreturn
+#define _Noreturn __attribute__ ((noreturn))
+#endif
+
noreturn void panic(const char *fmt, ...);
--
2.36.0

View File

@@ -10,6 +10,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit deploy python3native pkgconfig
SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https;branch=master \
file://0001-define-_Noreturn-if-needed.patch \
file://host-ld.patch \
file://pkg-config-native.patch \
file://native-dtc.patch"