Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From b6732f68848ecc8ff01054bf7aea70a241c37116 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 10 Apr 2020 11:23:39 -0700 |
| 4 | Subject: [PATCH] Remove using .end directive with clang |
| 5 | |
| 6 | Clang does not support this asm directive |
| 7 | Fixes Issue #19 |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/kaniini/libucontext/pull/20] |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | arch/common/common-defs.h | 5 ++++- |
| 13 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/arch/common/common-defs.h b/arch/common/common-defs.h |
| 16 | index bf2fb8c..618116b 100644 |
| 17 | --- a/arch/common/common-defs.h |
| 18 | +++ b/arch/common/common-defs.h |
| 19 | @@ -28,10 +28,13 @@ |
| 20 | ENT(__proc) \ |
| 21 | __proc: \ |
| 22 | SETUP_FRAME(__proc) |
| 23 | - |
| 24 | +#ifdef __clang__ |
| 25 | +#define END(__proc) |
| 26 | +#else |
| 27 | #define END(__proc) \ |
| 28 | .end __proc; \ |
| 29 | .size __proc,.-__proc; |
| 30 | +#endif |
| 31 | |
| 32 | #define ALIAS(__alias, __real) \ |
| 33 | .weak __alias; \ |
| 34 | -- |
| 35 | 2.26.0 |
| 36 | |