1 |
Signed-off-by: Michał Górny <mgorny@g.o> |
2 |
--- |
3 |
eclass/llvm.eclass | 43 ++++++++----------------------------------- |
4 |
eclass/tests/llvm.sh | 7 ------- |
5 |
2 files changed, 8 insertions(+), 42 deletions(-) |
6 |
|
7 |
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass |
8 |
index 7657de4bc5a2..b4347163face 100644 |
9 |
--- a/eclass/llvm.eclass |
10 |
+++ b/eclass/llvm.eclass |
11 |
@@ -6,7 +6,7 @@ |
12 |
# Michał Górny <mgorny@g.o> |
13 |
# @AUTHOR: |
14 |
# Michał Górny <mgorny@g.o> |
15 |
-# @SUPPORTED_EAPIS: 6 7 8 |
16 |
+# @SUPPORTED_EAPIS: 7 8 |
17 |
# @BLURB: Utility functions to build against slotted LLVM |
18 |
# @DESCRIPTION: |
19 |
# The llvm.eclass provides utility functions that can be used to build |
20 |
@@ -56,15 +56,9 @@ |
21 |
# } |
22 |
# @CODE |
23 |
|
24 |
-case "${EAPI:-0}" in |
25 |
- 0|1|2|3|4|5) |
26 |
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" |
27 |
- ;; |
28 |
- 6|7|8) |
29 |
- ;; |
30 |
- *) |
31 |
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" |
32 |
- ;; |
33 |
+case ${EAPI} in |
34 |
+ 7|8) ;; |
35 |
+ *) die "EAPI=${EAPI:-0} not supported";; |
36 |
esac |
37 |
|
38 |
EXPORT_FUNCTIONS pkg_setup |
39 |
@@ -95,7 +89,7 @@ declare -g -r _LLVM_KNOWN_SLOTS=( {16..8} ) |
40 |
# |
41 |
# If -b is specified, the checks are performed relative to BROOT, |
42 |
# and BROOT-path is returned. This is appropriate when your package |
43 |
-# calls llvm-config executable. -b is supported since EAPI 7. |
44 |
+# calls llvm-config executable. |
45 |
# |
46 |
# If -d is specified, the checks are performed relative to ESYSROOT, |
47 |
# and ESYSROOT-path is returned. This is appropriate when your package |
48 |
@@ -126,17 +120,6 @@ get_llvm_slot() { |
49 |
shift |
50 |
done |
51 |
|
52 |
- if [[ ${EAPI} == 6 ]]; then |
53 |
- case ${hv_switch} in |
54 |
- -b) |
55 |
- die "${FUNCNAME} -b is not supported in EAPI ${EAPI}" |
56 |
- ;; |
57 |
- -d) |
58 |
- hv_switch= |
59 |
- ;; |
60 |
- esac |
61 |
- fi |
62 |
- |
63 |
local max_slot=${1} |
64 |
local slot |
65 |
for slot in "${_LLVM_KNOWN_SLOTS[@]}"; do |
66 |
@@ -179,17 +162,8 @@ get_llvm_slot() { |
67 |
get_llvm_prefix() { |
68 |
debug-print-function ${FUNCNAME} "${@}" |
69 |
|
70 |
- local prefix=${EPREFIX} |
71 |
- if [[ ${EAPI} != 6 ]]; then |
72 |
- case ${1} in |
73 |
- -b) |
74 |
- prefix=${BROOT} |
75 |
- ;; |
76 |
- *) |
77 |
- prefix=${ESYSROOT} |
78 |
- ;; |
79 |
- esac |
80 |
- fi |
81 |
+ local prefix=${ESYSROOT} |
82 |
+ [[ ${1} == -b ]] && prefix=${BROOT} |
83 |
|
84 |
echo "${prefix}/usr/lib/llvm/$(get_llvm_slot "${@}")" |
85 |
} |
86 |
@@ -277,8 +251,7 @@ llvm_pkg_setup() { |
87 |
llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB |
88 |
llvm_fix_tool_path READELF STRINGS STRIP |
89 |
|
90 |
- local prefix=${EPREFIX} |
91 |
- [[ ${EAPI} != 6 ]] && prefix=${ESYSROOT} |
92 |
+ local prefix=${ESYSROOT} |
93 |
local llvm_path=${prefix}/usr/lib/llvm/${LLVM_SLOT}/bin |
94 |
local IFS=: |
95 |
local split_path=( ${PATH} ) |
96 |
diff --git a/eclass/tests/llvm.sh b/eclass/tests/llvm.sh |
97 |
index 93bc124a82af..e62fb4b002a2 100755 |
98 |
--- a/eclass/tests/llvm.sh |
99 |
+++ b/eclass/tests/llvm.sh |
100 |
@@ -74,13 +74,6 @@ eindent |
101 |
check_prefix /sysroot/eprefix/usr/lib/llvm/11 -d |
102 |
eoutdent |
103 |
|
104 |
-ebegin "Testing check_setup_path EAPI 6 API" |
105 |
-eindent |
106 |
- EAPI=6 \ |
107 |
- LLVM_INSTALLED_SLOT=11 \ |
108 |
- check_prefix /usr/lib/llvm/11 -d |
109 |
-eoutdent |
110 |
- |
111 |
BASEPATH=/usr/lib/ccache/bin:/usr/bin:/usr/sbin:/bin:/sbin |
112 |
|
113 |
# TODO: cross support? |
114 |
-- |
115 |
2.39.0 |