hmm getting flags sorted out on coldboot link
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 11 Apr 2022 17:11:48 +0000 (18:11 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 11 Apr 2022 17:11:48 +0000 (18:11 +0100)
coldboot/Makefile
hello_world/Makefile

index d4ccbec32987ab4604667b9321148b8e06cd2a5a..43a3dd0cfac8810960a5982302a3eb9dbf91951f 100644 (file)
@@ -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
 
index dd51bd38f9ae428328cb8f0d2c3eea479068d997..230b2652dcede608962db2df889dc28a20f62bac 100644 (file)
@@ -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