blob: 8d9ac5d22f9153f2fc8c2f4e86241460d5048b3e (
plain)
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
|
/* Undefine some built-ins */
#ifdef linux
#undef linux
#define _multiarch_defined_linux
#endif
#ifdef i386
#undef i386
#define _multiarch_defined_i386
#endif
#ifdef sparc
#undef sparc
#define _multiarch_defined_sparc
#endif
/* Dispatch arch dependent header */
#if defined(__linux__)
#define _MULTIARCH_OS linux
#endif
#define _MULTIARCH_MAKE_HEADER(arch,header) <multiarch-arch-_MULTIARCH_OS/header>
#if defined(__x86_64__)
#include _MULTIARCH_MAKE_HEADER(x86_64,_MULTIARCH_HEADER)
#elif defined(__i386__)
#include _MULTIARCH_MAKE_HEADER(i386,_MULTIARCH_HEADER)
#elif defined(__powerpc64__)
#include _MULTIARCH_MAKE_HEADER(ppc64,_MULTIARCH_HEADER)
#elif defined(__powerpc__)
#include _MULTIARCH_MAKE_HEADER(ppc,_MULTIARCH_HEADER)
#elif defined(__sparc__) && defined(__arch64__)
#include _MULTIARCH_MAKE_HEADER(sparc64,_MULTIARCH_HEADER)
#elif defined(__sparc__)
#include _MULTIARCH_MAKE_HEADER(sparc,_MULTIARCH_HEADER)
#elif defined(__s390x__)
#include _MULTIARCH_MAKE_HEADER(s390x,_MULTIARCH_HEADER)
#elif defined(__s390__)
#include _MULTIARCH_MAKE_HEADER(s390,_MULTIARCH_HEADER)
#elif defined(__ia64__)
#include _MULTIARCH_MAKE_HEADER(ia64,_MULTIARCH_HEADER)
#elif defined(__alpha__)
#include _MULTIARCH_MAKE_HEADER(alpha,_MULTIARCH_HEADER)
#else
#error "Unknown architecture, please submit bug report"
#endif
#undef _MULTIARCH_MAKE_HEADER
#undef _MULTIARCH_OS
#undef _MULTIARCH_HEADER
/* Redefine built-ins */
#ifdef _multiarch_defined_linux
#undef _multiarch_defined_linux
#define linux 1
#endif
#ifdef _multiarch_defined_i386
#undef _multiarch_defined_i386
#define i386 1
#endif
#ifdef _multiarch_defined_sparc
#undef _multiarch_defined_sparc
#define sparc 1
#endif
|