blob: a5f78a81641320050ff8271942f0ddb0cf6f2510 (
plain) (
blame)
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
|
#!/bin/sh
cat <<EOF
/*
* Manually set type sizes for cross compile
* build-target: $TARGET
* build-host: $HOST
*/
/* If your target is big-endian, define the below: */
EOF
be='/* #undef WORDS_BIGENDIAN */'
# add more targets here
case "$TARGET" in
*-ppc* | *-sparc*)
be='#define WORDS_BIGENDIAN'
;;
esac
echo "$bs"
sizeof_int=0
sizeof_long=0
sizeof_long_long=0
sizeof_short=0
cat <<EOF
#define SIZEOF_INT $sizeof_int
#define SIZEOF_LONG $sizeof_long
#define SIZEOF_LONG_LONG $sizeof_long_long
#define SIZEOF_SHORT $sizeof_short
EOF
|