Blame project/extras.mk

79e62f
./src/internal/version.o:	build/version.h
79e62f
./src/internal/version.lo:	build/version.h
bfd503
bfd503
# libc.so
bfd503
SHARED_OBJS      += $(LDSO_OBJS)
bfd503
bfd503
LDFLAGS_COMMON   += -nostdlib
bfd503
LDFLAGS_COMMON   += -Wl,-Bsymbolic-functions
bfd503
LDFLAGS_COMMON   += -Wl,--sort-common
bfd503
LDFLAGS_COMMON   += -Wl,--gc-sections
bfd503
LDFLAGS_COMMON   += -Wl,--no-undefined
bfd503
LDFLAGS_COMMON   += -Wl,--exclude-libs=ALL
bfd503
bfd503
LDFLAGS_COMMON   += -Wl,-e              -Wl,_dlstart
bfd503
LDFLAGS_COMMON   += -Wl,--sort-section  -Wl,alignment
bfd503
bfd503
SHARED_LIB_DEPS  += -lgcc -lgcc_eh
d01251
9a3eef
ifeq ($(CC_BINFMT),ELF)
9a3eef
LDFLAGS_COMMON   += -Wl,--hash-style    -Wl,both
9a3eef
endif
9a3eef
d01251
# common cflags
d01251
CFLAGS_COMMON    += -fdata-sections
d01251
CFLAGS_COMMON    += -ffunction-sections
d01251
CFLAGS_COMMON    += -fno-unwind-tables
d01251
CFLAGS_COMMON    += -fno-asynchronous-unwind-tables
d01251
CFLAGS_COMMON    += -frounding-math
d01251
CFLAGS_COMMON    += -fexcess-precision=standard
e22b08
633b76
# assembler cflags
633b76
ifeq ($(CC_BINFMT),ELF)
633b76
CFLAGS_ASM       += -Wa,--noexecstack
633b76
CFLAGS_CONFIG    += $(CFLAGS_ASM)
633b76
endif
633b76
e22b08
# memory modules
e22b08
libc_mem_modules  = \
e22b08
	./src/string/memcpy.c \
e22b08
	./src/string/memmove.c \
e22b08
	./src/string/memcmp.c   \
e22b08
	./src/string/memset.c
e22b08
e22b08
libc_mem_objs     = $(libc_mem_modules:%.c=%.o)
e22b08
libc_mem_lobjs    = $(libc_mem_modules:%.c=%.lo)
e22b08
e22b08
$(libc_mem_objs):   CFLAGS_CONFIG += -fno-tree-loop-distribute-patterns
e22b08
$(libc_mem_lobjs):  CFLAGS_CONFIG += -fno-tree-loop-distribute-patterns