Bunch of options to make the machine code slick

This commit is contained in:
Imbus 2024-06-23 15:06:21 +02:00
parent 5e7deadb65
commit e24b2f7904

View file

@ -4,6 +4,10 @@ CC = gcc
CFLAGS = -Wall -Wextra -Werror -Wno-unused-parameter CFLAGS = -Wall -Wextra -Werror -Wno-unused-parameter
CFLAGS += -Wno-unused-variable -Wno-unused-function CFLAGS += -Wno-unused-variable -Wno-unused-function
CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label
CFLAGS += -Wno-unused-result -Wno-unused-const-variable
CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables -fno-ident
CFLAGS += -fno-unwind-tables -fno-stack-protector -fno-plt -fno-pic
CFLAGS += -O3 -std=c99 -march=native -mtune=native -fomit-frame-pointer
C_SOURCES = $(wildcard *.c) C_SOURCES = $(wildcard *.c)
C_HEADERS = $(wildcard *.h) C_HEADERS = $(wildcard *.h)
@ -19,6 +23,7 @@ all: $(OBJECTS)
%.s: %.c $(C_HEADERS) %.s: %.c $(C_HEADERS)
@echo "CC $<" @echo "CC $<"
@$(CC) $(CFLAGS) -S -masm=intel $< @$(CC) $(CFLAGS) -S -masm=intel $<
wc -l $@
clean: clean:
rm -f $(OBJECTS) $(ASMS) rm -f $(OBJECTS) $(ASMS)