summaryrefslogtreecommitdiff
path: root/mk/platform
AgeCommit message (Collapse)AuthorFilesLines
2017-11-21Add /usr/local for include and libdir on ChromeOS.bsiegert1-1/+6
Third-party (i.e. non-pkgsrc) C toolchains (I am using chromebrew) install to /usr/local, as that is where you can have write access. With this, a bootstrap on ChromeOS finishes successfully.
2017-11-12Add initial support for building packages reproduciblykhorben1-1/+4
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-01Typokhorben1-3/+3
2017-10-10mk/platform: Remove unsupported Darwin/SunOS linker arguments.jperkin2-2/+5
2017-10-03mk: Disable SSP checks on systems where it is provided in libc.jperkin3-3/+6
The currently implementation of SSP checks simply look for a DT_NEEDED dependency on libssp, and doesn't yet have a way to check for it being enabled when it is done via libc.
2017-08-07Remove hack working around NetBSD 1.5's specfiles.maya2-10/+2
2017-08-07Disable fortify on netbsd<6.maya1-1/+6
This appears to be causing issues with pkgsrc GCC attempting to insert builtins it does not have, because we don't build libssp. unbreaks icu build. there may be more problems from this issue in the future, but netbsd-7 is better tested now.
2017-08-04Disable fortify on Linux when optimisation is not enabled, it is notjperkin1-2/+5
supported in that configuration and warnings are issued from the system headers.
2017-07-24Don't bother with a version check for alpha cflagsmaya1-6/+3
2017-07-09Define PKG_HAVE_KQUEUE where available.schmonz1-1/+6
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-07-04Implement a check for RELROkhorben1-2/+4
This is only performed if PKG_DEVELOPER and RELRO are in use. After a suggestion during my talk at BSDCan 2017; thanks! Also, submitted on tech-pkg@ for review mid-June. As a next step, it seems this can be extended to libraries, just like the check for SHLIBS does (from which this is inspired).
2017-06-21Set LIBABISUFFIX correctly on SunOS/sparc64. Tested by Jörn Clausen asjperkin1-4/+4
part of PR#52250.
2017-06-09Register support for RELRO on Linux (limited to x86 first)khorben1-1/+7
Tested on Debian GNU/Linux 8.8 (amd64). Actual support will depend on the underlying distribution though.
2017-06-09Register support for SSP on Linux (limited to x86 first)khorben1-1/+7
Tested on Debian GNU/Linux 8.8 (amd64). Actual support will depend on the underlying distribution though.
2017-06-09Register support for FORTIFY on Linuxkhorben1-1/+4
Tested on Debian GNU/Linux 8.8 (amd64). Actual support will depend on the underlying distribution though.
2017-05-31Move detection of shared library type into the platform file.jlam4-8/+40
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-05-18Register support for SSP on FreeBSD and clang (on x86 architectures)khorben1-1/+7
Support for SSP (Stack-Smashing Protection) is optional so this should not affect default builds. Tested on FreeBSD/amd64 (10.3-RELEASE-p11)
2017-05-08Default to pkgsrc terminfo. The curses default was switched to pkgsrc ajperkin1-3/+6
while ago, but since then any packages that included both curses and terminfo ended up with conflicting BUILDLINK_TRANSFORM entries, leaving it to include ordering to determine whether the builtin or pkgsrc curses was used. This keeps them in sync, at least by default, though ideally we'd ensure that at an infrastructure level.
2017-03-08Mark SunOS as _INCOMPAT_CURSES, there are lots of issues with the recent workjperkin1-1/+6
to use the curses framework and this is the simplest solution for now.
2017-02-01MACHINE_ARCH is set to powerpc64le during bootstrap, adjust if statement tosevan1-2/+2
check for new value.
2017-02-01Indent conditionals to improve legibility. No functional change.jperkin1-14/+14
2017-02-01Add ppc64le paths from the Debian/Ubuntu multiarch hierarchy.sevan1-1/+6
Tested on Ubuntu for POWER8. Thanks to John Klos.
2017-01-17Bump LIBTOOL_REQD, newer version needed for cwrappers.wiz1-2/+1
PR 51826.
2017-01-17Cache and use computed variables.jperkin1-2/+6
2016-12-04Enable cwrappers for Dragonfly and FreeBSD. Remove Linux emulation (gone)bsiegert2-3/+5
for Dragonfly. From David Shao in PR pkg/51688.
2016-11-13fix the test for <poll.h>/<sys/poll.h> - use _OPSYS_INCLUDE_DIRS insteadjdolecek1-2/+2
of assuming /usr/include; this fixes compilation of net/socat, which has broken !HAVE_POLL code
2016-10-28Enable cwrappers by default on OpenBSD.jperkin1-1/+3
2016-10-27Enable cwrappers by default on NetBSD.wiz1-1/+3
2016-10-27Add support for enabling cwrappers automatically. USE_CWRAPPERS now defaultsjperkin3-3/+12
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-10-25DragonFly: Update _OPSYS_SYSTEM_RPATHmarino1-2/+2
It's going on 10 years since gcc 3.4 and gcc 4.1 were part of DragonFly. DF Release 4.4 is the earliest with any kind of support and the earliest possible GCC version is 4.7 there.
2016-09-17set LIBABISUFFIX to /aarch64-linux-gnu for arm64richard1-4/+5
simplifies _OPSYS_SYSTEM_RPATH and _OPSYS_LIB_DIRS permitting lots of stuff using LIBABISUFFIX to work now. TODO: probably similar for the armv7 platforms as the pattern '${MACHINE_ARCH}-${LOWER_OPSYS}-gnu${APPEND_ABI}' seems like it should work for both.
2016-09-06Support UNLIMIT_RESOURCES=cputime on Darwin.jperkin1-2/+3
2016-08-25Support UNLIMIT_RESOURCES=cputime on SunOS.jperkin1-1/+2
2016-08-24Add experimental aarch64 support (amlogic s905 under ubuntu)richard1-1/+5
2016-07-08Opt to prefer OpenSSL from pkgsrc rather than a builtin version for all ↵sevan1-3/+1
versions rather than just 10.7 or newer. There is no good reason to opt for the builtin on the legacy release prior as they're unmaintained.
2016-06-29DragonFly BSD ships with GCC 5.x as the compiler, add its library location ↵sevan1-2/+2
to _OPSYS_SYSTEM_RPATH
2016-03-17Since the MACHINE_ARCH cleanup, the bootstrap for i386-on-x86_64 Linux hasjperkin1-2/+2
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/SSPkhorben2-13/+3
- 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 featureskhorben2-13/+37
- 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-11Strip --enable-new-dtags GNU ld arg on Darwin and SunOS.fhajny2-2/+6
2016-03-10Remove _OPSYS_WHOLE_ARCHIVE_FLAG and _OPSYS_NO_WHOLE_ARCHIVE_FLAG, thesejperkin23-148/+22
variables are unused and in at least one case were completely wrong anyway.
2016-03-04pass correct ABI via OBJECT_MODE environment variable on AIXtnn1-1/+9
It turns out a handful of AIX binutil-like utilities are particular about type of object files they should examine. Instead of piping through flags for each utility everywhere, it is easier to just export 'OBJECT_MODE=[32|64]' instead. From Eric N. Vander Weele.
2016-02-29Remove a commonly used set of GNU ld arguments which are incompatiblejperkin1-1/+13
with the Darwin linker. Fixes various packages.
2016-02-24Default to the system libuuid. The system headers assume that the libuuidjperkin1-1/+2
header provides the uuid_string_t typedef, which is not the case with the version coming from pkgsrc.
2016-02-22Export OSX_VERSION (renamed from OSX_VERS) to the environment regardless ofjperkin1-9/+10
whether we're using the SDK path or /usr/include, as it is useful for other contexts than simply determining the SDK directory.
2015-12-14Extend the El Capitan HFS+ bug workaround to 15.1.0 but no further, I canjperkin1-2/+2
confirm that Apple fixed the bug in the recent 15.2.0 (10.11.2) update.
2015-12-13Define MACOSX_DEPLOYMENT_TARGET for Tiger to allow current releasessevan1-1/+8
of software such as Ruby to build on Tiger/PowerPC. Tested with & without on a G4 with Tiger & Leopard. It was not needed on Leopard as the linker defaults to a target of 10.5 & setting it back broke the bootstrap process. Reviewed by wiz@ long ago.
2015-11-18Ensure building 32-bit on 64-bit is supported when using cwrappers too.jperkin1-1/+2
2015-11-16Always set _OPSYS_CAN_CHECK_SHLIBS to "yes" regardless of whetherjperkin1-6/+2
TOOLS_PATH.readelf is set. This is a PKG_DEVELOPER feature and it's likely the developer is smart enough to either have it already available in $PATH or be able to install it (e.g. via devel/binutils) if required.