Changeset View
Standalone View
share/mk/sys.mk
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | |||||
CFLAGS ?= -O -pipe | CFLAGS ?= -O -pipe | ||||
.else | .else | ||||
CFLAGS ?= -O2 -pipe | CFLAGS ?= -O2 -pipe | ||||
.endif | .endif | ||||
.if defined(NO_STRICT_ALIASING) | .if defined(NO_STRICT_ALIASING) | ||||
CFLAGS += -fno-strict-aliasing | CFLAGS += -fno-strict-aliasing | ||||
.endif | .endif | ||||
.endif | .endif | ||||
IR_CFLAGS ?= ${STATIC_CFLAGS:N-O*} ${CFLAGS:N-O*} | |||||
PO_CFLAGS ?= ${CFLAGS} | PO_CFLAGS ?= ${CFLAGS} | ||||
bdrewery: COMPILER_TYPE won't work in this file. sys.mk is loaded before Makefile is. We've tried to… | |||||
Done Inline ActionsWe're moving things out of sys.mk. bsd.compiler.mk was one thing. bsd.cpu.mk is also on the way out too. imp: We're moving things out of sys.mk. bsd.compiler.mk was one thing. bsd.cpu.mk is also on the way… | |||||
Done Inline ActionsI really want to merge the suffix transformation rules, perhaps into bsd.suffix.mk, and include from bsd.obj.mk. bdrewery: I really want to merge the suffix transformation rules, perhaps into bsd.suffix.mk, and include… | |||||
Done Inline ActionsMoving things into bsd.suffix.mk sounds great: I was a bit perturbed by the need to modify .SUFFIXES in two files. Does this mean that I should hold off with this patch until other changes settle out? jonathan: Moving things into bsd.suffix.mk sounds great: I was a bit perturbed by the need to modify . | |||||
# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle | # cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle | ||||
# read-only files as non-root by passing -f. | # read-only files as non-root by passing -f. | ||||
CP ?= cp -f | CP ?= cp -f | ||||
CPP ?= cpp | CPP ?= cpp | ||||
# C Type Format data is required for DTrace | # C Type Format data is required for DTrace | ||||
CTFFLAGS ?= -L VERSION | CTFFLAGS ?= -L VERSION | ||||
CTFCONVERT ?= ctfconvert | CTFCONVERT ?= ctfconvert | ||||
CTFMERGE ?= ctfmerge | CTFMERGE ?= ctfmerge | ||||
.if defined(CFLAGS) && (${CFLAGS:M-g} != "") | .if defined(CFLAGS) && (${CFLAGS:M-g} != "") | ||||
CTFFLAGS += -g | CTFFLAGS += -g | ||||
.endif | .endif | ||||
CXX ?= c++ | CXX ?= c++ | ||||
CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} | CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} | ||||
IR_CXXFLAGS ?= ${STATIC_CXXFLAGS:N-O*} ${CXXFLAGS:N-O*} | |||||
Not Done Inline ActionsWhy does this need to be global? imp: Why does this need to be global?
| |||||
Not Done Inline ActionsI suppose they don't necessarily need to be global. I was just trying to mimic the structure of PO_CXXFLAGS: defined in sys.mk and used in bsd.lib.mk (and, in the case of IR, bsd.prog.mk). jonathan: I suppose they don't necessarily need to be global. I was just trying to mimic the structure of… | |||||
PO_CXXFLAGS ?= ${CXXFLAGS} | PO_CXXFLAGS ?= ${CXXFLAGS} | ||||
DTRACE ?= dtrace | DTRACE ?= dtrace | ||||
DTRACEFLAGS ?= -C -x nolibs | DTRACEFLAGS ?= -C -x nolibs | ||||
.if empty(.MAKEFLAGS:M-s) | .if empty(.MAKEFLAGS:M-s) | ||||
ECHO ?= echo | ECHO ?= echo | ||||
ECHODIR ?= echo | ECHODIR ?= echo | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
.include "bsd.suffixes-posix.mk" | .include "bsd.suffixes-posix.mk" | ||||
.else | .else | ||||
# non-Posix rule set | # non-Posix rule set | ||||
.include "bsd.suffixes.mk" | .include "bsd.suffixes.mk" | ||||
# Pull in global settings. | # Pull in global settings. | ||||
__MAKE_CONF?=/etc/make.conf | __MAKE_CONF?=/etc/make.conf | ||||
.if exists(${__MAKE_CONF}) | .if exists(${__MAKE_CONF}) | ||||
.include "${__MAKE_CONF}" | .include "${__MAKE_CONF}" | ||||
.endif | .endif | ||||
# late include for customization | # late include for customization | ||||
.sinclude <local.sys.mk> | .sinclude <local.sys.mk> | ||||
.if defined(META_MODE) | .if defined(META_MODE) | ||||
META_MODE:= ${META_MODE:O:u} | META_MODE:= ${META_MODE:O:u} | ||||
.endif | .endif | ||||
.if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL) | .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL) | ||||
SHELL= ${__MAKE_SHELL} | SHELL= ${__MAKE_SHELL} | ||||
.SHELL: path=${__MAKE_SHELL} | .SHELL: path=${__MAKE_SHELL} | ||||
.endif | .endif | ||||
# Tell bmake to expand -V VAR by default | # Tell bmake to expand -V VAR by default | ||||
.MAKE.EXPAND_VARIABLES= yes | .MAKE.EXPAND_VARIABLES= yes | ||||
# Tell bmake the makefile preference | # Tell bmake the makefile preference | ||||
.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile | .MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile | ||||
Done Inline ActionsThese would be better in bsd.init.mk or something similar. You can't test COMPILER_TYPE here. Alternatively, make them unconditional. If the compiler doesn't understand things, it will just imp: These would be better in bsd.init.mk or something similar. You can't test COMPILER_TYPE here. | |||||
Done Inline ActionsI'd be happy to make these things unconditional, but it sounds like things are moving around in the meantime? jonathan: I'd be happy to make these things unconditional, but it sounds like things are moving around in… | |||||
# Tell bmake to always pass job tokens, regardless of target depending on | # Tell bmake to always pass job tokens, regardless of target depending on | ||||
# .MAKE or looking like ${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make. | # .MAKE or looking like ${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make. | ||||
.MAKE.ALWAYS_PASS_JOB_QUEUE= yes | .MAKE.ALWAYS_PASS_JOB_QUEUE= yes | ||||
# By default bmake does *not* use set -e | # By default bmake does *not* use set -e | ||||
# when running target scripts, this is a problem for many makefiles here. | # when running target scripts, this is a problem for many makefiles here. | ||||
# So define a shell that will do what FreeBSD expects. | # So define a shell that will do what FreeBSD expects. | ||||
.ifndef WITHOUT_SHELL_ERRCTL | .ifndef WITHOUT_SHELL_ERRCTL | ||||
Show All 20 Lines |
COMPILER_TYPE won't work in this file. sys.mk is loaded before Makefile is. We've tried to include bsd.compiler.mk this early but ran into problems.