Commit Graph

316 Commits

Author SHA1 Message Date
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
christos
199409cf03 let's see if the new dwarf library can handle dwarf 4 2014-03-09 18:00:51 +00:00
christos
aca5beab65 If we are compiling with -g and using gcc4.8 and dtrace downgrade
dwarf generation to version 2 for now.
2014-03-02 22:22:05 +00:00
joerg
937a61eb8d -Wl,-pie and -r don't agree with each other, so filter the former out. 2014-01-15 13:59:38 +00:00
joerg
d0f0da0f65 Relink binaries if crti.o changes. 2013-11-11 10:24:53 +00:00
christos
986a0d2f80 Add libxcb 2013-09-29 14:36:25 +00:00
mrg
f8cebe2a9e add LIBX11_XCB; unfortunately since the library is named with a -
in it, we have to use an ugly hard coded assignment for now.
(could be cleaned up with more make variable magic i'm sure.)
2013-05-31 06:48:43 +00:00
christos
07a6c80766 ldopts should be before ldadd like everywhere else. 2013-04-04 21:14:36 +00:00
christos
fbf6778a1b Since the libraries are produced with different MK flags than the programs,
we check for existance of the files instead of the MK flags.
2013-02-14 03:02:47 +00:00
christos
4880aaed67 Add PROGDPLIBS 2013-02-14 01:58:00 +00:00
christos
08c1bf572c CTFCONVERT me harder. 2013-01-26 21:49:20 +00:00
christos
aa675a73cf Now that we have separate debug sets, add -g if ${MKDEBUG} is set for
program builds since we don't need to install that symbol files.
2013-01-17 15:42:59 +00:00
jmmv
fcb81e1f92 Allow DPADD to be specified on a per-program basis. 2012-08-24 20:26:24 +00:00
joerg
067600c8cf Revert last, it breaks the tricks xsrc uses. 2012-08-23 21:21:14 +00:00
joerg
8e96262375 Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.
2012-08-23 15:45:02 +00:00
christos
eda981fc36 add MKRUMP by popular demand. 2012-08-08 13:56:13 +00:00
tron
df92d05dec Move "libexpat" from X11 into base which fixes PR lib/40346.
This change was approved by the Core Group.
2012-02-29 20:07:51 +00:00
matt
f5d3f68d54 Remove another ${SIZE} 2012-02-21 01:41:09 +00:00
matt
0bf8cdb842 Remove ${SIZE} 2012-02-20 18:23:50 +00:00
matt
47c982a38d Add support for --combine with gcc. 2012-02-19 23:19:37 +00:00
christos
50a5b513a2 Add libtre 2011-11-05 22:56:30 +00:00
christos
fa86ae90df - no need to special-case libraries with weird characters.
- add a note about adding new libraries.
2011-10-16 01:24:05 +00:00
christos
c4fb05f751 fix list of libraries to reflect reality. 2011-10-16 01:14:33 +00:00
apb
386a389aab Move all "clean" and "cleandir" processing to a new bsd.clean.mk
file, as proposed in tech-toolchain.
2011-09-10 16:57:35 +00:00