mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-09 20:00:40 +00:00
Fixed nostartfiles issue with Makefile.gcc* as ld no longer ignores erroneous arguments
This commit is contained in:
parent
714500b919
commit
5c5fb1493e
11 changed files with 21 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ audio.o : audio.bin
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES) audio.o
|
kernel8.img: boot.o $(OFILES) audio.o
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) audio.o -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) audio.o -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -12,7 +12,7 @@ If you're using Arm gcc on Linux, save the following as _Makefile_ (in the repo
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ boot.o: boot.S
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES)
|
kernel8.img: boot.o $(OFILES)
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ BCM4345C0.o : BCM4345C0.hcd
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ BCM4345C0.o : BCM4345C0.hcd
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -15,7 +15,7 @@ BCM4345C0.o : BCM4345C0.hcd
|
||||||
$(GCCPATH)\aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)\aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
kernel8.img: boot.o $(OFILES) BCM4345C0.o
|
||||||
$(GCCPATH)\aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
$(GCCPATH)\aarch64-none-elf-ld -nostdlib boot.o $(OFILES) BCM4345C0.o -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)\aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)\aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
CFILES = $(wildcard *.c)
|
CFILES = $(wildcard *.c)
|
||||||
OFILES = $(CFILES:.c=.o)
|
OFILES = $(CFILES:.c=.o)
|
||||||
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles
|
||||||
GCCPATH = ../../gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin
|
GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin
|
||||||
|
|
||||||
all: clean kernel8.img
|
all: clean kernel8.img
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ audio.o : audio.bin
|
||||||
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
$(GCCPATH)/aarch64-none-elf-gcc $(GCCFLAGS) -c $< -o $@
|
||||||
|
|
||||||
kernel8.img: boot.o $(OFILES) audio.o
|
kernel8.img: boot.o $(OFILES) audio.o
|
||||||
$(GCCPATH)/aarch64-none-elf-ld -nostdlib -nostartfiles boot.o $(OFILES) audio.o -T link.ld -o kernel8.elf
|
$(GCCPATH)/aarch64-none-elf-ld -nostdlib boot.o $(OFILES) audio.o -T link.ld -o kernel8.elf
|
||||||
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
$(GCCPATH)/aarch64-none-elf-objcopy -O binary kernel8.elf kernel8.img
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue