...
 
Commits (3)
......@@ -21,7 +21,8 @@ function list_available_tests {
function compile {
CC=gcc
CFLAGS="${CFLAGS} -Wall -Wextra -Werror -Wfatal-errors"
CFLAGS="${CFLAGS} -fno-stack-protector -mno-red-zone -nostartfiles -nodefaultlibs"
CFLAGS="${CFLAGS} -fno-stack-protector -falign-functions=16"
CFLAGS="${CFLAGS} -mno-red-zone -nostartfiles -nostdlib -nodefaultlibs"
$CC $CFLAGS -c $1 -o $2
}
......@@ -46,14 +47,14 @@ if [ "$extension" == "c" ]; then
CFLAGS="${CFLAGS} -I ../BareMetal"
compile $filename $objfile
compile ../BareMetal/api/libBareMetal.c libBareMetal.o
compile ../BareMetal/api/libBareMetal.c "$sysdir/libBareMetal.o"
sysfile="$sysdir/`basename $filename .c`.sys"
LD=ld
LDFLAGS="-T c.ld"
$LD $LDFLAGS $objfile libBareMetal.o -o $sysfile
$LD $LDFLAGS $objfile "$sysdir/libBareMetal.o" -o $sysfile
cd ../.. && ./install.sh $sysfile
......