Commit Graph

339 Commits

Author SHA1 Message Date
mrg 2fa4170300 define variables for the libxcb-* libraries. 2021-08-23 22:13:27 +00:00
christos 9aa9806a13 Fix sun2 build for ldap/gssapi 2021-08-15 10:30:39 +00:00
christos 7377d9de8f Centralize the ldap libraries 2021-08-14 16:16:32 +00:00
nia a42fc114cd Revert addition of pthread dependency on sqlite.
It is less trivial than expected and introduced some surprising breakage.
2020-11-12 17:53:43 +00:00
christos c8784f07cf - make the CTFCONVERT command lines consistent and concise by putting all
the implementation stuff in a variable CTFCONVERT_RUN
- introduce an OBJECT_TARGET variable that contains the output object file
- when we need to run ctfconvert, go through an intermediate ${.TARGET}.o
  file, instead of writing directly to ${.TARGET} and then overwriting
  ${.TARGET} with ctfconvert. This avoids build failures after a build
  got interrupted (the "partially built from C" scourge).
2020-11-09 16:15:05 +00:00
martin 927c5e4e3e Adapt for sqlite requiring pthreads now 2020-11-09 10:19:18 +00:00
martin 5d507f2d93 libsqlite3 now requires -lm 2020-10-30 08:41:58 +00:00
nia ebfeb641aa share/mk: Define some missing X11 libraries. 2020-10-16 06:55:36 +00:00
christos 2f0bfbf344 Rename blacklist -> blocklist 2020-06-15 01:57:29 +00:00
christos e4bfa5b301 Make libuv private, requested by joerg@ 2020-05-30 20:47:58 +00:00
christos 0f8b984644 Add libuv 2020-05-24 19:58:02 +00:00
christos e9be03e610 Linker semantics have changed; we now don't automatically link dependent
libraries from other DSO's. For example in /usr/bin/passwd:
ld: krb5_passwd.o: undefined reference to symbol \
	'UI_UTIL_read_pw_string@@OPENSSL_1_1_0'
ld: /usr/obj/amd64-x86_64/release/lib/libcrypto.so.14: error adding symbols: \
	DSO missing from command line
2020-04-04 13:33:14 +00:00
christos a4770732da Fix kerberos libraries order 2020-04-04 03:35:01 +00:00
christos 0916a77251 Add libgnuctf 2020-04-04 01:35:22 +00:00
christos 7acab15b19 Add fido and cbor 2020-03-03 02:25:03 +00:00
christos 4d3961b8b8 Improve the script to check for installed libraries, and fix the wrong
names and obsolete libraries it found.
2019-11-18 16:09:21 +00:00
kamil 1a5f018b01 Enhance the support of LLVM sanitizers
Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.
2019-08-27 22:48:53 +00:00
kamil 92253c7761 Add PAXCTL_FLAG rules for MKSANITIZER
Add per-program rules to disable ASLR for ASan, TSan and MSan in all
sanitized programs. This flag is not needed for other supported sanitizers.

Without this change, sanitized init(8) dies early on startup.

Approach originally suggested by <joerg>
2019-08-17 00:14:48 +00:00
kamil 0e6f677375 Add SANITIZER_RENAME_CLASSES in bsd.prog.mk
This adds a more flexible version of SANITIZER_RENAME_SYMBOL.

New symbol allows to specify MKSANITIZER specific renames on per-file and
per-symbol basis.
2019-08-15 08:42:59 +00:00
christos 9b5a96cd27 Make the X11 library lists consistent again. 2019-08-10 12:46:38 +00:00
christos 0a4f449bbb Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.
2019-01-21 21:11:54 +00:00
christos 9b2c7d6541 fix broken library variable definitions (inconsistencies between
bsd.README and bsd.prog.mk)
2018-08-12 11:50:51 +00:00
kamil 031cfa7ff2 Introduce MKLIBCSANITIZER in the share/mk rules
Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.
2018-07-25 23:34:25 +00:00
maxv 62c8988166 Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.
2018-07-12 10:46:40 +00:00
kamil eb682ff828 Add a framework for renaming symbols in libc&co for MKSANITIZER
A new keyword SANITIZER_RENAME_SYMBOL. It's a variable that has specified
a list of symbols to be renamed in a processor in order to remove naming
conflicts with public symbols in libc/m/pthread/rt.

This renaming will occur for libraries and programs.
A symbol with a conflicting 'name', will be renamed to '__mksanitizer_name'.

Based on an idea by <christos>
2018-06-25 17:58:36 +00:00
kamil 64a497de12 Refactor MKSANITIZER flags in mk rules
Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.
2018-06-21 11:24:38 +00:00
christos d0972049fa Sanitizers don't support static linking. 2018-06-02 15:19:45 +00:00
mrg 12fffe5478 define LIBXFONT2. 2018-03-11 09:56:44 +00:00
mrg 2e19323388 add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk.  use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
2018-02-25 00:16:48 +00:00
christos c7928288cb Instead of checking for obj existance which can be empty for shuttle-rule
programs, check for .sh sources.
2017-12-11 13:08:47 +00:00
christos 0c05084375 don't try to build .debug files for shell scripts. 2017-12-10 15:11:47 +00:00
christos e480d58dfc Add general {DP,LD}ADD.rump variables 2017-10-10 19:29:44 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
riastradh 1fa400f7fa Remove some vestiges of MKCRYPTO_IDEA/MKCRYPTO_MDC2. 2017-05-21 14:24:05 +00:00
riastradh 09956316a6 Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.
This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate.  The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number          filing date
5,724,428       1995-11-01
5,835,600       1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html
2017-05-21 14:20:44 +00:00
joerg 6a14b8a272 Add netpgpverify to the library list. 2017-04-19 23:41:00 +00:00
rin 0b097c4bf6 add missing LIBCXX 2017-02-20 16:05:34 +00:00
kamil 0892a29a1a libpthread_dbg(3) deletion from the base distribution
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>
2017-02-08 03:44:40 +00:00
christos c6003a6601 add sqlite3 to statically linked libraries for pam. 2017-01-29 21:43:56 +00:00
christos c90b9921a5 unbound additions 2016-08-20 11:21:50 +00:00
joerg a3bc99b827 If the per-target LDSTATIC flag is set, don't include the PIE linker
flags as we currently don't support static PIE.
2016-04-04 15:06:16 +00:00
martin cb4d6b868c Pass -pie to cc, not -Wl,-pie. This way we have a chance to fix specs
for obscure corner cases like -pie -fPIE -static (used for
/usr/tests/lib/csu/h_initfini2 if building with MKPIE=yes).
While there also replace -fPIC with -fPIE for the PIE case, even if
it should be mostly equivalent.
2016-03-30 13:05:09 +00:00
mrg e2bee4685a remove conditionals that are always true with GCC >= 4.8. 2016-03-12 23:08:58 +00:00
christos 6c0101debe Add NODEBUG 2016-02-21 03:34:27 +00:00
christos dc084e400e Introduce NOPIE and NOCTF so that standalone programs build properly. 2016-01-31 15:30:14 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
joerg 0bc53a588b LIBEXECINFO 2015-11-07 23:41:58 +00:00
matt 6811dc67f2 Make LIBCRT* depend on the right files if MLIBDIR from MKCOMPAT is defined. 2015-06-07 15:04:28 +00:00
erh 6830ef879f PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.
2014-12-01 01:34:30 +00:00
ozaki-r 1339b2cc13 Add MKCTF
This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.
2014-03-25 09:52:55 +00:00