From d394978a73fce080128dc414e1771d8d89e1e1e0 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 20 Nov 2024 13:00:52 +0100 Subject: ci: Make the build work for Ubuntu 24.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The binutils used in Ubuntu 24.04 has a crash when trying to link the end binary, which is avoided when passing `-fno-PIE`. Since this is a good idea anyways for the kernel in general, let's pass this flag always and kill two birds with one stone. Signed-off-by: Miquel Sabaté Solà --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 385bb66..bda1158 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,11 @@ endif CC = $(CROSS_COMPILE)gcc$(CC_SUFFIX) LD = $(CROSS_COMPILE)ld -HOSTCC = gcc +HOSTCC = gcc$(CC_SUFFIX) QEMU ?= qemu-system-riscv64 ISA ?= rv64imafdc_zicntr_zicsr_zifencei_zihpm_zca_zcd_zba_zbb -ASFLAGS = -march=$(ISA) -mabi=lp64d -mcmodel=medany +ASFLAGS = -march=$(ISA) -mabi=lp64d -mcmodel=medany -fno-PIE CCFLAGS = $(ASFLAGS) -Iinclude/ -D__KERNEL__ -std=gnu17 -nostdinc -nostdlib WARNINGS = -Werror -Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Winit-self \ -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion \ -- cgit v1.2.3