Commit graph

432 commits

Author SHA1 Message Date
jperkin
fc2bea8239 mk: Add OSX_SDK_MAP for 11.5. 2021-07-26 11:58:24 +00:00
jperkin
33d4ec633c mk: Map macOS 11.4 to the 11.3 SDK. 2021-05-27 18:16:26 +00:00
mrg
0a843265c7 various fixes for arm64 big endian support.
most of these simply extend matching from "aarch64" to "aarch64eb"
in various forms of code.  most remaining uses in pkgsrc of
"MACHINE_ARCH == aarch64" are because of missing aarch64eb support,
such as most of the binary-bootstrap requiring languages like rust,
go, and java.

no pkg-bump because this shouldn't change packages on systems that
could already build all of these.
2021-04-25 07:51:24 +00:00
ryoon
483412fe32 mk: Add preliminary support for MidnightBSD
It is almost as same as FreeBSD.
2021-03-15 16:21:02 +00:00
ryoon
a1214d5fb6 mk/platform: Add -s to ln always, because Haiku does not support hardlink
Supplied by jperkin@. Thak you.
2021-03-15 16:17:59 +00:00
ryoon
6d10a91d74 mk/platform: Enable cwrappers for Haiku
Confirmed under Haiku/x86_64 R1/beta2.
2021-03-15 14:20:01 +00:00
jperkin
c2346e575e mk/platform: Support known macOS SDK skew mapping.
For example, the recently release macOS 11.2 does not ship a 11.2 SDK, but
continues to use the compatible 11.1 SDK.  This now works correctly without
having to enable OSX_TOLERATE_SDK_SKEW.

These should only be added for releases within the same major version where we
can guarantee compatibility.
2021-02-02 15:47:54 +00:00
maya
6a70db41c3 Fix error, pointed out by jperkin, thanks 2020-12-20 20:22:17 +00:00
maya
a237f479e4 Simplify check, trust the user's PKGDB_DIR instead of second guessing it.
Fixes bootstrapping a second prefix with /var/db/pkg existing.

In a bootstrap scenario, PKGDB_DIR is defined, so this should just work.
2020-12-20 19:44:16 +00:00
maya
c7638cd9c1 Move the pkgdb compatibility error to a NetBSD-specific file to avoid
breakage for users who have other package managers that use /var/db/pkg
(Reported by Frederic Cambus on FreeBSD, OpenBSD)

Adjust warning: specifying PKGDB_DIR in mk.conf should be sufficient
for building packages for the compatibility pkgdb location.

This is still an error message, because:
- While we can handle the existing references of PKGDB_DIR, new ones
might be created.
- It is a minor inconvenience to people building packages from source.
2020-12-18 17:14:58 +00:00
js
ad080fda0f Allow PIE and RELRO on aarch64
I already compiled plenty of packages on my Pinebook Pro with both PIE and
RELRO enabled and have yet to see a build failure.
2020-12-14 21:45:43 +00:00
nia
0b35064193 platform/Linux: always prefer native pthread/libdl 2020-12-13 16:26:12 +00:00
jperkin
aa75f83214 mk/platform: Use string comparison for Darwin version.
Fixes SDK detection on 11.0.1, where 11 = 11.0 when compared numerically,
leading to the SDK path for "macos11.0.1" not being found.
2020-10-30 17:28:25 +00:00
jperkin
cc608c9260 mk: Set _OPSYS_LIB_DIRS to the SDK directory on Big Sur.
This is required for find-libs.mk to continue detecting the presence of
libraries supported by the system.  It's definitely not ideal, and only
still works because Apple happens to ship .tdb files for each library, and
these are found via the current "lib${_lib_}.*" glob.

Patch taken from sjmulder@, I only limited it to Big Sur for now in case
there are issues using the SDK directory on older releases.
2020-10-09 17:43:48 +00:00
jperkin
4d7409c2ae mk: Handle missing system libraries on Big Sur.
The new release of macOS removes system libraries from the file system, only
providing access to them via a linker cache and dlopen().  This obviously
breaks many assumptions about how libraries work on Unix systems, and so we
unfortunately need to cripple various checks when running on those systems.

Introduce DARWIN_NO_SYSTEM_LIBS which, when defined, will trigger alternate
behaviour in the infrastructure.  Currently this is in two places:

  * In CHECK_SHLIBS, skip any path beginning with /usr/lib.

  * In registered package metadata, any path beginning with /usr/lib is
    removed from REQUIRES.

The former fixes all package builds, while the second will be necessary for
package managers such as pkgin, as they will no longer be able to verify that
those files are available on the target system.

This is obviously a gross hack, and removes our ability to ensure that the
target system is suitable for the packages we are attempting to install, but
Apple have left us with no alternative, and users will unfortunately be left
to find out at runtime instead.

It's likely this will need to be extended to /System/Library paths too, but
this is required first to actually get packages building before we can start
running bulk builds.
2020-10-09 16:00:16 +00:00
js
8f9699c585 mk/platform/QNX.mk: Add ACCEPT_INFERIOR_RM_PROGRAM=yes 2020-09-04 19:44:24 +00:00
js
32196b411d mk/platform/QNX.mk: Add /usr/qnx650 to _OPSYS_LIB_DIRS 2020-09-04 19:36:30 +00:00
sjmulder
55958d5bab mk/platform: Update Darwin version list 2020-08-21 21:29:16 +00:00
hauke
b9d2c53c56 Up to 10.12.6 at least, the Mac OS X linker, does not support "-no_warn_inits". 2020-08-11 12:45:54 +00:00
jperkin
25bb928af5 mk: bmake cannot compare non-integers numerically.
Just use an empty() match instead.
2020-06-02 16:22:40 +00:00
joerg
3430630848 Add a ulimit flag for address space limits. Support it on NetBSD for
now.
2020-03-22 21:17:30 +00:00
gdt
8088666ab9 mk/platform/NetBSD.mk: Default to bsdtar
Native tar on NetBSD <=8 (and later, if MKBSDTAR is no) does not
handle archive formats increasingly being seen in pkgsrc.  bsdtar
("libarchive tar") does, and is natively provided on NetBSD >=9.

pkgsrc already has a mechanism to use /bin/tar as the bsdtar tool when
it is bsdtar, so this change should not cause anything different on
NetBSD >= 9.   On <=8, it will depend on archivers/bsdtar, which can
be built without using an extract tool, and which will then be broadly
usable.

As broadly discussed over multiple days on tech-pkg.
2020-03-12 17:01:39 +00:00
rillig
d6a0479fc0 mk/platform/Linux: fix detection of GLIBC_VERSION on Debian
Running "/lib/x86_64-linux-gnu/libc.so.6 --version" on Debian unstable
inside WSL says:

GNU C Library (Debian GLIBC 2.29-9) stable release version 2.29.

In this case, there is a simple period, not a comma after the version
number.
2020-01-28 08:38:47 +00:00
nia
49d28e1bd7 mk/platform/Linux.mk: Use _OPSYS_LIB_DIRS to find glibc paths.
This seems more correct as it handles Debian/others already.
2020-01-24 12:36:28 +00:00
nia
3ecc5529cb mk/platform/Linux.mk: Fix glibc detection on Debian.
Problem identified and patch reviewed/tested by gutteridge, thanks
2020-01-24 12:32:21 +00:00
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