1# MINIX-specific servers/drivers options 2.include <bsd.own.mk> 3 4# LSC: Our minimal c library has no putchar, which is called by the builtin 5# functions of the compiler, so prevent using them. 6 7AFLAGS+= -D__ASSEMBLY__ 8COPTS+= -fno-builtin 9 10# LSC Static linking, order matters! 11# We can't use --start-group/--end-group as they are not supported by our 12# version of clang. 13 14# 1. No default libs 15LDADD:= -nodefaultlibs ${LDADD} 16 17# 2. Compiler-specific libs 18.if !empty(CC:M*gcc) 19LDADD+= -lsys 20.elif !empty(CC:M*clang) 21LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic 22.endif 23 24# 3. Minimal C library 25LDADD+= -lminc 26 27.if ${MACHINE_ARCH} == "earm" 28LDADD+= -lc_vfp 29 30# LSC: On ARM, when compiling statically, with gcc, lgcc_eh is required 31.if ${PROG:U} != "kernel" && !empty(CC:M*gcc) 32# gcc_eh uses abort(), which is provided by minc 33LDFLAGS+= ${${ACTIVE_CC} == "gcc":? -lgcc_eh:} 34.endif # ${PROG:U} != "kernel" && !empty(CC:M*gcc) 35 36.endif # ${MACHINE_ARCH} == "earm" 37 38.include <bsd.prog.mk> 39