Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
is_supported_platform.h
Go to the documentation of this file.
1
/*
2
This file is part of darktable,
3
Copyright (C) 2016, 2018 Roman Lebedev.
4
Copyright (C) 2016 Tobias Ellinghaus.
5
Copyright (C) 2018 Robert Bridge.
6
Copyright (C) 2019 Heiko Bauke.
7
Copyright (C) 2020 Pascal Obry.
8
Copyright (C) 2021 David CARLIER.
9
Copyright (C) 2022 Martin BaĆinka.
10
11
darktable is free software: you can redistribute it and/or modify
12
it under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
darktable is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with darktable. If not, see <http://www.gnu.org/licenses/>.
23
*/
24
25
#ifndef DT_SYSTEM_IS_SUPPORTED_PLATFORM_H
26
#define DT_SYSTEM_IS_SUPPORTED_PLATFORM_H
27
28
// WARNING: do not #include anything in here!
29
30
#if !defined(__BYTE_ORDER__) || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
31
#error "Unfortunately we only work on litte-endian systems."
32
#endif
33
34
#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64))
35
#define DT_SUPPORTED_X86 1
36
#else
37
#define DT_SUPPORTED_X86 0
38
#endif
39
40
#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && defined(__ARM_ARCH) && defined(__ARM_ARCH_8A) || defined(__APPLE__))
41
#define DT_SUPPORTED_ARMv8A 1
42
#else
43
#define DT_SUPPORTED_ARMv8A 0
44
#endif
45
46
#if defined(__PPC64__)
47
#define DT_SUPPORTED_PPC64 1
48
#else
49
#define DT_SUPPORTED_PPC64 0
50
#endif
51
52
#if DT_SUPPORTED_X86 && DT_SUPPORTED_ARMv8A
53
#error "Looks like hardware platform detection macros are broken?"
54
#endif
55
56
#if !DT_SUPPORTED_X86 && !DT_SUPPORTED_ARMv8A && !DT_SUPPORTED_PPC64
57
#error "Unfortunately we only work on amd64, ARMv8-A and PPC64 (64-bit little-endian only)."
58
#endif
59
60
#undef DT_SUPPORTED_PPC64
61
#undef DT_SUPPORTED_ARMv8A
62
#undef DT_SUPPORTED_X86
63
64
// double check for 32-bit architecture
65
#if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ < 8
66
#error "Unfortunately we only work on the 64-bit architectures amd64, ARMv8-A and PPC64."
67
#endif
68
69
#endif
// DT_SYSTEM_IS_SUPPORTED_PLATFORM_H
70
71
// clang-format off
72
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
73
// vim: shiftwidth=2 expandtab tabstop=2 cindent
74
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
75
// clang-format on
76
src
system
is_supported_platform.h
Generated by
1.9.8