Commit graph

367 commits

Author SHA1 Message Date
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
jperkin
ed6c0a593f Support UNLIMIT_RESOURCES=cputime on SunOS. 2016-08-25 12:08:29 +00:00
richard
334542855d Add experimental aarch64 support (amlogic s905 under ubuntu) 2016-08-24 05:31:20 +00:00
sevan
62a7145565 Opt to prefer OpenSSL from pkgsrc rather than a builtin version for all 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-07-08 21:23:57 +00:00
sevan
bc046352ab DragonFly BSD ships with GCC 5.x as the compiler, add its library location to _OPSYS_SYSTEM_RPATH 2016-06-29 13:37:19 +00:00
jperkin
3c2941b993 Since the MACHINE_ARCH cleanup, the bootstrap for i386-on-x86_64 Linux has
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-17 16:02:23 +00:00
khorben
03a56367ef Re-arrange support for FORTIFY/MKPIE/RELRO/SSP
- 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-11 23:54:08 +00:00
khorben
dc4ad6b750 Add support for a number of security features
- 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-11 23:03:31 +00:00
fhajny
124d88ee1d Strip --enable-new-dtags GNU ld arg on Darwin and SunOS. 2016-03-11 22:04:34 +00:00
jperkin
111893bb36 Remove _OPSYS_WHOLE_ARCHIVE_FLAG and _OPSYS_NO_WHOLE_ARCHIVE_FLAG, these
variables are unused and in at least one case were completely wrong anyway.
2016-03-10 16:58:19 +00:00
tnn
7f5db266bf pass correct ABI via OBJECT_MODE environment variable on AIX
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-03-04 21:25:47 +00:00
jperkin
b4e6a0bbf3 Remove a commonly used set of GNU ld arguments which are incompatible
with the Darwin linker.  Fixes various packages.
2016-02-29 10:05:47 +00:00
jperkin
43cbbd8b78 Default to the system libuuid. The system headers assume that the libuuid
header provides the uuid_string_t typedef, which is not the case with the
version coming from pkgsrc.
2016-02-24 14:59:56 +00:00
jperkin
22af365a50 Export OSX_VERSION (renamed from OSX_VERS) to the environment regardless of
whether we're using the SDK path or /usr/include, as it is useful for other
contexts than simply determining the SDK directory.
2016-02-22 19:57:41 +00:00
jperkin
698717d710 Extend the El Capitan HFS+ bug workaround to 15.1.0 but no further, I can
confirm that Apple fixed the bug in the recent 15.2.0 (10.11.2) update.
2015-12-14 14:14:33 +00:00
sevan
168d1b7354 Define MACOSX_DEPLOYMENT_TARGET for Tiger to allow current releases
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-12-13 22:38:00 +00:00
jperkin
42f3575ed2 Ensure building 32-bit on 64-bit is supported when using cwrappers too. 2015-11-18 22:30:12 +00:00
jperkin
6e420f7378 Always set _OPSYS_CAN_CHECK_SHLIBS to "yes" regardless of whether
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.
2015-11-16 15:59:59 +00:00
sevan
a34c13abf3 MACHINE_ARCH for Bitrig/amd64 is now set to x86_64
Ammend if statement
2015-11-07 23:46:28 +00:00
jperkin
f0a45a9e36 GCC on SunOS supports a non-standard -mimpure-text argument which clang
does not have, so remove it unconditionally in the latter case.  Fixes
various packages.
2015-10-26 09:33:16 +00:00
jperkin
2385012594 Set PKG_FAIL_REASON with a useful failure message if we cannot find an SDK. 2015-10-10 13:12:50 +00:00
jperkin
8c5fa136b6 OSX El Capitan has an interesting file system bug which allows a deep
directory hierarchy to be created but not removed.  This is triggered by
the GNU getcwd-path-max.m4 configure test used in lots of GNU software,
and causes the builds to fail in pbulk as 'make clean' cannot complete.

For now we provide a cached result for the test to avoid running it,
using a 'no' value as the test is for a specific glibc bug.

This bug has been brought to Apple's attention by the NixOS developers,
raised as https://openradar.appspot.com/radar?id=6160634819379200.  For
now we mark only 10.11.0 (15.0.0) as having the bug - it remains to be
seen whether Apple will fix it in the upcoming .1 release.
2015-10-08 11:36:00 +00:00
jperkin
348b937c46 Re-order the way _OPSYS_INCLUDE_DIRS is calculated, and only perform checks for
the SDK path if we need to.

This avoids issues on Yosemite and Xcode 7, which drops support for the 10.10
SDK.  Trying to determine the SDK path fails, but the failure is not cached in
the xcrun database, so each call to a compiler tool is unecessarily delayed (by
around 3 seconds on my build hosts).

