summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
AgeCommit message (Collapse)AuthorFilesLines
2021-07-02mk: Add LP32PLATFORMSnia1-3/+13
2020-06-07mk/bsd.prefs.mk: add PKG_DBDIR to show-all-dirsrillig1-1/+2
2020-03-22mk/bsd.prefs.mk: add PREFIX to show-all-dirsrillig1-2/+2
2020-01-21Set native X11BASE on NetBSD to /usr/X11R7 unconditionallykamil1-2/+2
This is the default option for more than a decade now.
2019-11-09Add SCO Unix to the ELF pile.maya1-1/+3
Blind commit intended to help PR pkg/54681
2019-05-07mk: allow "bmake clean depends" as shortcutrillig1-1/+6
When "bmake clean depends" was called for a package where the various cookie files already existed, these would enable different rules than a clean package directory. Since "bmake clean" deletes all the cookie files before "bmake depends" starts, in these combined command lines the cookie files must be treated as absent.
2019-01-06bsd.prefs.mk: set OS_VARIANT=Microsoft if used under WSL.bsiegert1-1/+5
WSL is Windows Services for Linux, aka "bash on Ubuntu on Windows". Some packages need to differentiate plain Linux and running on WSL. Patch from David Weller-Fahy via PR pkg/53806.
2018-11-12mk: Add CTF infrastructure support.jperkin1-1/+15
Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the user enables support by setting PKGSRC_USE_CTF=yes, and packages can explicitly disable support with CTF_SUPPORTED=no or skip certain files with CTF_FILES_SKIP. The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert. If all of the requisite variables are enabled, a compiler-specific debug flag is passed via the wrappers to ensure we have DWARF information to convert, _INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped prior to conversion, and the conversion is performed during the install stage. It is recommended that users who enable the feature also set STRIP_DEBUG=yes to reduce the final binary size once the conversion has been performed. This has been used for the past year in Joyent SmartOS builds. FreeBSD is marked as supported but is untested.
2018-10-29Minix 3 is ELF basedsevan1-1/+3
2018-10-28libcompat_minix was removed some years back and minlib does not exist as asevan1-2/+1
linkable library in 3.4RC6 so don't try to link against these.
2018-10-28Minix runs on platforms besides x86, match GNU config.guess.sevan1-2/+2
2018-07-16mips64 is more likely not 64bit.maya1-3/+2
2018-05-23Describe some of the security mitigation flags and their impactmaya1-1/+25
2018-01-15mk: Introduce *_SUPPORTED variables for security features.jperkin1-13/+19
Using variables such as PKGSRC_USE_SSP in package Makefiles to disable SSP does not work due to the parsing order in bsd.prefs.mk. Even if it did, it's not a good idea to mix user and package settable variables, and would cause issues in complex packages where bsd.prefs.mk is included early (e.g. Makefile.common). Packages can now set {MKPIE,MKREPRO,FORTIFY,RELRO,SSP,STACK_CHECK}_SUPPORTED=no to correctly disable security features if necessary.
2017-11-12Add initial support for building packages reproduciblykhorben1-1/+7
It currently tackles two problems: - gcc(1) hard-coding full paths in debugging information (with one caveat at the moment) - ar(1) hard-coding user IDs in archive headers This allows packages built from the same tree and options to produce identical results bit by bit. This option should be combined with ASLR and PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to exploit security vulnerabilities. This is still disabled by default, and only supports NetBSD so far. As discussed on tech-pkg@
2017-11-03Support OS_VARIANT on Linux, support ChromeOS.bsiegert1-1/+7
This adds a detection for Chrome OS and Chromium OS based on /etc/lsb-release, which sets LOWER_VENDOR, like for other Linux distros. It also sets OS_VARIANT to the value of LOWER_VENDOR, so we can have conditionals for ChromeOS. It is missing some things that are silently assumed to be part of Linux base systems, such as POSIX attr support, NIS and more. ok jperkin@
2017-07-09Register support for PKGSRC_USE_STACK_CHECKkhorben1-1/+7
This adds -fstack-check to the CFLAGS (with GCC on NetBSD x86). Only tested on NetBSD/amd64 so far. Disabled by default.
2017-06-01Provide switch to activate new frameworks to replace "pkginstall".jlam1-1/+8
If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks", "init", and "pkgformat/pkg"-scripts frameworks instead of the existing "pkginstall" framework.
2017-05-31Move detection of shared library type into the platform file.jlam1-1/+4
Only four platforms, all BSDs, need to resolve "ELF/a.out" into either ELF or a.out. Calculate it directly in the platform file and return the value in ${_OPSYS_SHLIB_TYPE} and export that value in bsd.prefs.mk as ${SHLIB_TYPE}. Instead of requiring the file(1) tool, we can expect the base system of those BSDs to have /usr/bin/file, so make use of it directly.
2017-04-16Add granularity to PKGSRC_USE_FORTIFY and PKGSRC_USE_RELROkhorben1-3/+3
The new options are, for FORTIFY: "no" Do not pass any flags for FORTIFY "weak" Pass -D_FORTIFY_SOURCE=1 "strong" Pass -D_FORTIFY_SOURCE=2 This allows users to reduce the level of FORTIFY specified if necessary or desired. The previous setting as "yes" is now equivalent to "strong" (the default when enabling). The new options are, for RELRO: "no" Do not pass any flags for RELRO "partial" Pass -Wl,-z,relro "full" Pass -Wl,-z,relro -Wl,-z,now This allows users to reduce the level of RELRO specified if necessary or desired. The previous setting as "yes" is now equivalent to "full" (the default when enabling). This is intended to match the changes committed by jperkin@ (for SSP) after our discussion a (long) while back. No functional change intended (with the settings supported so far).
2017-02-01powerpc64le is little endian.sevan1-3/+3
2016-10-27Add support for enabling cwrappers automatically. USE_CWRAPPERS now defaultsjperkin1-3/+8
to "auto", which will enable cwrappers if the _OPSYS_SUPPORTS_CWRAPPERS platform variable is set to "yes". Switch over to cwrappers by default for Darwin, Linux, and SunOS (except when using the sunpro compiler).
2016-06-13Change PKGSRC_USE_SSP to a quad option. The options are now:jperkin1-2/+2
"no" Do not pass any stack protection flags (the default) "yes" Pass -fstack-protector "strong" Pass -fstack-protector-strong "all" Pass -fstack-protector-all This allows users to configure the level of stack smashing protection they require, and ensures consistent behaviour across platforms. Users running on NetBSD who previously used the option will need to change "yes" to "all" to match the previous default configuration for that platform. While here use _WRAP_EXTRA_ARGS to ensure the flag gets passed regardless of whether the package honours CFLAGS, and support additional wrappers. Discussed a while back with khorben, and used in production for the SmartOS 2016Q1 package sets with the "strong" option.
2016-04-17Revert part of the MACHINE_ARCH cleanup that resulted in the Linux/x86_64jperkin1-2/+2
triplet reporting as x86_64-pc-linux. Go back to the previous triplet of x86_64-unknown-linux which matches what config.guess outputs.
2016-04-10Remove support for USE_DESTDIR=no.joerg1-10/+3
2016-04-10Remove last glue for PKG_DESTDIR_SUPPORT=none.joerg1-7/+1
2016-04-10Drop support for PKG_DESTDIR_SUPPORT=none.joerg1-9/+4
2016-03-17Since the MACHINE_ARCH cleanup, the bootstrap for i386-on-x86_64 Linux hasjperkin1-1/+5
been broken due to NATIVE_MACHINE_ARCH no longer being set to x86_64. Fix this by introducing HOST_MACHINE_ARCH which refers to the underlying host architecture rather than bmake's native architecture, thus differentiating between cross-compiling and multilib. This is currently only set on Linux as the only OPSYS which currently requires such a test, but can be expanded to other OPSYS as necessary.
2016-03-11Re-arrange support for FORTIFY/MKPIE/RELRO/SSPkhorben1-13/+8
- No _GCC_* anything in mk/bsd.prefs.mk; - No compiler flags in platform files. Tested again on NetBSD/amd64, with and without cwrappers, with the same outcome. With feedback from jperkin@
2016-03-11Add support for a number of security featureskhorben1-1/+30
- Revisit (and rename) support for FORTIFY as PKGSRC_USE_FORTIFY (instead of PKGSRC_USE_FORT) for easier support outside NetBSD/gcc; - PKGSRC_USE_SSP is no longer enabled by default when PKGSRC_USE_FORTIFY is enabled; - PKGSRC_MKPIE builds executables as PIE (to leverage userland ASLR) - PKGSRC_USE_RELRO builds with a read-only GOT to prevent some exploits from functioning. Tested on NetBSD/amd64 by myself, in every combination, with and without pkgtools/cwrappers. MKPIE is not supported at the moment with cwrappers. Also, MKPIE is known to still break a number of packages when enabled (and actually supported). Tested on SunOS by jperkin@, thank you! As discussed on tech-pkg@, the default behavior is not changed, except where noted above. ok bsiegert@
2016-03-11let's do just "Solaris" instead of "Oracle"tnn1-2/+2
The only current use of this is pbulk's subject line, and Solaris 11.3 makes more sense than Oracle 11.3.
2016-03-11for SunOS, assume that OS_VARIANT is Oracle if no match on other variantstnn1-2/+5
for OmniOS, stop processing /etc/release after the first line
2016-03-10Remove _OPSYS_WHOLE_ARCHIVE_FLAG and _OPSYS_NO_WHOLE_ARCHIVE_FLAG, thesejperkin1-7/+1
variables are unused and in at least one case were completely wrong anyway.
2016-01-24Attempt to bring sanity to how ABI and MACHINE_ARCH are set.jperkin1-104/+5
Previously there were at least 5 different ways MACHINE_ARCH could be set, some statically and some at run time, and in many cases these settings differed, leading to issues at pkg_add time where there was conflict between the setting encoded into the package and that used by pkg_install. Instead, move to a single source of truth where the correct value based on the host and the chosen (or default) ABI is determined in the bootstrap script. The value can still be overridden in mk.conf if necessary, e.g. for cross-compiling. ABI is now set by default and if unset a default is calculated based on MACHINE_ARCH. This fixes some OS, e.g. Linux, where the wrong default was previously chosen. As a result of the refactoring there is no need for LOWER_ARCH, with references to it replaced by MACHINE_ARCH. SPARC_TARGET_ARCH is also removed.
2016-01-12Added keyword "platform" for "bmake help"rillig1-2/+2
2015-12-27Make USE_DESTDIR != yes an error.joerg1-1/+2
2015-11-07With OpenBSD/amd64 & Bitrig/amd64 switched to using MACHINE_ARCH=x86_64,sevan1-4/+4
amd64 no longer needs to be accounted for specifically. Remove redundant references. Reviewed by wiz@
2015-11-07Add the necessary logic for setting Bitrig/amd64 to Bitrig/x86_64.sevan1-2/+7
Switch to using arch(1) to populate $LOWER_ARCH on Bitrig Reviewed by wiz@
2015-11-07Add the necessary logic for setting OpenBSD/amd64 to OpenBSD/x86_64.sevan1-1/+12
Reviewed by wiz@
2015-10-17Add the mapping for amd64 to its GNU architecture name x86_64.sevan1-1/+2
Needed for switching OpenBSD/amd64 & Bitrig/amd64 to x86_64. Reviewed by wiz@
2015-09-08Ensure OBJECT_FMT is set to ELF on Linux rather than relying on the NetBSDjperkin1-1/+3
MAHCINE_ARCH settings in bsd.own.mk. Fixes at least Sevan's arm64 host.
2015-09-08Remove NetBSD 0.x and 1.x settings, these have long since been unsupported.jperkin1-23/+1
2015-07-25Introduce $LOWER_VARIANT_VERSION, this is used to store version info for variantsevan1-1/+3
Operating Systems. For SmartOS, store the result from running uname -v & trimming the joyent_ prefix. For OmniOS, store the result from processing /etc/release with awk(1) Reviewed by joerg@ bsiegert@
2015-07-04Remove USE_X11BASE and X11PREFIX.joerg1-3/+1
2015-06-04Introduce preliminary support for Bitrig to pkgsrcsevan1-1/+8
Initial patchset to add support by rodent@ Further adjustments made based on feedback by joerg@ Tested by myself with numerous bulkbuilds thanks to Patrick Wildt @ Bitrig Reviewed by bsiegert@ joerg@ wiz@
2015-04-29Introduce _USE_CWRAPPERS logic to ensure consistency, USE_CWRAPPERS couldjperkin1-1/+8
differ between a package and user setting, resulting in incorrect WRAPPER_* values being set from wrapper-defs.mk.
2015-04-27correct MACHINE_ARCH and compiler flags for HP-UX 64-bit ABItnn1-6/+12
2015-04-19Specify safer WRKSRC for meta packages. As they don't extract files,joerg1-1/+3
they won't create the subdirectory either. Since the SUBST targets try to change to WRKSRC first, they fail. This is seen with meta packages depending on Freetype2 when using X11_TYPE=native.
2015-03-14OS X Tiger & prior used X11 from XFree86 project which is installed insevan1-1/+3
/usr/X11R6, set X11BASE to this location on those versions. Reviewed by wiz@
2015-02-24Fix typo: NATIVE_MACHINE_ARCH, not NATIVE-MACHINE_ARCH. Thanks, prlw1!riastradh1-2/+2