-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmeta.yaml
327 lines (308 loc) · 13.6 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{% set build_num = 7 %}
{% set gcc_major = 13 if gcc_version is undefined else gcc_version.split(".")[0] %}
# generally, the runtime version of libstdcxx needs to be at least as high
# as the compiler; however, wherever libstdcxx changes the default ABI version
# of a symbol, we need to ensure at least that version at runtime also for
# packages built with older compilers (because that build environment will
# pull in the newest libstdcxx, and then depend on that new symbol version).
# C.f. https://johannst.github.io/notes/development/symbolver.html resp.
# check if some symbol changed ABI (and thus got reversioned) at the bottom of
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/api.html
# In this case, libstdcxx last changed the default version of an ELF symbol
# in v12, therefore this is the lowest we can go for GCC <=12, see #97 or
# https://github.com/gcc-mirror/gcc/commit/9e18a25331fa25c3907249fede65a02c6817b06e
{% set last_symbol_bump = 12 %}
{% set min_runtime_version = gcc_major if gcc_major|int > last_symbol_bump else last_symbol_bump %}
{% if cross_target_platform is not defined %}
{% set cross_target_platform = "linux-64" %}
{% endif %}
{% if target_platform is not defined %}
{% set target_platform = "linux-64" %}
{% endif %}
{% if target_platform.startswith("win-") %}
{% set library_prefix = "Library/" %}
{% else %}
{% set library_prefix = "" %}
{% endif %}
# pretend this variable is used, so that smithy populates the variant configs
# [meson_release_flag]
package:
name: ctng-compiler-activation
version: {{ gcc_version }}
source:
path: .
build:
number: {{ build_num }}
{% if (target_platform == "win-64" and cross_target_platform != "win-64") or (cross_target_platform == "win-64" and gcc_major|int < 13) %}
skip: true
{% endif %}
requirements:
build:
- shellcheck # [not (aarch64 or ppc64le)]
outputs:
- name: gcc_{{ cross_target_platform }}
build:
skip: true # [not (linux or win)]
run_exports:
strong:
- libgcc >={{ min_runtime_version }}
# Need ucrt for windows<10
- ucrt >=10.0.20348.0 # [cross_target_platform == "win-64"]
script: install-gcc.sh
requirements:
run:
- gcc_impl_{{ target_platform }} {{ gcc_version }}.*
- gcc_impl_{{ cross_target_platform }} {{ gcc_version }}.*
# for activation of binutils env vars
- binutils_{{ cross_target_platform }}
- {{ c_stdlib }}_{{ target_platform }} # [linux]
- {{ cross_stdlib }}_{{ cross_target_platform }}
- gendef # [cross_target_platform == "win-64"]
test:
requires:
- {{ cross_stdlib }}_{{ cross_target_platform }} {{ cross_stdlib_version }}
files:
- tests
commands:
- ${CC} ${CFLAGS} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v
- ${CC} ${LDFLAGS} c_aligned.o -o c_aligned # [target_platform == cross_target_platform]
- ./c_aligned # [target_platform == cross_target_platform]
# CONDA_BUILD_SYSROOT is defined for clang++ to find correct C++ headers, see issue 8
- test -z "${CONDA_BUILD_SYSROOT+x}" && echo "CONDA_BUILD_SYSROOT is not set" && exit 1
- test -d ${CONDA_BUILD_SYSROOT} || exit 1
about:
summary: GNU C Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: clang_impl_{{ cross_target_platform }}
version: {{ clang_version }}
script: install-clang_impl.sh
build:
# only for linux; osx builds are done on clang-compiler-activation-feedstock
skip: true # [win or s390x or cross_target_platform not in ("linux-64", "linux-aarch64", "linux-ppc64le")]
requirements:
run:
- libgcc-devel_{{ cross_target_platform }} {{ gcc_version }}.*
- {{ cross_stdlib }}_{{ cross_target_platform }}
- binutils_impl_{{ cross_target_platform }}
- compiler-rt_{{ cross_target_platform }}
- compiler-rt =={{ clang_version }}.*
- clang =={{ clang_version }}.*
test:
commands:
- x86_64-conda-linux-gnu-clang --version # [linux64]
- x86_64-conda-linux-gnu-clang-cpp --version # [linux64]
- aarch64-conda-linux-gnu-clang --version # [aarch64]
- aarch64-conda-linux-gnu-clang-cpp --version # [aarch64]
- powerpc64le-conda-linux-gnu-clang --version # [ppc64le]
- powerpc64le-conda-linux-gnu-clang-cpp --version # [ppc64le]
about:
summary: Clang Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: clang_{{ cross_target_platform }}
version: {{ clang_version }}
script: install-clang.sh
build:
skip: true # [win or s390x or cross_target_platform in ("linux-s390x", "win-64")]
run_exports:
strong:
- libgcc >={{ min_runtime_version }}
requirements:
run:
# for activation of binutils env vars
- binutils_{{ cross_target_platform }}
- clang_impl_{{ cross_target_platform }} =={{ clang_version }}.*
test:
requires:
- {{ cross_stdlib }}_{{ cross_target_platform }} {{ cross_stdlib_version }}
files:
- tests
commands:
- ${CC} ${CFLAGS} -Wall tests/aligned_alloc.c -c -o c_aligned.o -v
- ${CC} ${LDFLAGS} c_aligned.o -o c_aligned # [target_platform == cross_target_platform]
- ./c_aligned # [target_platform == cross_target_platform]
# CONDA_BUILD_SYSROOT is defined for clang++ to find correct C++ headers, see issue 8
- test -z "${CONDA_BUILD_SYSROOT+x}" && echo "CONDA_BUILD_SYSROOT is not set" && exit 1
- test -d ${CONDA_BUILD_SYSROOT} || exit 1
about:
summary: Clang Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: gxx_{{ cross_target_platform }}
script: install-g++.sh
build:
skip: true # [not (linux or win)]
run_exports:
strong:
# This should be a transitive dependency, but conda-build doesn't support those
- libstdcxx >={{ min_runtime_version }}
# Because transitive run_exports do not work:
- libgcc >={{ min_runtime_version }}
# Need ucrt for windows<10
- ucrt >=10.0.20348.0 # [cross_target_platform == "win-64"]
requirements:
run:
- gxx_impl_{{ target_platform }} {{ gcc_version }}.*
- gxx_impl_{{ cross_target_platform }} {{ gcc_version }}.*
# for activation of gcc env vars
- {{ pin_subpackage("gcc_" ~ cross_target_platform, exact=True) }}
# for activation of binutils env vars
- binutils_{{ cross_target_platform }}
- {{ cross_stdlib }}_{{ cross_target_platform }}
test:
requires:
- {{ cross_stdlib }}_{{ cross_target_platform }} {{ cross_stdlib_version }}
files:
- tests
commands:
- ${CXX} ${CXXFLAGS} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o
- ${CXX} ${LDFLAGS} cpp_aligned.o -o cpp_aligned # [target_platform == cross_target_platform]
- ./cpp_aligned # [target_platform == cross_target_platform]
- test -z "${CONDA_BUILD_SYSROOT+x}" && echo "CONDA_BUILD_SYSROOT is not set" && exit 1
- test -d ${CONDA_BUILD_SYSROOT} || exit 1
about:
summary: GNU C++ Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: clangxx_impl_{{ cross_target_platform }}
version: {{ clang_version }}
script: install-clangxx_impl.sh
build:
# only for linux; osx builds are done on clang-compiler-activation-feedstock
skip: true # [win or s390x or cross_target_platform not in ("linux-64", "linux-aarch64", "linux-ppc64le")]
requirements:
run:
- {{ pin_subpackage("clang_impl_" ~ cross_target_platform, exact=True) }}
# C++ compiler on linux needs a stdlib
- libstdcxx-devel_{{ cross_target_platform }} =={{ gcc_version }}.*
- clangxx =={{ clang_version }}.*
test:
commands:
- x86_64-conda-linux-gnu-clang++ --version # [linux64]
- aarch64-conda-linux-gnu-clang++ --version # [aarch64]
- powerpc64le-conda-linux-gnu-clang++ --version # [ppc64le]
about:
summary: Clang C++ Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: clangxx_{{ cross_target_platform }}
version: {{ clang_version }}
script: install-clang++.sh
build:
skip: true # [win or s390x or cross_target_platform in ("linux-s390x", "win-64")]
run_exports:
strong:
# This should be a transitive dependency, but conda-build doesn't support those
- libstdcxx >={{ min_runtime_version }}
# Because transitive run_exports do not work:
- libgcc >={{ min_runtime_version }}
requirements:
run:
# for activation of gcc env vars
- {{ pin_subpackage("clang_" ~ cross_target_platform, exact=True) }}
- clangxx_impl_{{ cross_target_platform }} =={{ clang_version }}.*
test:
requires:
- {{ cross_stdlib }}_{{ cross_target_platform }} {{ cross_stdlib_version }}
files:
- tests
commands:
- ${CXX} ${CXXFLAGS} -Wall tests/aligned_alloc.cpp -c -o cpp_aligned.o
- ${CXX} ${LDFLAGS} cpp_aligned.o -o cpp_aligned # [target_platform == cross_target_platform]
- ./cpp_aligned # [target_platform == cross_target_platform]
- test -z "${CONDA_BUILD_SYSROOT+x}" && echo "CONDA_BUILD_SYSROOT is not set" && exit 1
- test -d ${CONDA_BUILD_SYSROOT} || exit 1
about:
summary: Clang C++ Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: gfortran_{{ cross_target_platform }}
script: install-gfortran.sh
build:
skip: true # [not (linux or win)]
run_exports:
strong:
- libgfortran{{ libgfortran_soname }} >={{ gcc_version }}
- libgfortran
# Because transitive run_exports do not work:
- libgcc >={{ min_runtime_version }}
# Need ucrt for windows<10
- ucrt >=10.0.20348.0 # [cross_target_platform == "win-64"]
requirements:
run:
- gfortran_impl_{{ cross_target_platform }} {{ gcc_version }}.*
- gfortran_impl_{{ target_platform }} {{ gcc_version }}.*
# for activation of gcc env vars:
- {{ pin_subpackage("gcc_" ~ cross_target_platform, exact=True) }}
# for activation of binutils env vars:
- binutils_{{ cross_target_platform }}
- {{ cross_stdlib }}_{{ cross_target_platform }}
test:
requires:
- cmake >=3.11 # [x86_64 or aarch64 or ppc64le]
- make # [x86_64 or aarch64 or ppc64le]
- {{ cross_stdlib }}_{{ cross_target_platform }} {{ cross_stdlib_version }}
commands:
- ${FC} --version
- pushd tests/fortomp
- sh test_fort.sh # [target_platform == cross_target_platform and (x86_64 or aarch64 or ppc64le)]
files:
- tests/fortomp/*
about:
summary: GNU Fortran Compiler (activation scripts)
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
- name: gcc_bootstrap_{{ cross_target_platform }}
version: "{{ gcc_version }}"
build:
skip: true # [not (linux or win)]
binary_relocation: false
detect_binary_files_with_prefix: false
always_include_files:
- {{ library_prefix }}bin/
- {{ library_prefix }}etc/
- {{ library_prefix }}lib64/
- {{ library_prefix }}lib/
- {{ library_prefix }}libexec/
- {{ library_prefix }}share/
- {{ library_prefix }}x86_64-conda-linux-gnu/
- {{ library_prefix }}powerpc64le-conda-linux-gnu/
- {{ library_prefix }}aarch64-conda-linux-gnu/
- {{ library_prefix }}s390x-conda-linux-gnu/
- {{ library_prefix }}x86_64-w64-mingw32/
requirements:
host:
- binutils_impl_{{ cross_target_platform }} {{ binutils_version }}.*
- gfortran_impl_{{ cross_target_platform }} {{ gcc_version }}.*
- gxx_impl_{{ cross_target_platform }} {{ gcc_version }}.*
- gcc_impl_{{ cross_target_platform }} {{ gcc_version }}.*
- binutils_impl_{{ target_platform }} {{ binutils_version }}.*
- gfortran_impl_{{ target_platform }} {{ gcc_version }}.*
- gxx_impl_{{ target_platform }} {{ gcc_version }}.*
- gcc_impl_{{ target_platform }} {{ gcc_version }}.*
test:
commands:
- test -f $PREFIX/bin/{{ triplet }}-cc # [target_platform != "win-64"]
- test -f $PREFIX/Library/bin/{{ triplet }}-cc.exe # [target_platform == "win-64"]
about:
summary: GCC bootstrap compilers for building deps
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: GPL
license_file: GPL_LICENSE
about:
summary: Activation scripts for gcc, g++, gfortran and clang
home: https://github.com/conda-forge/ctng-compiler-activation-feedstock
license: BSD-3-Clause
license_file: LICENSE
extra:
recipe-maintainers:
- isuruf
- beckermr