Cleanup flags and crtend/crtbein

This commit is contained in:
Baptiste Wicht 2016-08-20 10:34:39 +02:00
parent 9625b32ff5
commit a0dc809f36
3 changed files with 8 additions and 4 deletions

4
cpp.mk
View File

@ -42,10 +42,6 @@ LIB_LINK_FLAGS=$(COMMON_CPP_FLAGS) $(FLAGS_64) $(WARNING_FLAGS) -mcmodel=small -
PROGRAM_FLAGS=$(COMMON_CPP_FLAGS) $(FLAGS_64) $(WARNING_FLAGS) -I../../tlib/include/ -I../../printf/include/ -static -L../../tlib/debug/ -ltlib -mcmodel=small -fPIC
PROGRAM_LINK_FLAGS=$(COMMON_CPP_FLAGS) $(FLAGS_64) $(WARNING_FLAGS) $(COMMON_LINK_FLAGS) -static -L../../tlib/debug/ -ltlib -mcmodel=small -fPIC -z max-page-size=0x1000 -T ../linker.ld -Wl,-gc-sections
# Ask GCC for the crtbegin and crtend files
CRTBEGIN_OBJ:=$(shell $(CXX) -print-file-name=crtbegin.o)
CRTEND_OBJ:=$(shell $(CXX) -print-file-name=crtend.o)
NO_COLOR=\x1b[0m
MODE_COLOR=\x1b[31;01m
FILE_COLOR=\x1b[35;01m

View File

@ -4,6 +4,10 @@ include ../cpp.mk
THOR_FLAGS=-DCONFIG_HISTORY=y
# Ask GCC for the crtbegin and crtend files
CRTBEGIN_OBJ:=$(shell $(CXX) $(KERNEL_CPP_FLAGS_64) -print-file-name=crtbegin.o)
CRTEND_OBJ:=$(shell $(CXX) $(KERNEL_CPP_FLAGS_64) -print-file-name=crtend.o)
# The link files provided by the compiler
SPECIAL_O_FILES=$(CRTBEGIN_OBJ) $(CRTEND_OBJ)

View File

@ -2,6 +2,10 @@ default: debug/libtlib.a
include ../cpp.mk
# Ask GCC for the crtbegin and crtend files
CRTBEGIN_OBJ:=$(shell $(CXX) $(LIB_FLAGS) -print-file-name=crtbegin.o)
CRTEND_OBJ:=$(shell $(CXX) $(LIB_FLAGS) -print-file-name=crtend.o)
# The files provided directly by the compiler
SPECIAL_O_FILES=$(CRTBEGIN_OBJ) $(CRTEND_OBJ)