2011-07-09 15:04:42 +02:00
|
|
|
# MINIX-specific servers/drivers options
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
# LSC: Our minimal c library has no putchar, which is called by the builtin
|
|
|
|
# functions of the compiler, so prevent using them.
|
|
|
|
|
|
|
|
AFLAGS+= -D__ASSEMBLY__
|
|
|
|
COPTS+= -fno-builtin
|
|
|
|
|
2013-02-28 11:06:24 +01:00
|
|
|
# LSC Static linking, order matters!
|
|
|
|
# We can't use --start-group/--end-group as they are not supported by our
|
|
|
|
# version of clang.
|
|
|
|
|
|
|
|
# 1. No default libs
|
2013-04-24 18:57:59 +02:00
|
|
|
LDADD:= -nodefaultlibs ${LDADD}
|
2013-02-28 11:06:24 +01:00
|
|
|
|
|
|
|
# 2. Compiler-specific libs
|
|
|
|
.if !empty(CC:M*gcc)
|
|
|
|
LDADD+= -lsys
|
2014-03-24 16:31:17 +01:00
|
|
|
DPADD+= ${LIBSYS}
|
2013-02-28 11:06:24 +01:00
|
|
|
.elif !empty(CC:M*clang)
|
|
|
|
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# 3. Minimal C library
|
|
|
|
LDADD+= -lminc
|
2014-03-24 16:31:17 +01:00
|
|
|
DPADD+= ${LIBMINC}
|
2013-02-28 11:06:24 +01:00
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
.if ${MACHINE_ARCH} == "earm"
|
|
|
|
LDADD+= -lc_vfp
|
|
|
|
|
|
|
|
# LSC: On ARM, when compiling statically, with gcc, lgcc_eh is required
|
|
|
|
.if ${PROG:U} != "kernel" && !empty(CC:M*gcc)
|
|
|
|
# gcc_eh uses abort(), which is provided by minc
|
|
|
|
LDFLAGS+= ${${ACTIVE_CC} == "gcc":? -lgcc_eh:}
|
|
|
|
.endif # ${PROG:U} != "kernel" && !empty(CC:M*gcc)
|
|
|
|
|
|
|
|
.endif # ${MACHINE_ARCH} == "earm"
|
|
|
|
|
2014-03-05 12:21:55 +01:00
|
|
|
# Get (more) internal minix definitions and declarations.
|
|
|
|
CPPFLAGS += -D_MINIX_SYSTEM=1
|
|
|
|
|
2013-02-28 11:06:24 +01:00
|
|
|
.include <bsd.prog.mk>
|