3 /* Define architecture */
5 # define TRIPLET_ARCH "i386"
6 #elif defined(__x86_64__)
7 # define TRIPLET_ARCH "x86_64"
9 # define TRIPLET_ARCH "arm"
11 # define TRIPLET_ARCH "unknown"
15 #if defined (__linux__)
16 # define TRIPLET_OS "linux"
17 #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
18 # define TRIPLET_OS "kfreebsd"
19 #elif !defined (__GNU__)
20 # define TRIPLET_OS "unknown"
23 /* Define calling convention and ABI */
24 #if defined (__ARM_EABI__)
25 # if defined (__ARM_PCS_VFP)
26 # define TRIPLET_ABI "gnueabihf"
28 # define TRIPLET_ABI "gnueabi"
31 # define TRIPLET_ABI "gnu"
35 # define TRIPLET TRIPLET_ARCH "-" TRIPLET_ABI
37 # define TRIPLET TRIPLET_ARCH "-" TRIPLET_OS "-" TRIPLET_ABI
40 int main(int argc
, char *argv
[])
42 switch(argc
== 2 ? argv
[1][0] : 0) {
45 volatile unsigned foo
= 0x01234567;
46 puts(*(unsigned char*)&foo
== 0x67 ? "no" : "yes");
51 printf("%d\n", __GNUC_MINOR__
);
54 printf("%d\n", __GNUC__
);
66 /* to test -Wno-unused-result */
67 fread(NULL
, 1, 1, NULL
);