From 78afa2b89864519af316a1b7362311615fb3fb30 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 11 Apr 2022 18:11:48 +0100 Subject: [PATCH] hmm getting flags sorted out on coldboot link --- coldboot/Makefile | 3 ++- hello_world/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/coldboot/Makefile b/coldboot/Makefile index d4ccbec..43a3dd0 100644 --- a/coldboot/Makefile +++ b/coldboot/Makefile @@ -33,13 +33,14 @@ OBJCOPY = $(CROSS_COMPILE)objcopy CFLAGS = -Os -g -Wall -std=c99 -msoft-float -mno-string \ -mno-multiple -mno-vsx -mno-altivec -mlittle-endian \ -fno-stack-protector -mstrict-align -ffreestanding \ + -fno-delete-null-pointer-checks \ -fdata-sections -ffunction-sections -I../include \ -I $(LIBGRAMINC) \ -DLONG_TIMER_MULT=$(LONG_TIMER_MULT) \ -DBOOT_INIT_BASE=$(BOOT_INIT_BASE) \ -DSHORT_TIMER_MULT=$(SHORT_TIMER_MULT) ASFLAGS = $(CFLAGS) -LDFLAGS = -T powerpc.lds +LDFLAGS = -static -nostdlib -T powerpc.lds all: coldboot.hex coldboot.S diff --git a/hello_world/Makefile b/hello_world/Makefile index dd51bd3..230b265 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -9,7 +9,7 @@ CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld OBJCOPY = $(CROSS_COMPILE)objcopy -CFLAGS = -Os -g -Wall -std=c99 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I../include +CFLAGS = -Os -g -Wall -std=c99 -mabi=elfv2 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I../include ASFLAGS = $(CFLAGS) LDFLAGS = -T powerpc.lds -- 2.30.2