makefile: Make non debug builds with -O3 and LTO under gcc with -fwhole-program
- Add missing BUILD_ROMS dependency to pdp11 simulator. ROMs don't change often so this usually didn't matter, but it should be a dependency.
This commit is contained in:
parent
34c4ab3cd5
commit
1792303a9e
1 changed files with 4 additions and 4 deletions
8
makefile
8
makefile
|
@ -1270,10 +1270,10 @@ ifneq ($(DEBUG),)
|
||||||
LTO =
|
LTO =
|
||||||
else
|
else
|
||||||
ifneq (,$(findstring clang,$(COMPILER_NAME))$(findstring LLVM,$(COMPILER_NAME)))
|
ifneq (,$(findstring clang,$(COMPILER_NAME))$(findstring LLVM,$(COMPILER_NAME)))
|
||||||
CFLAGS_O = -O2 -fno-strict-overflow
|
CFLAGS_O = -O3 -fno-strict-overflow
|
||||||
GCC_OPTIMIZERS_CMD = ${GCC} --help 2>&1
|
GCC_OPTIMIZERS_CMD = ${GCC} --help 2>&1
|
||||||
else
|
else
|
||||||
CFLAGS_O := -O2
|
CFLAGS_O := -O3
|
||||||
endif
|
endif
|
||||||
LDFLAGS_O =
|
LDFLAGS_O =
|
||||||
GCC_MAJOR_VERSION = $(firstword $(subst ., ,$(GCC_VERSION)))
|
GCC_MAJOR_VERSION = $(firstword $(subst ., ,$(GCC_VERSION)))
|
||||||
|
@ -1313,7 +1313,7 @@ else
|
||||||
ifneq (,$(LTO))
|
ifneq (,$(LTO))
|
||||||
ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
|
ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
|
||||||
CFLAGS_O += -flto
|
CFLAGS_O += -flto
|
||||||
ifneq (,$(and $(findstring gcc,$(COMPILER_NAME)),$(findstring -fwhole-program,$(GCC_OPTIMIZERS))))
|
ifneq (,$(and $(or $(findstring gcc,$(COMPILER_NAME)),$(findstring GCC,$(COMPILER_NAME))),$(findstring -fwhole-program,$(GCC_OPTIMIZERS))))
|
||||||
CFLAGS_O += -fwhole-program
|
CFLAGS_O += -fwhole-program
|
||||||
endif
|
endif
|
||||||
LTO_FEATURE = , with Link Time Optimization,
|
LTO_FEATURE = , with Link Time Optimization,
|
||||||
|
@ -2256,7 +2256,7 @@ endif
|
||||||
|
|
||||||
pdp11 : ${BIN}pdp11${EXE}
|
pdp11 : ${BIN}pdp11${EXE}
|
||||||
|
|
||||||
${BIN}pdp11${EXE} : ${PDP11} ${SIM}
|
${BIN}pdp11${EXE} : ${PDP11} ${SIM} ${BUILD_ROMS}
|
||||||
${MKDIRBIN}
|
${MKDIRBIN}
|
||||||
${CC} ${PDP11} ${SIM} ${PDP11_OPT} ${CC_OUTSPEC} ${LDFLAGS}
|
${CC} ${PDP11} ${SIM} ${PDP11_OPT} ${CC_OUTSPEC} ${LDFLAGS}
|
||||||
ifneq (,$(call find_test,${PDP11D},pdp11))
|
ifneq (,$(call find_test,${PDP11D},pdp11))
|
||||||
|
|
Loading…
Add table
Reference in a new issue