From af2ffc4d41874bd67aa1df000c4bddf1792dab1e Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 17 Jan 2022 17:05:14 +0500 Subject: [PATCH] Create "dev" configs --- .gitignore | 22 ++++++++++++++++++++++ build/dev-cross-i386/config | 1 + build/dev-cross-riscv64/config | 1 + build/dev-cross-x86_64/config | 1 + build/dev-native/config | 1 + config/dev-cross-i386 | 19 +++++++++++++++++++ config/dev-cross-riscv64 | 19 +++++++++++++++++++ config/dev-cross-x86_64 | 19 +++++++++++++++++++ config/dev-native | 10 ++++++++++ dest/dev-cross-i386/.keep | 0 dest/dev-cross-riscv64/.keep | 0 dest/dev-cross-x86_64/.keep | 0 dest/dev-native/.keep | 0 13 files changed, 93 insertions(+) create mode 120000 build/dev-cross-i386/config create mode 120000 build/dev-cross-riscv64/config create mode 120000 build/dev-cross-x86_64/config create mode 120000 build/dev-native/config create mode 100755 config/dev-cross-i386 create mode 100755 config/dev-cross-riscv64 create mode 100755 config/dev-cross-x86_64 create mode 100755 config/dev-native create mode 100644 dest/dev-cross-i386/.keep create mode 100644 dest/dev-cross-riscv64/.keep create mode 100644 dest/dev-cross-x86_64/.keep create mode 100644 dest/dev-native/.keep diff --git a/.gitignore b/.gitignore index 7235ebd6..ef5a1e82 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,15 @@ # To build out of root # ######################## +/build/dev-native/* +!/build/dev-native/config +/build/dev-cross-i386/* +!/build/dev-cross-i386/config +/build/dev-cross-riscv64/* +!/build/dev-cross-riscv64/config +/build/dev-cross-x86_64/* +!/build/dev-cross-x86_64/config + /build/root-native/* !/build/root-native/config /build/root-cross-i386-linux/* @@ -46,6 +55,19 @@ /build/root-cross-x86_64-linux/* !/build/root-cross-x86_64-linux/config +########################## +# To install out of root # +########################## + +/dest/dev-native/* +!/dest/dev-native/.keep +/dest/dev-cross-i386/* +!/dest/dev-cross-i386/.keep +/dest/dev-cross-riscv64/* +!/dest/dev-cross-riscv64/.keep +/dest/dev-cross-x86_64/* +!/dest/dev-cross-x86_64/.keep + ########################################### # Only generated when configuring in root # ########################################### diff --git a/build/dev-cross-i386/config b/build/dev-cross-i386/config new file mode 120000 index 00000000..0e9b48d8 --- /dev/null +++ b/build/dev-cross-i386/config @@ -0,0 +1 @@ +../../config/dev-cross-i386 \ No newline at end of file diff --git a/build/dev-cross-riscv64/config b/build/dev-cross-riscv64/config new file mode 120000 index 00000000..c91bd524 --- /dev/null +++ b/build/dev-cross-riscv64/config @@ -0,0 +1 @@ +../../config/dev-cross-riscv64 \ No newline at end of file diff --git a/build/dev-cross-x86_64/config b/build/dev-cross-x86_64/config new file mode 120000 index 00000000..0f9e3c20 --- /dev/null +++ b/build/dev-cross-x86_64/config @@ -0,0 +1 @@ +../../config/dev-cross-x86_64 \ No newline at end of file diff --git a/build/dev-native/config b/build/dev-native/config new file mode 120000 index 00000000..fa742258 --- /dev/null +++ b/build/dev-native/config @@ -0,0 +1 @@ +../../config/dev-native \ No newline at end of file diff --git a/config/dev-cross-i386 b/config/dev-cross-i386 new file mode 100755 index 00000000..6be9842a --- /dev/null +++ b/config/dev-cross-i386 @@ -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" +PREFIX="$REPO/dest/dev-cross-$ARCH" +CROSS="$REPO/vendor/cross/bin/$HOST" + +export AR="$CROSS-ar" +export CC="$CROSS-gcc" +export RANLIB="$CROSS-ranlib" + +export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector -fno-pic' + +"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc diff --git a/config/dev-cross-riscv64 b/config/dev-cross-riscv64 new file mode 100755 index 00000000..1be2b1ab --- /dev/null +++ b/config/dev-cross-riscv64 @@ -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" +PREFIX="$REPO/dest/dev-cross-$ARCH" +CROSS="$REPO/vendor/cross/bin/$HOST" + +export AR="$CROSS-ar" +export CC="$CROSS-gcc" +export RANLIB="$CROSS-ranlib" + +export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector -fno-pic' + +"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc diff --git a/config/dev-cross-x86_64 b/config/dev-cross-x86_64 new file mode 100755 index 00000000..09ce8727 --- /dev/null +++ b/config/dev-cross-x86_64 @@ -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" +PREFIX="$REPO/dest/dev-cross-$ARCH" +CROSS="$REPO/vendor/cross/bin/$HOST" + +export AR="$CROSS-ar" +export CC="$CROSS-gcc" +export RANLIB="$CROSS-ranlib" + +export CFLAGS='-ffreestanding -nostdlib -fno-builtin -fno-stack-protector -fno-pic -mabi=sysv -mcmodel=kernel -mno-red-zone -mno-80387 -mno-3dnow -mno-sse -mno-sse2' + +"$REPO/configure" --host="$HOST" --prefix="$PREFIX" --with-libc diff --git a/config/dev-native b/config/dev-native new file mode 100755 index 00000000..62238e6b --- /dev/null +++ b/config/dev-native @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +REPO="$(realpath "$(dirname "$(realpath "$0")")/..")" +if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi + +PREFIX="$REPO/dest/dev-native" + +"$REPO/configure" --prefix="$PREFIX" diff --git a/dest/dev-cross-i386/.keep b/dest/dev-cross-i386/.keep new file mode 100644 index 00000000..e69de29b diff --git a/dest/dev-cross-riscv64/.keep b/dest/dev-cross-riscv64/.keep new file mode 100644 index 00000000..e69de29b diff --git a/dest/dev-cross-x86_64/.keep b/dest/dev-cross-x86_64/.keep new file mode 100644 index 00000000..e69de29b diff --git a/dest/dev-native/.keep b/dest/dev-native/.keep new file mode 100644 index 00000000..e69de29b