For users still on Yosemite who have upgraded to Xcode 7, the solution is to
install the Command Line Tools so that /usr/include is populated and used.
2015-10-05 17:06:22 +00:00
jperkin
d81e076eb6 _OPSYS_LIB_DIRS entries must be space-separated, not colon. 2015-09-10 19:49:58 +00:00
jperkin
7af5418044 Disable the strip flag for install(1) by default on Darwin. When called
without arguments, strip(1) will attempt to strip all symbols by default,
and when it is unable to do this will fail with a non-zero exit status.

Passing '-u -r' to strip(1) would in theory resolve the issue, but there
is no simple of way of doing this due to the way strip is called by the
native install program through XCode.  We would need to build a patched
bsdinstall for Darwin, so for now we just disable stripping on install,
as many packages have had to do individually up until now.
2015-09-07 11:48:35 +00:00
jperkin
e278916c18 Default to pkgsrc openssl from OSX Lion / 10.7 onwards, where the native
openssl is marked as deprecated.  This causes failures in pkg_install now
that WARNS works correctly (-Werror,-Wdeprecated-declarations).
2015-09-01 11:12:30 +00:00
jperkin
f648dfa7c3 Introduce support for checking Mach-O dynamic libraries.
This works in a similar way to the ELF checks, but uses otool(1) to list the
library name and its dependencies, and the checks fail if there are WRKDIR
references or if the -install_name of the library does not match $PREFIX, as
well as ensuring that any libraries from pkgsrc are correctly registered as
full dependencies.

Removes support for the user to set USE_CHECK_SHLIBS_ELF, but there were no
reasonable reasons for doing so in the past anyway, and it may be masking
issues in platform files we should fix.
2015-08-17 17:35:23 +00:00
khorben
8ce191e1e1 Add support for building with fortify
This is pretty much the same change as with SSP, and completes it with
support for fortify (like USE_FORT in NetBSD's base system). Like SSP, this
is disabled by default for the moment. Like in NetBSD's base system,
enabling fortify explicitly also enables SSP by default - but SSP can still
be disabled explicitly in this situation.

All four combinations tested on NetBSD/amd64.
2015-08-10 21:44:34 +00:00
khorben
f8c9df2a2f More efficient check if SSP is enabled
With this change, the check if the current architecture is supported is
only performed if SSP is enabled in the first place. This should not
change the current behavior; tested on NetBSD/amd64.

Suggested by wiz@
2015-07-27 23:37:38 +00:00
khorben
ae79ea7d78 Add support for compiling with stack-smashing protection
This is enabled with PKGSRC_USE_SSP in mk.conf(5), as documented there.
Most NetBSD platforms are supported (when compiling with gcc).

After consensus on tech-pkg@.
2015-07-26 22:13:17 +00:00
wiedi
6bd4b3b644 Detect arm-linux-gnueabihf correctly 2015-07-18 15:08:43 +00:00
ryoon
eef963f5da Fix QNX bootstrap.
From Jan Danielsson.
2015-07-04 07:15:22 +00:00
tron
fc671b3ed5 Don't use "/bin/ksh" as wrapper shell under Mac OS X Mavericks. It was
previously excluded for a good reason.
2015-07-01 17:47:14 +00:00
adam
d223dd19c2 Always use current system version SDK avoiding future SDKs, because this makes unuable binaries; use ksh as wrapper script on newer systems as well 2015-06-26 13:51:57 +00:00
sevan
8514571a7a Introduce preliminary support for Bitrig to pkgsrc
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-06-04 15:48:45 +00:00
joerg
9ac8fcc75b Let's unconditionally depend on useradd on NetBSD. It has been in base
since 1.4 at least.
2015-05-26 10:08:37 +00:00
sevan
392fe1c36f The path to SU is correct
type is a shell builtin on the bundled OpenBSD pdksh
Remove comment as instructed by comment.
Checks performed on OpenBSD 5.7-current
2015-05-21 17:15:48 +00:00
sevan
98f4407ec4 For 64bit little endian PowerPC hosts running Linux
Set the ABI to 64 bit
Define the suffix appended to the locations in the library search path

Reviewed by bsiegert@
2015-05-08 20:28:30 +00:00
joerg
cd74494def Add a new ulimit modifier for cputime. Support raising limits for
package creation.

There are very few things in pkgsrc that needs more than one hour per
process on decently fast hardware, so setting that as (soft) limit for
bulk builds avoids the infinite loops seen in some other packages. There
are a few select exceptions, i.e. flightgear-data needs more than one
hour for pkg_create when using xz. This flag allows selectively giving
those places more time without wasting resources in the broken cases.
2015-04-21 17:01:55 +00:00
tnn
1706e60098 NOLOGIN needs to be /usr/bin/false here. Probably copy-pasto from OSF1.mk. 2015-04-19 12:02:15 +00:00
tnn
e9d8d4a3f7 fix comment about pkgtools/compat_headers 2015-04-18 22:56:19 +00:00