Changeset View
Changeset View
Standalone View
Standalone View
lib/clang/llvm.build.mk
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | |||||
CFLAGS+= -DLLVM_NATIVE_DISASSEMBLER=LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler | CFLAGS+= -DLLVM_NATIVE_DISASSEMBLER=LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler | ||||
CFLAGS+= -DLLVM_NATIVE_TARGET=LLVMInitialize${LLVM_NATIVE_ARCH}Target | CFLAGS+= -DLLVM_NATIVE_TARGET=LLVMInitialize${LLVM_NATIVE_ARCH}Target | ||||
CFLAGS+= -DLLVM_NATIVE_TARGETINFO=LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo | CFLAGS+= -DLLVM_NATIVE_TARGETINFO=LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo | ||||
CFLAGS+= -DLLVM_NATIVE_TARGETMC=LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC | CFLAGS+= -DLLVM_NATIVE_TARGETMC=LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC | ||||
.endif | .endif | ||||
CFLAGS+= -ffunction-sections | CFLAGS+= -ffunction-sections | ||||
CFLAGS+= -fdata-sections | CFLAGS+= -fdata-sections | ||||
.include <bsd.linker.mk> | |||||
jrtc27: Shouldn't this already be included thanks to src.opts.mk -> bsd.compiler.mk -> bsd.linker.mk? I… | |||||
arichardsonAuthorUnsubmitted Done Inline ActionsI seem to recall that I got build errors without it, will see if I can drop it. arichardson: I seem to recall that I got build errors without it, will see if I can drop it. | |||||
.if ${LINKER_TYPE} == "mac" | |||||
LDFLAGS+= -Wl,-dead_strip | |||||
.else | |||||
LDFLAGS+= -Wl,--gc-sections | LDFLAGS+= -Wl,--gc-sections | ||||
.endif | |||||
CXXSTD?= c++14 | CXXSTD?= c++14 | ||||
CXXFLAGS+= -fno-exceptions | CXXFLAGS+= -fno-exceptions | ||||
CXXFLAGS+= -fno-rtti | CXXFLAGS+= -fno-rtti | ||||
.if defined(BOOTSTRAPPING) | |||||
CFLAGS+= -DLLVM_BOOTSTRAPPING | |||||
.else | |||||
CXXFLAGS.clang+= -stdlib=libc++ | CXXFLAGS.clang+= -stdlib=libc++ | ||||
.endif | |||||
.if defined(BOOTSTRAPPING) && ${.MAKE.OS} == "Linux" | |||||
LIBADD+= dl | |||||
.endif | |||||
Not Done Inline ActionsThis no longer will be passed when building the cross-toolchain on FreeBSD, which I would guess risks breaking some old system GCCs from when libstdc++ was used. I suggest adding the old .if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) to this rather than putting it in the .else. jrtc27: This no longer will be passed when building the cross-toolchain on FreeBSD, which I would guess… | |||||
Done Inline ActionsSounds good will fix. arichardson: Sounds good will fix. | |||||
.if ${MACHINE_ARCH:Mmips64} | .if ${MACHINE_ARCH:Mmips64} | ||||
STATIC_CFLAGS+= -mxgot | STATIC_CFLAGS+= -mxgot | ||||
STATIC_CXXFLAGS+= -mxgot | STATIC_CXXFLAGS+= -mxgot | ||||
.endif | .endif |
Shouldn't this already be included thanks to src.opts.mk -> bsd.compiler.mk -> bsd.linker.mk? I didn't need it in my patch.