Commit graph

447 commits

Author SHA1 Message Date
schmonz
aa0ba74e0b Add OSX_SDK_MAP for 12.2. From Herbert J. Skuhra in private mail. 2022-02-05 21:43:17 +00:00
schmonz
78ede58614 For macOS, getline(3) arrived sometime after 10.6 -- guessing 10.7 like
strnlen(3). Make libnbcompat's implementation available to packages via
USE_FEATURES=getline.
2022-01-14 14:46:50 +00:00
jperkin
9a448ce4d0 mk: Remove use of /bin/ksh wrapper hack on Darwin.
There are only a few releases where this appears to work, and the commit logs
show this to be a complete pain to get working.  I've now confirmed it's also
broken on Big Sur where ksh simply segfaults on both x86_64 and arm64.

This may have been marginally useful in the past, but we now have cwrappers to
provide a much bigger performance improvement, and so this hack was only used
during bootstrap to build a small number of packages anyway.
2021-12-02 09:44:03 +00:00
jperkin
a8263cd3d6 mk: Use OPSYS_VERSION where appropriate.
Should improve readability and in some cases avoid potential failure due to
string comparisons being used.  No other functional change intended.
2021-11-29 16:14:23 +00:00
jperkin
fc61917895 mk: Explicitly set arm64 flags on Darwin/aarch64.
It's currently impossible to run system binaries inside an arm64 chroot, even
with SIP turned off, so the only way to build is to use an x86_64 chroot and
effectively cross-compile to arm64.
2021-11-29 12:38:44 +00:00
jperkin
3f106085e3 mk: Tidy and expand macOS platform list. 2021-11-29 12:31:56 +00:00
nia
46636b8902 mk: Register strnlen as missing on Solaris 10
adapted from PR pkg/56511 from pekdon
2021-11-23 10:37:59 +00:00
nia
bc4b26c020 mk: According to Boyd Lynn Gerber, UnixWare lacks IPv6, although the
header files misleadingly pretend it has IPv6.
2021-11-18 13:23:56 +00:00
schmonz
3d21ab0f09 On Linux with glibc, if libc.so.6 isn't executable, glean GLIBC_VERSION
via ldd instead. Noticed when devel/gettext-tools failed PLIST check on
Ubuntu/aarch64 21.10. NFCI for musl libc.
2021-11-14 14:47:11 +00:00
nia
f0847b49a7 mk: For consistency, rename PKG_HAS_ to OPSYS_HAVE_.
Requested by jperkin.
2021-11-09 12:04:43 +00:00
nia
cf45d178e4 mk: Create per-platform PKG_HAVE_EVENTFD and PKG_HAVE_TIMERFD variables. 2021-11-09 11:05:07 +00:00
nia
2e433af834 mk: Register support for RELRO on NetBSD/powerpc. Tested on macppc. 2021-10-12 07:48:53 +00:00
nia
7328c6b209 mk: Register support for MKPIE on more NetBSD archs, syncing with
/usr/share/mk
2021-09-27 16:13:26 +00:00
schmonz
b8ff50a5d8 Remove stuff inadvertently included in previous (thanks wiz@). 2021-09-14 10:50:48 +00:00
schmonz
0d6ca3dd68 mk/platform: add SDK mapping for macOS 11.6. 2021-09-14 10:33:26 +00:00
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