• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Requires:
3#   sudo apt install gcc-arm-linux-gnueabihf gcc-arm-linux-gnueabi
4
5set -e
6set -u
7
8cd "${0%/*}"
9
10declare -ar FLAGS=(
11  '-std=c89'
12  '-pedantic'
13  '-Wall'
14  '-Werror'
15  '-Werror=implicit-fallthrough'
16  '-Werror=strict-prototypes'
17  '-Wsign-compare'
18  '-Wsign-conversion'
19  '-Wunused-parameter'
20  '-Wuninitialized'
21  '-Os'
22  '-fomit-frame-pointer'
23)
24
25arm-linux-gnueabi-gcc "${FLAGS[@]}" apf_interpreter.c -c -o apf_interpreter.arm.o
26clang -m32 "${FLAGS[@]}" -Wnullable-to-nonnull-conversion -Wthread-safety apf_interpreter.c -c -o apf_interpreter.x86.o
27size apf_interpreter.arm.o
28size apf_interpreter.x86.o
29