Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.sys.mk
Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | |||||
CFLAGS+= ${CFLAGS.${.IMPSRC:T}} | CFLAGS+= ${CFLAGS.${.IMPSRC:T}} | ||||
CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} | CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} | ||||
LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} | LDFLAGS+= ${LDFLAGS.${LINKER_TYPE}} | ||||
# Only allow .TARGET when not using PROGS as it has the same syntax | # Only allow .TARGET when not using PROGS as it has the same syntax | ||||
# per PROG which is ambiguous with this syntax. This is only needed | # per PROG which is ambiguous with this syntax. This is only needed | ||||
# for PROG_VARS vars. | # for PROG_VARS vars. | ||||
.if !defined(_RECURSING_PROGS) | # | ||||
# Some directories (currently just clang) also need to disable this since | |||||
emaste: I might expand this comment slightly, it's really a bug (but one that's probably too awkward to… | |||||
Done Inline ActionsAck. I also note it's stale from when I thought I'd need it for LLD too... jrtc27: Ack. I also note it's stale from when I thought I'd need it for LLD too... | |||||
# CFLAGS.${COMPILER_TYPE}, CFLAGS.${.IMPSRC:T} and CFLAGS.${.TARGET:T} all live | |||||
# in the same namespace, meaning that, for example, GCC builds of clang pick up | |||||
# CFLAGS.clang via CFLAGS.${.TARGET:T} and thus try to pass Clang-specific | |||||
# flags. Ideally the different sources of CFLAGS would be namespaced to avoid | |||||
# collisions. | |||||
.if !defined(_RECURSING_PROGS) && !defined(NO_TARGET_FLAGS) | |||||
Not Done Inline ActionsWhy _RECURSING_PROGS here. I could find no discussion on that aspect of things... The rest is fine. imp: Why _RECURSING_PROGS here. I could find no discussion on that aspect of things...
The rest is… | |||||
Done Inline ActionsThat was already there; it's because bsd.progs.mk uses CFLAGS.$PROG itself (see the existing part of this comment). jrtc27: That was already there; it's because bsd.progs.mk uses CFLAGS.$PROG itself (see the existing… | |||||
.if ${MK_WARNS} != "no" | .if ${MK_WARNS} != "no" | ||||
CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} | CFLAGS+= ${CWARNFLAGS.${.TARGET:T}} | ||||
.endif | .endif | ||||
CFLAGS+= ${CFLAGS.${.TARGET:T}} | CFLAGS+= ${CFLAGS.${.TARGET:T}} | ||||
CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} | CXXFLAGS+= ${CXXFLAGS.${.TARGET:T}} | ||||
LDFLAGS+= ${LDFLAGS.${.TARGET:T}} | LDFLAGS+= ${LDFLAGS.${.TARGET:T}} | ||||
LDADD+= ${LDADD.${.TARGET:T}} | LDADD+= ${LDADD.${.TARGET:T}} | ||||
LIBADD+= ${LIBADD.${.TARGET:T}} | LIBADD+= ${LIBADD.${.TARGET:T}} | ||||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |
I might expand this comment slightly, it's really a bug (but one that's probably too awkward to fix) that we put the compiler type and the target in the same namespace.