summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch b/meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch
deleted file mode 100644
index a6129d3b94..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From d5293d73b760268a6b200ab7d9323e37700e6a8c Mon Sep 17 00:00:00 2001
2From: Petr Vorel <petr.vorel@gmail.com>
3Date: Thu, 28 Mar 2019 07:11:25 +0100
4Subject: [PATCH] lapi: Define TST_ABI{,32,64} to detect target type
5
6This is meant to be a replacement of __WORDSIZE definition.
7
8Motivation was instead of finding, where all libc define
9__WORDSIZE, which is usually used for detecting target type
10(at least MUSL defines it in different place than other libc)
11we define our own constant.
12
13Suggested-by: Cyril Hrubis <chrubis@suse.cz>
14Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
15
16Upstream-Status: Backport
17Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
18---
19 include/lapi/abisize.h | 29 +++++++++++++----------------
20 1 file changed, 13 insertions(+), 16 deletions(-)
21
22diff --git a/include/lapi/abisize.h b/include/lapi/abisize.h
23index 897bdfd..9e6622c 100644
24--- a/include/lapi/abisize.h
25+++ b/include/lapi/abisize.h
26@@ -1,25 +1,22 @@
27+// SPDX-License-Identifier: GPL-2.0-or-later
28 /*
29- * Copyright (c) 2014 Linux Test Project
30+ * Copyright (c) 2014-2019 Linux Test Project
31 * Cyril Hrubis <chrubis@suse.cz>
32- *
33- * This program is free software; you can redistribute it and/or
34- * modify it under the terms of the GNU General Public License as
35- * published by the Free Software Foundation; either version 2 of
36- * the License, or (at your option) any later version.
37- *
38- * This program is distributed in the hope that it would be useful,
39- * but WITHOUT ANY WARRANTY; without even the implied warranty of
40- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41- * GNU General Public License for more details.
42- *
43- * You should have received a copy of the GNU General Public License
44- * along with this program; if not, write the Free Software Foundation,
45- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
46+ * Petr Vorel <petr.vorel@gmail.com>
47 */
48
49 #ifndef ABISIZE_H__
50 #define ABISIZE_H__
51
52+/* __WORDSIZE replacement */
53+#if defined(__LP64__) || defined(_LP64)
54+# define TST_ABI64
55+# define TST_ABI 64
56+#else
57+# define TST_ABI32
58+# define TST_ABI 32
59+#endif
60+
61 /*
62 * Determines if we have to split up 64 bit arguments or not
63 *
64@@ -29,6 +26,6 @@
65 (defined(__mips__) && _MIPS_SIM == _ABIN32) || \
66 (defined(__x86_64__) && defined(__ILP32__)) || \
67 (defined(__aarch64__) && defined(__ILP32__)) || \
68- __WORDSIZE == 64
69+ defined(TST_ABI64)
70
71 #endif /* ABISIZE_H__ */
72--
732.8.1
74