Fix compilation with newer GCC
authorJack Miller <Jack.Miller@amd.com>
Thu, 11 Apr 2019 22:52:40 +0000 (17:52 -0500)
committerJack Miller <jack@codezen.org>
Fri, 12 Apr 2019 17:05:37 +0000 (12:05 -0500)
Looks like -fPIC and -fstack-protector became default and are
incompatible here. Explicitly disable these features.

Makefile

index 711aa79..d3ed662 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ INCLUDE_DIRS = include/
 GIT_REV=$(shell git describe --always)
 
 CPPFLAGS = -I ${INCLUDE_DIRS} -D__GIT_VERSION__='"$(GIT_REV)"' -D__MAJOR_VERSION__=$(MAJOR) -D__MINOR_VERSION__=$(MINOR)
-CFLAGS = ${CPPFLAGS} -c -std=gnu99 -pedantic -Wall -nostdlib -ffreestanding -mcmodel=kernel -g
+CFLAGS = ${CPPFLAGS} -c -std=gnu99 -pedantic -Wall -nostdlib -ffreestanding -mcmodel=kernel -g -fno-PIC -fno-stack-protector
 LDFLAGS = -T linker.ld -nostdlib -n
 ASFLAGS =