libkernaux/config/root-cross-x86_64-linux

20 lines
514 B
Plaintext
Raw Normal View History

2022-01-17 11:34:38 +00:00
#!/bin/sh
set -e
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
ARCH='x86_64'
HOST="$ARCH-elf"
TARGET='x86_64-linux-gnu'
PREFIX="/opt/libkernaux/$ARCH"
export AR="$TARGET-ar"
export CC="$TARGET-gcc"
export RANLIB="$TARGET-ranlib"
2022-01-21 20:04:01 +00:00
export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector -fno-pic -mabi=sysv -mcmodel=kernel -mno-80387 -mno-red-zone'
2022-01-17 11:34:38 +00:00
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc