Commit graph

407 commits

Author SHA1 Message Date
sevan
6b0923a661 Don't need it on Lion 2019-07-11 15:16:12 +00:00
sevan
3448b40764 Avoid pulling in libnbcompat on every platform, mark the specific builds of
Darwin which libnbcompat should be pulled in on to provide strnlen instead.
2019-07-10 17:15:27 +00:00
leot
41e0261d71 platform/Darwin.mk: Fix a typo (s/Mojava/Mojave/) 2019-05-14 10:49:37 +00:00
yyamano
5f2a9b7c0d Add Sierra, High Sierra and Mojava to the version comparison table. Non functional change. 2019-05-14 09:30:24 +00:00
tnn
790927a09f Linux.mk: provide default LIBABISUFFIX for aarch64 2019-01-24 18:40:56 +00:00
wiz
da5215fd50 Add RELRO support for clang, based on the gcc logic. 2019-01-09 13:19:03 +00:00
sevan
0cc874170f Minix 3.4 uses the NetBSD master.passwd and group file which means GID 0 is wheel. 2018-11-15 01:05:09 +00:00
sevan
7ecac36ebd Minix has had some level of support for IPv6 for some years now via LWIP.
Tested on 3.4RC6 which enable host mode support as standard.
2018-11-15 00:40:57 +00:00
jperkin
71e098497c mk: Add CTF infrastructure support.
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-11-12 14:22:58 +00:00
schmonz
102609bd1c Remove leftover from testing. Clearly had been time to take a break. 2018-11-09 13:32:59 +00:00
schmonz
317f9ffa4f Fix previous. Time to stop committing for the day. 2018-11-08 22:34:24 +00:00
schmonz
cda3fb8eec Add OSX_TOLERATE_SDK_SKEW to control whether we try to find an
unversioned SDK if the versioned lookup fails. Off by default, as
before; must be explicitly enabled, as suggested by gdt@.
2018-11-08 22:18:14 +00:00
schmonz
47ae48e310 If an SDK matching our OS X version isn't found -- for instance, because
OS X has been upgraded and Xcode hasn't been -- try again without
specifying the version. This (1) works better and (2) gives a better
error message when it doesn't. From Markus Mayer in PR pkg/50317.
2018-11-07 16:50:27 +00:00
schmonz
c4f430b744 Optionally detect whether the compiler supports "-fstack-protector-strong".
If not, set _OPSYS_SUPPORTS_SSP=no during bootstrap and in mk.conf.

Do SSP detection on "SunOS", and let mk/platform/SunOS.mk's default
"yes" be overridden in mk.conf.

No change to generated mk.conf on NetBSD 8 or CentOS 6. Fixes bootstrap
on Tribblix.
2018-11-05 19:26:38 +00:00
sevan
fb56cf7f44 Update path to false(1). nologin(8) exists on Minix 3.4RC6, however, currently
status is set to 0 despite exiting with 1
2018-10-29 10:53:31 +00:00
adam
f584999b44 Fix for platform/Haiku.mk:12: Makefile lines should not start with space characters. 2018-10-11 08:30:16 +00:00
sevan
83186f21bf GCC 8.0 as the compiler in base is incoming. 2018-09-29 11:47:33 +00:00
bsiegert
25d59f2644 Add /usr/local for include and libdir on ChromeOS.
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-21 19:16:47 +00:00
khorben
42bd86cfb0 Add initial support for building packages reproducibly
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-12 13:34:14 +00:00
khorben
7b8b0022a0 Typo 2017-11-01 15:29:09 +00:00
jperkin
5e65a78af3 mk/platform: Remove unsupported Darwin/SunOS linker arguments. 2017-10-10 13:57:23 +00:00
jperkin
45f7f890ca mk: Disable SSP checks on systems where it is provided in libc.
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-10-03 13:18:00 +00:00
maya
4ad12bcd40 Remove hack working around NetBSD 1.5's specfiles. 2017-08-07 23:54:09 +00:00
maya
88067d2bf4 Disable fortify on netbsd<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-07 23:44:53 +00:00
jperkin
b3c00861dc Disable fortify on Linux when optimisation is not enabled, it is not
supported in that configuration and warnings are issued from the system
headers.
2017-08-04 08:59:20 +00:00
maya
7ddbd3b915 Don't bother with a version check for alpha cflags 2017-07-24 08:19:08 +00:00
schmonz
a6335c2ab0 Define PKG_HAVE_KQUEUE where available. 2017-07-09 17:03:12 +00:00
khorben
e519f07826 Register support for PKGSRC_USE_STACK_CHECK
This adds -fstack-check to the CFLAGS (with GCC on NetBSD x86). Only
tested on NetBSD/amd64 so far.

Disabled by default.
2017-07-09 14:30:07 +00:00
khorben
ca2b8ac385 Implement a check for RELRO
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-07-04 18:29:24 +00:00
jperkin
24df526b4c Set LIBABISUFFIX correctly on SunOS/sparc64. Tested by Jörn Clausen as
part of PR#52250.
2017-06-21 08:20:10 +00:00
khorben
0a3bb24acf Register support for RELRO on Linux (limited to x86 first)
Tested on Debian GNU/Linux 8.8 (amd64).

Actual support will depend on the underlying distribution though.
2017-06-09 17:21:53 +00:00
khorben
7f05f4f5e5 Register support for SSP on Linux (limited to x86 first)
Tested on Debian GNU/Linux 8.8 (amd64).

Actual support will depend on the underlying distribution though.
2017-06-09 17:04:18 +00:00
khorben
369b9cea32 Register support for FORTIFY on Linux
Tested on Debian GNU/Linux 8.8 (amd64).

Actual support will depend on the underlying distribution though.
2017-06-09 16:56:26 +00:00
jlam
b110ad9dac Move detection of shared library type into the platform file.
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-31 22:55:01 +00:00
khorben
8b017f6b3a Register support for SSP on FreeBSD and clang (on x86 architectures)
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-18 01:29:55 +00:00
jperkin
3b718bfe38 Default to pkgsrc terminfo. The curses default was switched to pkgsrc a
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-05-08 17:34:15 +00:00
jperkin
e4d1b9920a Mark SunOS as _INCOMPAT_CURSES, there are lots of issues with the recent work
to use the curses framework and this is the simplest solution for now.
2017-03-08 15:26:51 +00:00
sevan
8907fb92ff MACHINE_ARCH is set to powerpc64le during bootstrap, adjust if statement to
check for new value.
2017-02-01 10:00:17 +00:00
jperkin
dc1d0f1622 Indent conditionals to improve legibility. No functional change. 2017-02-01 07:25:28 +00:00
sevan
bb04ef7a57 Add ppc64le paths from the Debian/Ubuntu multiarch hierarchy.
Tested on Ubuntu for POWER8.
Thanks to John Klos.
2017-02-01 03:00:35 +00:00
wiz
da976fdeef Bump LIBTOOL_REQD, newer version needed for cwrappers.
PR 51826.
2017-01-17 22:57:39 +00:00
jperkin
24bfb99d67 Cache and use computed variables. 2017-01-17 15:32:17 +00:00
bsiegert
7260ae5a46 Enable cwrappers for Dragonfly and FreeBSD. Remove Linux emulation (gone)
for Dragonfly.

From David Shao in PR pkg/51688.
2016-12-04 15:37:41 +00:00
jdolecek
fbce554b02 fix the test for <poll.h>/<sys/poll.h> - use _OPSYS_INCLUDE_DIRS instead
of assuming /usr/include; this fixes compilation of net/socat,
which has broken !HAVE_POLL code
2016-11-13 11:06:40 +00:00
jperkin
ea3df7bb6a Enable cwrappers by default on OpenBSD. 2016-10-28 09:21:08 +00:00
wiz
1ce724e294 Enable cwrappers by default on NetBSD. 2016-10-27 12:29:17 +00:00
jperkin
b673fabd21 Add support for enabling cwrappers automatically. USE_CWRAPPERS now defaults
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-27 10:31:05 +00:00
marino
0f0623489a DragonFly: Update _OPSYS_SYSTEM_RPATH
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-10-25 20:00:47 +00:00
richard
c27c54fb31 set LIBABISUFFIX to /aarch64-linux-gnu for arm64
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-17 05:41:37 +00:00
jperkin
726fbdb877 Support UNLIMIT_RESOURCES=cputime on Darwin. 2016-09-06 09:50:20 +00:00