build: Drop support for building GCC toolchain

This commit is contained in:
mintsuki 2022-08-09 13:30:16 +02:00
parent 4422ebd61c
commit dc3a81cb61
5 changed files with 5 additions and 32 deletions

2
.gitignore vendored
View File

@ -1,11 +1,9 @@
/libgcc-* /libgcc-*
/bin /bin
/build /build
/toolchain
/cross-files /cross-files
/limine-efi /limine-efi
/freestanding-headers /freestanding-headers
/make_toolchain.sh
/ovmf* /ovmf*
*.o *.o
*.d *.d

View File

@ -19,9 +19,6 @@ MKESCAPE = $(subst $(SPACE),\ ,$(1))
SHESCAPE = $(subst ','\'',$(1)) SHESCAPE = $(subst ','\'',$(1))
NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1)) NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1))
override PATH := @PATH@
export PATH
override BUILD_CD_EFI := @BUILD_CD_EFI@ override BUILD_CD_EFI := @BUILD_CD_EFI@
override BUILD_PXE := @BUILD_PXE@ override BUILD_PXE := @BUILD_PXE@
override BUILD_CD := @BUILD_CD@ override BUILD_CD := @BUILD_CD@
@ -216,11 +213,11 @@ dist:
.PHONY: distclean .PHONY: distclean
distclean: clean distclean: clean
rm -rf toolchain ovmf* config.log config.status GNUmakefile config.h cross-files rm -rf ovmf* config.log config.status GNUmakefile config.h cross-files
.PHONY: maintainer-clean .PHONY: maintainer-clean
maintainer-clean: distclean maintainer-clean: distclean
cd '$(call SHESCAPE,$(SRCDIR))' && rm -rf freestanding-headers libgcc-binaries make_toolchain.sh limine-efi cross-detect configure build-aux *'~' autom4te.cache *.tar.xz *.tar.gz cd '$(call SHESCAPE,$(SRCDIR))' && rm -rf freestanding-headers libgcc-binaries limine-efi cross-detect configure build-aux *'~' autom4te.cache *.tar.xz *.tar.gz
.PHONY: common-uefi-x86-64 .PHONY: common-uefi-x86-64
common-uefi-x86-64: common-uefi-x86-64:

View File

@ -44,9 +44,9 @@ For example, to clone the latest binary release of the `v3.x` branch one can do
```bash ```bash
git clone https://github.com/limine-bootloader/limine.git --branch=v3.0-branch-binary --depth=1 git clone https://github.com/limine-bootloader/limine.git --branch=v3.0-branch-binary --depth=1
``` ```
or, to clone a specific binary point release (for example `v3.14`) or, to clone a specific binary point release (for example `v3.15`)
```bash ```bash
git clone https://github.com/limine-bootloader/limine.git --branch=v3.14-binary --depth=1 git clone https://github.com/limine-bootloader/limine.git --branch=v3.15-binary --depth=1
``` ```
In order to rebuild `limine-deploy`, simply run `make` in the binary In order to rebuild `limine-deploy`, simply run `make` in the binary
@ -59,30 +59,12 @@ release directory.
*The following steps are not necessary if cloning a binary release. If so, skip to* *The following steps are not necessary if cloning a binary release. If so, skip to*
*"Installing Limine binaries".* *"Installing Limine binaries".*
### Building the toolchain
This step can take a long time, but it will ensure that the toolchain will work
with Limine. If on an x86_64 host, with GCC or Clang installed, it is possible
that the host toolchain will suffice. You can skip to the next paragraph in order
to use the system's toolchain instead. If that fails, you can still come back here
later (remember to `make clean` and re-run `./configure` after building the toolchain).
The toolchain's build process depends on the following packages: `GNU make`,
`GNU tar`, `texinfo`, `curl`, `gzip`, `bzip2`, `gcc/clang`, `g++/clang++`.
Building the toolchain can be accomplished by running:
```bash
TARGET=<target architecture> ./make_toolchain.sh
```
where `<target architecture>` is something like `i686` or `x86_64`.
### Prerequisites ### Prerequisites
In order to build Limine, the following programs have to be installed: In order to build Limine, the following programs have to be installed:
`GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools` `GNU make`, `grep`, `sed`, `find`, `awk`, `gzip`, `nasm`, `mtools`
(optional, necessary to build `limine-cd-efi.bin`). (optional, necessary to build `limine-cd-efi.bin`).
Furthermore, either the toolchain must have been built in the previous Furthermore, `gcc` or `llvm/clang` must also be installed, alongside
paragraph, or `gcc` or `llvm/clang` must also be installed, alongside
the respective binutils. the respective binutils.
### Configure ### Configure

View File

@ -11,7 +11,6 @@ cd "$srcdir"
[ -d freestanding-headers ] || git clone https://github.com/mintsuki/freestanding-headers.git [ -d freestanding-headers ] || git clone https://github.com/mintsuki/freestanding-headers.git
[ -d libgcc-binaries ] || git clone https://github.com/mintsuki/libgcc-binaries.git [ -d libgcc-binaries ] || git clone https://github.com/mintsuki/libgcc-binaries.git
[ -d limine-efi ] || git clone https://github.com/limine-bootloader/limine-efi.git [ -d limine-efi ] || git clone https://github.com/limine-bootloader/limine-efi.git
[ -f make_toolchain.sh ] || ( curl -o make_toolchain.sh https://gist.githubusercontent.com/mintsuki/50fca7022e09f241e40809168662493d/raw/c7eb3dd24100da888893dcee6e8d6b577613b577/make_toolchain.sh && chmod +x make_toolchain.sh )
automake_libdir="$(automake --print-libdir)" automake_libdir="$(automake --print-libdir)"

View File

@ -7,12 +7,9 @@ AC_CONFIG_SUBDIRS([cross-detect])
SRCDIR="$(cd "$srcdir" && pwd -P)" SRCDIR="$(cd "$srcdir" && pwd -P)"
BUILDDIR="$(pwd -P)" BUILDDIR="$(pwd -P)"
PATH="$BUILDDIR/toolchain/bin:$SRCDIR/toolchain/bin:$PATH"
export PATH
AC_SUBST(SRCDIR, [$SRCDIR]) AC_SUBST(SRCDIR, [$SRCDIR])
AC_SUBST(BUILDDIR, [$BUILDDIR]) AC_SUBST(BUILDDIR, [$BUILDDIR])
AC_SUBST(PATH, [$PATH])
test "x$CFLAGS" = "x" && CFLAGS='-g -O2 -pipe -Wall -Wextra' test "x$CFLAGS" = "x" && CFLAGS='-g -O2 -pipe -Wall -Wextra'
AC_PROG_CC AC_PROG_CC