FreeBSD Bugzilla – Attachment 222188 Details for
Bug 253275
[exp-run] base system PIE default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
enable WITH_PIE by default on 64-bit archs
D28328.diff (text/plain), 1.96 KB, created by
Ed Maste
on 2021-02-05 17:29:49 UTC
(
hide
)
Description:
enable WITH_PIE by default on 64-bit archs
Filename:
MIME Type:
Creator:
Ed Maste
Created:
2021-02-05 17:29:49 UTC
Size:
1.96 KB
patch
obsolete
>diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk >--- a/share/mk/bsd.opts.mk >+++ b/share/mk/bsd.opts.mk >@@ -75,7 +75,6 @@ > INIT_ALL_PATTERN \ > INIT_ALL_ZERO \ > INSTALL_AS_USER \ >- PIE \ > RETPOLINE \ > STALE_STAGED > >@@ -85,6 +84,27 @@ > STAGING_PROG/STAGING \ > STALE_STAGED/STAGING \ > >+# >+# Default behaviour of some options depends on the architecture. Unfortunately >+# this means that we have to test TARGET_ARCH (the buildworld case) as well >+# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not >+# used at all in bsd.*.mk, but we have to make an exception here if we want >+# to allow defaults for some things like clang to vary by target architecture. >+# Additional, per-target behavior should be rarely added only after much >+# gnashing of teeth and grinding of gears. >+# >+.if defined(TARGET_ARCH) >+__T=${TARGET_ARCH} >+.else >+__T=${MACHINE_ARCH} >+.endif >+ >+.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T:Mmips64*} || \\ >+ ${__T} == "powerpc64" || ${__T:Mriscv*} >+__DEFAULT_YES_OPTIONS+=PIE >+.else >+__DEFAULT_NO_OPTIONS+=PIE >+.endif > > .include <bsd.mkopt.mk> > >diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk >--- a/share/mk/src.opts.mk >+++ b/share/mk/src.opts.mk >@@ -243,21 +243,6 @@ > __DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var} > .endfor > >-# >-# Default behaviour of some options depends on the architecture. Unfortunately >-# this means that we have to test TARGET_ARCH (the buildworld case) as well >-# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not >-# used at all in bsd.*.mk, but we have to make an exception here if we want >-# to allow defaults for some things like clang to vary by target architecture. >-# Additional, per-target behavior should be rarely added only after much >-# gnashing of teeth and grinding of gears. >-# >-.if defined(TARGET_ARCH) >-__T=${TARGET_ARCH} >-.else >-__T=${MACHINE_ARCH} >-.endif >- > # All supported backends for LLVM_TARGET_XXX > __LLVM_TARGETS= \ > aarch64 \ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253275
: 222188