1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/config/x86_64

20 lines
463 B
Text
Raw Normal View History

2022-01-11 08:31:48 -05:00
#!/bin/sh
2022-01-12 00:05:32 -05:00
set -e
ARCH='x86_64'
HOST="$ARCH-elf"
2022-01-15 02:19:15 -05:00
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
2022-01-12 00:05:32 -05:00
PREFIX="$REPO/vendor/cross"
BIN="$PREFIX/bin"
2022-01-15 02:32:37 -05:00
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
2022-01-12 00:05:32 -05:00
export AR="$BIN/$HOST-ar"
export CC="$BIN/$HOST-gcc"
export RANLIB="$BIN/$HOST-ranlib"
export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector'
2022-01-15 02:19:15 -05:00
"$REPO/configure" --host="$HOST" --enable-assert --enable-guard --with-libc