1
0
mirror of https://gitlab.os-k.eu/os-k-team/cross-cc-builder.git synced 2023-08-25 14:03:10 +02:00

Correcting faulty recipes

This commit is contained in:
Adrien Bourmault 2020-06-27 00:52:25 +02:00
parent 70131df3ee
commit abd80b2caf
No known key found for this signature in database
GPG Key ID: AFEE5788AEE3F4EC

View File

@ -29,7 +29,7 @@
## VERSIONS ------------------------------------------------------------------ #
GCC_NAME = gcc-10.1.0
GCC_NAME =gcc-10.1.0
BINUTILS_NAME =binutils-2.34
# GCC 10.1.0
GCC_SOURCES = https://ftp.gnu.org/gnu/gcc/$(GCC_NAME)/$(GCC_NAME).tar.xz
@ -77,24 +77,16 @@ $(BINUTILSTARNAME):
@wget $(BINUTILS_SOURCES) -O $(BINUTILSTARNAME) -q -c --show-progress
@echo ${CL2}[$@] ${CL}Success.${CL3}
$(GCC_NAME): $(GCCTARNAME)
@echo ${CL2}[$@] ${NC}Deflate $(GCC_NAME) sources...${CL3}
@tar -xaf $(GCCTARNAME) --skip-old-files
@echo ${CL2}[$@] ${CL}Success.${CL3}
$(BINUTILS_NAME): $(BINUTILSTARNAME)
./build-binutils: $(BINUTILSTARNAME)
@echo ${CL2}[$@] ${NC}Deflate $(BINUTILS_NAME) sources...${CL3}
@tar -xaf $(BINUTILSTARNAME) --skip-old-files
@echo ${CL2}[$@] ${CL}Success.${CL3}
build-binutils: $(BINUTILS_NAME)
@echo ${CL2}[$@] ${NC}Configuring $(BINUTILS_NAME)...${CL3}
@mkdir -p build-binutils
cd build-binutils && ../$(BINUTILS_NAME)/configure --target=$(TARGET) --prefix="$(PREFIX)" --with-sysroot --disable-nls --disable-werror
@echo ${CL2}[$@] ${CL}Success.${CL3}
$(PREFIX)/bin/x86_64-elf-objcopy: build-binutils
$(PREFIX)/bin/x86_64-elf-objcopy: ./build-binutils
@echo ${CL2}[$@] ${NC}Compiling $(BINUTILS_NAME)...${CL3}
cd build-binutils && make -j $(NTHREADS)
@echo ${CL2}[$@] ${NC}Compiling $(BINUTILS_NAME)...${CL3}
@ -102,7 +94,10 @@ $(PREFIX)/bin/x86_64-elf-objcopy: build-binutils
cd build-binutils && make install -j $(NTHREADS)
@echo ${CL2}[$@] ${CL}Success.${CL3}
build-gcc: $(GCC_NAME)
./build-gcc: $(GCCTARNAME)
@echo ${CL2}[$@] ${NC}Deflate $(GCC_NAME) sources...${CL3}
@tar -xaf $(GCCTARNAME) --skip-old-files
@echo ${CL2}[$@] ${CL}Success.${CL3}
@echo ${CL2}[$@] ${NC}Configuring $(GCC_NAME)...${CL3}
@cp multilib.opt $(GCC_NAME)/gcc/config/i386/t-x86_64-elf
@patch $(GCC_NAME)/gcc/config.gcc < patch-red-zone.diff
@ -110,7 +105,7 @@ build-gcc: $(GCC_NAME)
cd build-gcc && ../$(GCC_NAME)/configure --target=$(TARGET) --prefix="$(PREFIX)" --disable-nls --enable-languages=c,c++ --without-headers
@echo ${CL2}[$@] ${CL}Success.${CL3}
$(PREFIX)/bin/x86_64-elf-gcc: $(PREFIX)/bin/x86_64-elf-objcopy build-gcc
$(PREFIX)/bin/x86_64-elf-gcc: $(PREFIX)/bin/x86_64-elf-objcopy ./build-gcc
@echo ${CL2}[$@] ${NC}Compiling $(GCC_NAME)...${CL3}
cd build-gcc && make all-gcc -j $(NTHREADS)
cd build-gcc && make all-target-libgcc -j $(NTHREADS)
@ -121,18 +116,17 @@ $(PREFIX)/bin/x86_64-elf-gcc: $(PREFIX)/bin/x86_64-elf-objcopy build-gcc
@echo It is located in the cross-cc subdirectory.
clean:
-@mkdir -p build-gcc build-binutils
-@rm -rf build-gcc
-@rm -rf build-binutils
-@rm -rf cross-cc
@mkdir -p build-gcc build-binutils
@rm -rf build-gcc
@rm -rf build-binutils
@rm -rf cross-cc
-@rm -rf $(GCC_NAME)/gcc/config/i386/t-x86_64-elf
-@patch -R $(GCC_NAME)/gcc/config.gcc < patch-red-zone.diff
-@echo ${CL2}[$@] ${CL}Success.${CL3}
remove_all:
@rm -rf gcc*
@rm -rf bin*
@rm -rf *gcc*
@rm -rf *bin*
@echo ${CL2}[$@] ${CL}Success.${CL3}
cross-cc: $(PREFIX)/bin/x86_64-elf-gcc