Create "root" configs

This commit is contained in:
Alex Kotov 2022-01-17 16:34:38 +05:00
parent 86bd85720a
commit 721e2075ef
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
10 changed files with 77 additions and 2 deletions

10
.gitignore vendored
View File

@ -37,8 +37,14 @@
# To build out of root #
########################
/build/*
!/build/.keep
/build/root-native/*
!/build/root-native/config
/build/root-cross-i386-linux/*
!/build/root-cross-i386-linux/config
/build/root-cross-riscv64-linux/*
!/build/root-cross-riscv64-linux/config
/build/root-cross-x86_64-linux/*
!/build/root-cross-x86_64-linux/config
###########################################
# Only generated when configuring in root #

View File

View File

@ -0,0 +1 @@
../../config/root-cross-i386-linux

View File

@ -0,0 +1 @@
../../config/root-cross-riscv64-linux

View File

@ -0,0 +1 @@
../../config/root-cross-x86_64-linux

1
build/root-native/config Symbolic link
View File

@ -0,0 +1 @@
../../config/root-native

19
config/root-cross-i386-linux Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
ARCH='i386'
HOST="$ARCH-elf"
TARGET='i686-linux-gnu'
PREFIX="/opt/libkernaux/$ARCH"
export AR="$TARGET-ar"
export CC="$TARGET-gcc"
export RANLIB="$TARGET-ranlib"
export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector'
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc

19
config/root-cross-riscv64-linux Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
ARCH='riscv64'
HOST="$ARCH-elf"
TARGET='riscv64-linux-gnu'
PREFIX="/opt/libkernaux/$ARCH"
export AR="$TARGET-ar"
export CC="$TARGET-gcc"
export RANLIB="$TARGET-ranlib"
export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector'
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc

19
config/root-cross-x86_64-linux Executable file
View File

@ -0,0 +1,19 @@
#!/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"
export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector'
"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc

8
config/root-native Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -e
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
"$REPO/configure"