summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/endian.test
blob: a662011a27e9332a82714436a850cd466e8d92ab (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
60
#!/bin/sh

QMKSPEC=$1
VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
QMFLAGS=$5

# debuggery
[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"

# build and run a test program
test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" $QMFLAGS "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
cd "$OUTDIR/config.tests/unix/endian"


ENDIAN="UNKNOWN"
[ "$VERBOSE" = "yes" ] && $MAKE || $MAKE >/dev/null 2>&1

if [ -f ./endiantest.exe ]; then
    binary=./endiantest.exe
else
    binary=./endiantest
fi


if [ -f $binary ]; then
    : # nop
else
    [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
    exit 2
fi

if strings - $binary | grep LeastSignificantByteFirst >/dev/null 2>&1; then
    [ "$VERBOSE" = "yes" ] && echo "    Found 'LeastSignificantByteFirst' in binary"
    ENDIAN="LITTLE"
elif strings - $binary | grep MostSignificantByteFirst >/dev/null 2>&1; then
    [ "$VERBOSE" = "yes" ] && echo "    Found 'MostSignificantByteFirst' in binary"
    ENDIAN="BIG"
fi

# make clean as this tests is compiled for both the host and the target
if [ "$VERBOSE" = "yes" ]; then
    $MAKE distclean
else
    $MAKE distclean >/dev/null 2>&1
fi

# done
if [ "$ENDIAN" = "LITTLE" ]; then
    [ "$VERBOSE" = "yes" ] && echo "Using little endian."
    exit 0
elif [ "$ENDIAN" = "BIG" ]; then
    [ "$VERBOSE" = "yes" ] && echo "Using big endian."
    exit 1
else
    [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
    exit 2
fi
mium.git/commit/?h=upstream-master&id=c551f43206405019121bd2b2c93714319a0a3300'>BASELINE: Update Chromium to 79.0.3945.139Allan Sandfeld Jensen2020-01-2322415-582070/+962873 * BASELINE: Update Chromium to 78.0.3904.130Allan Sandfeld Jensen2020-01-2234847-1255766/+1375316 * Add icudtl for ios buildMichal Klocek2020-01-141-0/+0 * Downgrade ninja to 1.8.2Michal Klocek2019-12-2052-1399/+794 * BASELINE: Update GNAllan Sandfeld Jensen2019-12-04211-4227/+8521 * BASELINE: Update Chromium to 77.0.3865.129Allan Sandfeld Jensen2019-11-1840-134/+391 * BASELINE: Update Chromium to 77.0.3865.98Allan Sandfeld Jensen2019-09-24245-2155/+4876 * BASELINE: Update Chromium to 77.0.3865.59Allan Sandfeld Jensen2019-08-3036600-954512/+1491249 * BASELINE: Update Chromium to 76.0.3809.94Allan Sandfeld Jensen2019-08-3032543-3867032/+1345712 * BASELINE: Update Chromium to 75.0.3770.116Allan Sandfeld Jensen2019-07-03462-2511/+5523 * BASELINE: Update Chromium to 75.0.3770.56Allan Sandfeld Jensen2019-05-2432430-1086264/+1376117 * BASELINE: Update Chromium to 74.0.3729.159Allan Sandfeld Jensen2019-05-2027699-577799/+1211862 * BASELINE: Update GNAllan Sandfeld Jensen2019-04-17173-3725/+6760 * BASELINE: Update Chromium to 73.0.3683.105Allan Sandfeld Jensen2019-04-05199-1654/+2312 * BASELINE: Update Chromium to 73.0.3683.83Allan Sandfeld Jensen2019-03-18170-1074/+1623 * BASELINE: Update Chromium to 73.0.3683.64Allan Sandfeld Jensen2019-03-062944-167601/+354487 * BASELINE: Update Chromium to 73.0.3683.37Allan Sandfeld Jensen2019-02-1431247-1373547/+1431551 * BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0Allan Sandfeld Jensen2019-02-1434298-1986444/+2468596 * BASELINE: Update Chromium to 71.0.3578.140Allan Sandfeld Jensen2019-01-29814-352/+174541 * BASELINE: Update Chromium to 71.0.3578.93Allan Sandfeld Jensen2018-12-10