Changeset View
Standalone View
share/mk/bsd.opts.mk
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
__DEFAULT_NO_OPTIONS = \ | __DEFAULT_NO_OPTIONS = \ | ||||
BIND_NOW \ | BIND_NOW \ | ||||
CCACHE_BUILD \ | CCACHE_BUILD \ | ||||
CTF \ | CTF \ | ||||
INIT_ALL_PATTERN \ | INIT_ALL_PATTERN \ | ||||
INIT_ALL_ZERO \ | INIT_ALL_ZERO \ | ||||
INSTALL_AS_USER \ | INSTALL_AS_USER \ | ||||
PIE \ | |||||
RETPOLINE \ | RETPOLINE \ | ||||
STALE_STAGED | STALE_STAGED | ||||
__DEFAULT_DEPENDENT_OPTIONS = \ | __DEFAULT_DEPENDENT_OPTIONS = \ | ||||
MAKE_CHECK_USE_SANDBOX/TESTS \ | MAKE_CHECK_USE_SANDBOX/TESTS \ | ||||
STAGING_MAN/STAGING \ | STAGING_MAN/STAGING \ | ||||
STAGING_PROG/STAGING \ | STAGING_PROG/STAGING \ | ||||
STALE_STAGED/STAGING \ | STALE_STAGED/STAGING \ | ||||
# | |||||
emaste: We may want to have a comment here with the reasoning behind the list. ("Default to disabling… | |||||
Not Done Inline ActionsAgreed. imp: Agreed. | |||||
# Default to disabling PIE on 32-bit architectures. The small address space | |||||
# means that ASLR is of limited effectiveness, and it may cause issues with | |||||
Not Done Inline ActionsMy suggestion is: # Default to disabling PIE on 32-bit architectures. The small address space # means that ASLR is of limited effectiveness, and it may cause issues with # some memory-hungry workloads. I can commit it with this. emaste: My suggestion is:
```
# Default to disabling PIE on 32-bit architectures. The small address… | |||||
Done Inline ActionsI'll commit with the updated comment of yours. Before this one lands, we must merge those two: Additional questions:
mw: I'll commit with the updated comment of yours. Before this one lands, we must merge those two… | |||||
# some memory-hungry workloads. | |||||
# | |||||
.if ${MACHINE_ARCH} == "armv6" || ${MACHINE_ARCH} == "armv7" \ | |||||
|| ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "mips" \ | |||||
|| ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipselhf" \ | |||||
|| ${MACHINE_ARCH} == "mipshf" || ${MACHINE_ARCH} == "mipsn32" \ | |||||
|| ${MACHINE_ARCH} == "mipsn32el" || ${MACHINE_ARCH} == "powerpc" \ | |||||
|| ${MACHINE_ARCH} == "powerpcspe" | |||||
__DEFAULT_NO_OPTIONS+= PIE | |||||
.else | |||||
__DEFAULT_YES_OPTIONS+=PIE | |||||
.endif | |||||
Not Done Inline ActionsI don't think we need to do this dance. Either the options are broken on 32-bit archs (arm, mips, powerpc and i386) in which case we should use BROKEN+=, or we can use MACHINE_ARCH because we don't seem to test MK_PIE in Makefile.inc1... imp: I don't think we need to do this dance.
Either the options are broken on 32-bit archs (arm… | |||||
Not Done Inline ActionsBROKEN isn't really right IMO, there might be a bug or two but generally the option is applicable to 32-bit, just not so useful / has open performance questions. I believe it's only tested in: share/mk/bsd.lib.mk emaste: BROKEN isn't really right IMO, there might be a bug or two but generally the option is… | |||||
Not Done Inline ActionsOK. If it works on 32-bit, but isn't desirable to be enabled there, then I agree BROKEN is the wrong mechanism... imp: OK. If it works on 32-bit, but isn't desirable to be enabled there, then I agree BROKEN is the… | |||||
Not Done Inline ActionsDuring testing I've seen that enabling PIE doesn't cause any noticeable problems on 32-bit architectures by itself, however enabling ASLR caused problems with running out of memory. Since PIE is not really interesting without ASLR, it was left disabled for 32-bit platforms. dgr_semihalf.com: During testing I've seen that enabling PIE doesn't cause any noticeable problems on 32-bit… | |||||
Not Done Inline ActionsWe can do this dance w/o the TARGET_ARCH stuff. My objection is to moving __T here since that's a src build concept... I have no objection to using MACHINE_ARCH in these if. imp: We can do this dance w/o the TARGET_ARCH stuff. My objection is to moving __T here since that's… | |||||
.include <bsd.mkopt.mk> | .include <bsd.mkopt.mk> | ||||
Not Done Inline ActionsOh, and I think the test should be *FOR* 32-bit archs and set them to NO for each. They are the exception, not the rule. No need to list all 64-bit archs that may expand in the future. 32-bit archs will only contract from here on out. imp: Oh, and I think the test should be *FOR* 32-bit archs and set them to NO for each. They are the… | |||||
Not Done Inline ActionsI note that the placement in bsd.opts.mk means we're enabling this by default for any port using bmake and including bsd.prog.mk/bsd.lib.mk, which I think is outside the scope of what's been discussed thus far... I think that's a fine choice, but definitely requires mentioning if we're wanting to explicitly do that or not and an exp-run to go with it. If we wanted to avoid it, it should be easy enough to do with something in local.init.mk, thinking along the lines of a WANT_DEFAULT_YES=PIE or even WANT_DEFAULT_PIE=yes and checking ${WANT_DEFAULT_PIE:Uno} here. kevans: I note that the placement in bsd.opts.mk means we're enabling this by default for any port… | |||||
Not Done Inline ActionsI tend to agree. *IF* we wanted to have it be different, then we should set something like this in local.init.mk or src.init.mk (I think the latter might be better, but that's a bdrewery question as to which one is better). I'm not yet convinced it should be different, but am open to the possibility. imp: I tend to agree. *IF* we wanted to have it be different, then we should set something like this… | |||||
.if ${MK_INIT_ALL_PATTERN} == "yes" && ${MK_INIT_ALL_ZERO} == "yes" | .if ${MK_INIT_ALL_PATTERN} == "yes" && ${MK_INIT_ALL_ZERO} == "yes" | ||||
.warning WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO are mutually exclusive. | .warning WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO are mutually exclusive. | ||||
.endif | .endif | ||||
# | # | ||||
# Supported NO_* options (if defined, MK_* will be forced to "no", | # Supported NO_* options (if defined, MK_* will be forced to "no", | ||||
# regardless of user's setting). | # regardless of user's setting). | ||||
# | # | ||||
Show All 21 Lines |
We may want to have a comment here with the reasoning behind the list. ("Default to disabling PIE on 32-bit architectures, because ...")