Changeset View
Changeset View
Standalone View
Standalone View
head/sys/conf/kern.mk
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | |||||
.elif ${CSTD} == "c94" || ${CSTD} == "c95" | .elif ${CSTD} == "c94" || ${CSTD} == "c95" | ||||
CFLAGS+= -std=iso9899:199409 | CFLAGS+= -std=iso9899:199409 | ||||
.elif ${CSTD} == "c99" | .elif ${CSTD} == "c99" | ||||
CFLAGS+= -std=iso9899:1999 | CFLAGS+= -std=iso9899:1999 | ||||
.else # CSTD | .else # CSTD | ||||
CFLAGS+= -std=${CSTD} | CFLAGS+= -std=${CSTD} | ||||
.endif # CSTD | .endif # CSTD | ||||
# Please keep this if in sync with bsd.sys.mk | |||||
.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") | |||||
# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". | |||||
# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. | |||||
.if ${COMPILER_TYPE} == "clang" | |||||
# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the | |||||
# flags required when linking the kernel. We don't need those flags when | |||||
# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. | |||||
CCLDFLAGS+= -fuse-ld=${LD:[1]} | |||||
.else | |||||
# GCC does not support an absolute path for -fuse-ld so we just print this | |||||
# warning instead and let the user add the required symlinks. | |||||
.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported | |||||
.endif | |||||
.endif | |||||
# Set target-specific linker emulation name. | # Set target-specific linker emulation name. | ||||
LD_EMULATION_aarch64=aarch64elf | LD_EMULATION_aarch64=aarch64elf | ||||
LD_EMULATION_amd64=elf_x86_64_fbsd | LD_EMULATION_amd64=elf_x86_64_fbsd | ||||
LD_EMULATION_arm=armelf_fbsd | LD_EMULATION_arm=armelf_fbsd | ||||
LD_EMULATION_armv6=armelf_fbsd | LD_EMULATION_armv6=armelf_fbsd | ||||
LD_EMULATION_armv7=armelf_fbsd | LD_EMULATION_armv7=armelf_fbsd | ||||
LD_EMULATION_i386=elf_i386_fbsd | LD_EMULATION_i386=elf_i386_fbsd | ||||
LD_EMULATION_mips= elf32btsmip_fbsd | LD_EMULATION_mips= elf32btsmip_fbsd | ||||
Show All 15 Lines |