aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-20 13:00:52 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-20 13:00:52 +0100
commitd394978a73fce080128dc414e1771d8d89e1e1e0 (patch)
tree0977232f373de318fe0e0a1712b1688c1575db5c
parent1fd76135e0a52805884645431c7447231f373025 (diff)
downloadfbos-d394978a73fce080128dc414e1771d8d89e1e1e0.tar.gz
fbos-d394978a73fce080128dc414e1771d8d89e1e1e0.zip
ci: Make the build work for Ubuntu 24.04
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à <mikisabate@gmail.com>
-rw-r--r--Makefile4
1 files 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 \