Commit Graph

4312 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
dc17dead6f [dtc] regenerate version file if upstream Makefile has been changed
Keep version file in sync by adding dependency to upstream Makefile
2017-03-10 17:37:55 +00:00
Enji Cooper
a2cddb3b25 Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory
entries

This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:12:54 +00:00
Ed Maste
4b1be206bb Bump GCC FBSD_CC_VER for r312899 (-march=octeon+ support)
Reported by:	lidl
MFC after:	1 month
MFC with:	r312899
Sponsored by:	The FreeBSD Foundation
2017-02-01 05:24:17 +00:00
Ed Maste
f52e4bdfd7 Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC
Reported by:	Dan McGregor <dan.mcgregor usask.ca>
2017-01-27 01:59:12 +00:00
Enji Cooper
87e9d112de Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 05:51:25 +00:00
John Baldwin
69b4d461be Enable /usr/lib32 for o32 binaries on mips64.
Build and install an o32 set of libraries on mips64 suitable for
running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in
MALTA64.

Reviewed by:	jmallett, imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D9032
2017-01-06 23:30:54 +00:00
Ed Maste
0aa5466e7d Add WITH_LLD_AS_LD build knob
If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by:	The FreeBSD Foundation
2016-11-25 13:15:28 +00:00
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Ed Maste
c7fbd7722d Connect new LLVM-based libgcc_eh & libgcc_s to the build
Compiler-rt and LLVM's libunwind provide a suitable replacement for
libgcc.a, libgcc_eh.a, and libgcc_s.so.

Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc.

PR:		213480 [exp-run]
Reviewed by:	brooks, ed
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8189
2016-11-04 19:35:49 +00:00
Glen Barber
862d6450a7 Fix packaging /usr/lib{,32}/libgcc_eh{,_p}.a.
Reported by:	woodsb02
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-10-31 23:13:09 +00:00
Ruslan Bukin
5bca221511 Add full softfloat and hardfloat support for MIPS.
This adds new target architectures for hardfloat:
mipselhf mipshf mips64elhf mips64hf.

Tested in QEMU only.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D8376
2016-10-31 15:33:58 +00:00
Justin Hibbits
e58d31ade5 Fix a typo from a manual merge. 2016-10-22 19:27:49 +00:00
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Enji Cooper
ae5f5e1c02 Revert r307689
The proposed change ("Fix building of llvm's unwind if gcc has been
also built") breaks the build with clang/llvm.

Tested with...

	(
	export SRCCONF=/dev/null WITH_CLANG=
	cd gnu/lib/libgcc; make obj; make depend; make all
	)

MFC after:	3 days
X-MFC with:	r307689
Pointyhat to:	bapt
Reported by:	Jenkins, O. Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by:	Dell EMC Isilon
2016-10-21 04:49:39 +00:00
Baptiste Daroussin
14c3b02e01 Fix building of llvm's unwind if gcc has been also built
when building gcc an unwind.h header is generate in the cc_tool directory
which is included in the CFLAGS before the path where the llvm's unwind.h file
lives

Reviewed by:	emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D7357
2016-10-20 21:12:50 +00:00
Ed Maste
2abd48643a Correct typo in r307679: the variable is MK_GNU_GREP_COMPAT 2016-10-20 18:43:12 +00:00
Ed Maste
d1a6903377 Build libgnuregex only if necessary for other components
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D8298
2016-10-20 17:28:52 +00:00
Ed Maste
71e30a3131 Remove trailing whitespace from r307674 2016-10-20 15:12:06 +00:00
Ed Maste
94ff3d0344 Add knobs to make GNU diff and GNU grep optional
This is added to facilitate experiments building FreeBSD without
copyleft software.

If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will
be built.

If WITHOUT_GNU_GREP is set then BSD grep will be installed as
/usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP
knob.

Reviewed by:	brooks (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	Differential Revision: https://reviews.freebsd.org/D8288
2016-10-20 14:48:57 +00:00
Ed Maste
ba2cde94c6 Switch gnu/usr.bin/Makefile to SUBDIR.${MK_*} optional subdir style 2016-10-19 21:25:59 +00:00
Ed Maste
dc8b629790 Put each SUBDIR on a separate line for ease of maintenance
Additional patches to this file are in progress, and having each SUBDIR
entry on a separate line makes it easier to change the order in which
the patches are reviewed, tested, and applied.
2016-10-19 20:56:21 +00:00
Ed Maste
016e7731e7 Switch gnu/lib/Makefile to SUBDIR.${MK_*} optional subdir style
Compound conditions are left unchanged
2016-10-19 19:32:06 +00:00
Baptiste Daroussin
a0135a1e35 Remove GNU rcs from base.
GNU rcs is still available as a package:
- rcs: Latest GPLv3 GNU rcs version.
- rcs57: Copy of the latest version of GNU rcs (GPLv2) from base.

Relnotes:	yes
2016-10-15 12:07:37 +00:00
Ed Maste
b9d2be5c58 Avoid using 'head' in generating groff doc date
It may not be available in certain cross build cases.

Note that this is a slight change in functionality, in that now only the
first line of the source ChangeLog file is processed. This is acceptable
as groff will be retired and we won't encounter a possibly-different
ChangeLog format.

Reported by:	jhibbits
Tested by:	jhibbits
2016-10-12 15:49:20 +00:00
Ed Maste
fea8ff8599 groff: use changelog date rather than file modification date in man pages
The source checkout date is not particularly relevant, and this makes
groff man pages build reproducibly.

Reviewed by:	bapt
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8158
2016-10-05 23:25:29 +00:00
Ed Maste
9ce3c6b09a Retire WITHOUT_ELFCOPY_AS_OBJCOPY option
In FreeBSD 11 ELF Tool Chain's elfcopy is installed as objcopy by
default, with the option to switch back to GNU objcopy by setting
WITHOUT_ELFCOPY_AS_OBJCOPY in make.conf.

We plan to remove the outdated in-tree binutils in FreeBSD 12, so
remove the temporary transition aid.

Reviewed by:	brooks, imp
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7337
2016-10-03 17:49:26 +00:00
Ed Maste
b31f85961d Don't build libdialog if WITHOUT_DIALOG is set
X-MFC-With:	r306375
2016-10-03 17:34:50 +00:00
Ed Maste
f987297fc9 Add a WITHOUT_DIALOG src.conf(5) knob
It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).

Reviewed by:	dteske
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7969
2016-09-27 18:08:38 +00:00
Marcel Moolenaar
2b4da8aa20 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

See also r305855

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 15:11:27 +00:00
Bryan Drewery
790ba09ec6 DIRDEPS_BUILD: Avoid cyclic dependency with libc++.
The DIRDEPS_BUILD does not have a 'make includes' phase, so it would
otherwise want libc++ to be fully built/staged before building
libgcc.  Using the header directly works.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-08-31 19:30:00 +00:00
Ed Maste
ea3dc21b32 rename ARM's libunwind.S to to avoid conflict with llvm libunwind
llvm libunwind includes a libunwind.cpp, but on ARM libunwind.S is found
first in .PATH. Rename the latter one, since it is not going to be
updated again.

Reviewed by:	andrew
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7162
2016-07-27 16:34:19 +00:00
Andrey A. Chernov
c66f176a6e Back out non-collating [a-z] ranges.
Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
2016-07-14 09:47:49 +00:00
Andrey A. Chernov
ea81c8d0ef After removing collation for [a-z] ranges in r302512, do it here too.
Instead of trying to expand whole range at regcomp() stage as we do,
GNU regex allocates separate ranges [start,end] set each character
is checked against, so collation is possible and turned on for ranges here.

When something like that will be implemented or our obsoleted regex code
will be replaced to something like TRE, and in case we decide to use
collation in [a-z] ranges, all changes related to r302512 can be backed out,
but now we need consistency.
2016-07-13 19:02:59 +00:00
Bryan Drewery
b987685fe0 Revert r302670 and r302671 for now.
MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which
has it backwards.
2016-07-13 01:35:53 +00:00
Bryan Drewery
8a6bdc134d Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.
This also adds missing s/aarch64/arm64 to the sys.mk version and also
adds back armv6hf for universe since it was added to the sys.mk version
in r300438.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7159
2016-07-12 18:57:25 +00:00
Ed Maste
dcc88911a9 libunwind: enable only the native unwinder by default
This significantly reduces stack space requirements, and runtimes
require only native unwinding.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-08 21:17:24 +00:00
Glen Barber
ddfcae6a67 Spell 10.2, 10.3, 12.0 correctly in various places.
Submitted by:	markj
Approved by:	re (implicit)
Pointyhat:	gjb (myself)
Sponsored by:	The FreeBSD Foundation
2016-07-08 02:03:42 +00:00
Glen Barber
9493d165a2 Default manual pages to 12.0 in head, and add missing 10.x
releases.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:54:21 +00:00
Glen Barber
bad7300b1e Spell 1200000 correctly.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:52:53 +00:00
Glen Barber
ae940db11f Reflect head is now 12.0-CURRENT.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:12:29 +00:00
Bryan Drewery
2a6d574e78 WITH_META_MODE: Don't expect a .meta file for side-effect generated files.
This is the same as r301285.

Approved by:	re (implicit)
Sponsored by:	EMC / Isilon Storage Division
2016-06-15 23:57:53 +00:00
Bryan Drewery
d04dec453a Convert to new FAST_DEPEND syntax for guessed dependencies.
This OBJS_DEPEND_GUESS is needed since each target gets its
own .depend.target.o file but also because it is spelled
.meta.target.o with WITH_META_MODE.  The OBJS_DEPEND_GUESS
will apply the dependency if the required file is missing.

Also remove redundant .c files while here to avoid prolems with
targets using .ALLSRC and getting multiple source files.

Approved by:	re (implicit)
Sponsored by:	EMC / Isilon Storage Division
2016-06-15 23:57:46 +00:00
Bryan Drewery
8779595527 DIRDEPS_BUILD: Update dependencies
Approved by:	re (gjb)
Sponsored by:	EMC / Isilon Storage Division
2016-06-14 16:55:05 +00:00
Pedro F. Giffuni
311219368a libsupc++: Fix typo in symbol map.
This went mostly unnoticed with the deprecation of the GNU toolchain
in tier 1 platforms. Fix it now for the rest.

PR:		169901
MFC after:	3 days
2016-06-08 00:29:48 +00:00
Bryan Drewery
a81cff6ddd DIRDEPS_BUILD: Update GCC dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-06-04 17:37:25 +00:00
Bryan Drewery
6e9a3c415e DIRDEPS_BUILD: Connect new directories and update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-06-03 19:25:30 +00:00
Conrad Meyer
2844d30cc5 gcc42: Fix minor C99 parse bug
DR #289[0] came down and gcc4.2.1 was on the wrong side of history.
Partially revert GCC r42574 (just remove the error) to rectify the parse
bug to match Clang and other compliant C99 compilers.

An example declaration gcc tripped on before this fix:

  void foobar(int [static 1]);

An example declaration gcc did not trip on before this fix:

  void foobar(int name[static 1]);

Bump __FreeBSD_cc_version.

[0]: http://www.open-std.org/JTC1/SC22/WG14/www/docs/dr_289.htm

Reported by:	allanjude
Sponsored by:	EMC / Isilon Storage Division
2016-05-27 03:40:52 +00:00
Pedro F. Giffuni
0009715f34 gnugrep: Update the configuration.
The only effect is that it will use our native iconv(3).

Relnotes:	yes
2016-05-22 20:17:55 +00:00
Bryan Drewery
ba7734de4c WITH_META_MODE: Avoid rebuilds of cc_tools during target build.
This is the same as r299289 and r297997.

Sponsored by:	EMC / Isilon Storage Division
2016-05-21 01:32:01 +00:00
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Enji Cooper
430f7286a5 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
  namespacing is kept with FILES appropriately, and that this shouldn't need
  to be repeated if the namespace changes -- only the definition of PACKAGE
  needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
  `tests`. In the event we get to the point where things can be split up
  enough in the base system, it would make more sense to group the tests
  with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
  previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
  bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
  ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
  and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
2016-05-04 23:20:53 +00:00
Baptiste Daroussin
13b5b54865 import sdiff(1) from GSoC 2012
Import sdiff(1) from the diff version written by Raymond Lai,
improved during GSoC 2012 by Jesse Hagewood.

Compared to the version done in during that summer of code:
- Remove the zlib frontend: zsdiff
- Compatible output (column size and separators) with GNU sdiff

Compared to GNU sdiff in ports:
- The only difference is padding using spaces vs tabs

Compared to OpenBSD and NetBSD import:
- Implement missing options (including long options) from GNU sdiff
- Improved support for the edition mode (signal handling)
- Output visually compatible with GNU sdiff: size of columns

While here import regression tests from NetBSD adapted to fit the output as
expected by GNU sdiff

Reviewed by:	emaste (in part)
Obtained from:	OpenBSD, NetBSD, GSoC 2012
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5981
Differential Revision:	https://reviews.freebsd.org/D6032 (diff with NetBSD version)
Differential Revision:	https://reviews.freebsd.org/D6033 (diff with OpenBSD version)
2016-04-29 23:27:15 +00:00
Glen Barber
49dae58b28 Fix including Kyuafile in packaged base system.
Fix a related typo while here.

Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.

PR:		209114
Submitted by:	ngie
Sponsored by:	The FreeBSD Foundation
2016-04-29 05:28:40 +00:00
Wojciech Macek
4cde1dac8a Add missing function prototypes in KGDB
This fixes the build broken by r298358
2016-04-20 20:22:48 +00:00
Wojciech Macek
d4015ddc57 Fix KGDB backtrace on ARM
Modify trapframe decoding to properly analyze trapframe.

Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.

Obtained from:         Semihalf
Sponsored by:          Juniper Networks
Reviewed by:           kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
2016-04-20 17:58:13 +00:00
Bryan Drewery
09fb6bff29 Follow-up r297842: Rework header generation to fix always rebuilding.
This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to:	bdrewery
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:13:58 +00:00
Glen Barber
a123f26e92 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-12 17:00:13 +00:00
Bryan Drewery
8a5f439677 META_MODE: Avoid changed build command every build.
Because the file is generated with -f using another Makefile, 2
different Makefiles are trying to handle the .meta file for the
target.  The obvious .NOMETA_CMP or .NOMETA on the ${MAKE} targets
don't work as they are very limited in scope in bmake.  Using
.PHONY fixes the problem and ensures that the ${MAKE} command
is always ran to check if it is outdated in the sub-make.

An example of the problem in gnu/lib/libgcc (with make -dM):
  /usr/obj/root/git/freebsd/gnu/lib/libgcc/tm.h.meta: 2: a build command has changed
  TARGET_CPU_DEFAULT=""  HEADERS="options.h i386/biarch64.h i386/i386.h i386/unix.h i386/att.h dbxelf.h elfos-undef.h elfos.h freebsd-native.h freebsd-spec.h freebsd.h i386/x86-64.h i386/freebsd.h i386/freebsd64.h defaults.h"  DEFINES=""  /bin/sh /root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc/mkconfig.sh tm.h
  vs
  (cd /root/git/freebsd/gnu/lib/libgcc; make -f /root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile MFILE=/root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc tm.h)
  Skipping meta for tm.h: .NOMETA
  (cd /root/git/freebsd/gnu/lib/libgcc; make -f /root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile MFILE=/root/git/freebsd/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/root/git/freebsd/gnu/lib/libgcc/../../../contrib/gcc tm.h)
  `tm.h' is up to date.

Sponsored by:	EMC / Isilon Storage Division
2016-04-12 02:45:19 +00:00
Glen Barber
d60840138f MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00
Bryan Drewery
497e80911e Remove the old depend (mkdep) code and make FAST_DEPEND the one true way.
Reviewed by:	emaste, hselasky (partial), brooks (brief)
Discussed on:	arch@
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5742
2016-03-30 23:50:23 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
15c433351f DIRDEPS_BUILD: Connect MK_TESTS.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:46:01 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Mariusz Zaborski
c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
Bryan Drewery
90a2d98448 OBJS and POBJS have not been used since r215127.
r215127 disabled building of libgcc.a.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 22:27:18 +00:00
Bryan Drewery
6607cb5de8 Don't hide AR command as bsd.lib.mk's r283925 changed as well.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 21:19:44 +00:00
Bryan Drewery
bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Glen Barber
72c3aa02dc MFH
Sponsored by:	The FreeBSD Foundation
2016-02-18 00:37:58 +00:00
Ed Maste
cdfecc9da0 Hardcode date in RCS paper for reproducibility
The 1995/06/01 date is taken from the $Id$ entry in rcs.ms from RCS 5.7,
the last version we imported, and is more meaningful than the OS build
date.

Reviewed by:	eadler
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5299
2016-02-17 14:34:01 +00:00
Glen Barber
c389411c8a Remove libc, librtld_db, libthr packages, and further increase
the constraints on what needs to be installed in a specific to
maintain consistency during upgrades.

Create a new clibs package containing libraries that are needed
as a bare minimum for consistency.

With much help and input from:	kib
Sponsored by:	The FreeBSD Foundation
2016-02-05 21:01:08 +00:00
Glen Barber
1f4bcc459a More 'tests' packaging fixes.
Sponsored by:	The FreeBSD Foundation
2016-02-03 19:08:45 +00:00
Glen Barber
43faedc133 First pass to fix the 'tests' packages.
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:26:49 +00:00
Glen Barber
c8296cbb96 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-29 14:52:54 +00:00
Alexander Kabaev
a2e4e33f34 Make .debug file for libgcc_s.so.1 more useful.
The files compiled into libgcc_s.so.1 did not have -g on
compiler command line, making generated .debug quite
pointless.
2016-01-27 20:20:35 +00:00
Glen Barber
0e186c0aab MFH
Sponsored by:	The FreeBSD Foundation
2016-01-27 14:16:13 +00:00
Ruslan Bukin
faf51c558e Make libgcc compilable on RISC-V. 2016-01-26 14:45:21 +00:00
Glen Barber
f9421853ad MFH
Sponsored by:	The FreeBSD Foundation
2016-01-25 14:13:28 +00:00
Ed Maste
5abb4cd79f Use MAN= to specify that no man page is provided
NO_MAN is deprecated.

Reviewed by:	imp
2016-01-22 21:33:27 +00:00
Ed Maste
fff38c35ae Restore libunwind.cpp to LLVM libunwind build (reverts r294576)
The unw_* functions are not exported, but are used internally.
2016-01-22 19:03:39 +00:00
Ed Maste
596675a64d Drop HP libunwind (unw_*) functions from LLVM libunwind
They are not needed for exception handling.
2016-01-22 16:47:36 +00:00
Ed Maste
ba86521396 Remove old generated unwind.h when using LLVM libunwind
When not using LLVM libunwind, unwind.h is a generated header and a stale
copy may remain in the OBJDIR after enabling LLVM libunwind. Explicitly
remove it.

Reported by:	bz
Reviewed by:	bdrewery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5019
2016-01-22 02:28:17 +00:00
Glen Barber
59d43d11fe MFH
Sponsored by:	The FreeBSD Foundation
2016-01-20 09:50:54 +00:00
Ed Maste
0c9eb4d63a Remove local override for .cpp.o and .cpp.po rules
The local build rule used to set -fvisibility=hidden and -fPIC, in
addition to -fexceptions and -D defines that had no effect.

With -fvisibility=hidden and -fPIC in STATIC_CXXFLAGS the standard
bsd.lib.mk rules are suitable for libgcc_s's C++ source.

PR:		206381
Sponsored by:	The FreeBSD Foundation
2016-01-19 17:40:29 +00:00
Ed Maste
c4601d6dfb Remove local override for .cpp.So rule
The standard bsd.lib.mk rule is suitable for libgcc_s's C++ source.

The local rule had the following non-functional argument differences
or additions:

1. -DSHARED (rather than -DPIC from bsd.lib.mk)

   The C++ sources don't have an #ifdef for either one.

2. -fexceptions

   This is enabled by default for C++ so does not need to be set
   explicitly.

3. -D__GLIBC__=3

   Not used by LLVM libunwind.

4. -DElfW=__ElfN

   LLVM libunwind provides its own definition.

PR:		206381
Differential Revision:	The FreeBSD Foundation
2016-01-19 03:54:38 +00:00
Glen Barber
e60680024a MFH
Sponsored by:	The FreeBSD Foundation
2016-01-12 01:23:45 +00:00
Ed Maste
b80f3546a8 Support use of LLVM's libunwind for exception unwinding
It is built in libgcc_s.so and libgcc_eh.a to simplify transition.

It is enabled by default on arm64 (where we previously had no other
unwinder) and may be enabled for testing on other platforms by setting
WITH_LLVM_LIBUNWIND in src.conf(5).

Also add compiler-rt's __gcc_personality_v0 implementation for use with
the LLVM unwinder.

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4787
2016-01-09 00:42:07 +00:00
Glen Barber
0c9da521fa MFH
Sponsored by:	The FreeBSD Foundation
2016-01-07 17:23:43 +00:00
Ed Maste
dbecd1bfdf Switch GNU ld to be installed as ld.bfd and linked as ld
We intend to replace GNU ld with LLVM's lld, and on the path to there
we'll experiment with having lld installed or linked as /usr/bin/ld.
Thus, make ld.bfd the primary install target for GNU ld, to later
facilitate making the ld link optional.

Reviewed by:	davide, dim
Differential Revision:	https://reviews.freebsd.org/D4790
2016-01-07 00:15:02 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Ed Maste
e7beaf9968 Install ld also as ld.bfd, for use with cc -fuse-ld=bfd
PR:		205409 [exp-run]
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-12-23 14:31:26 +00:00
Bryan Drewery
eacae6dc66 Fix LDADD/DPADD that should be LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:47 +00:00
Bryan Drewery
3c89d6b0e3 Don't override LIB*DIR variables from src.libnames.mk.
In some cases switch to the LIB*SRCDIR value.

These recently were defined in r291327 and r291619.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 22:20:04 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Bryan Drewery
cf990407e1 Update dependencies after r291406 added libelf to libkvm.
Unfortunately filemon/meta mode tracks all indirect dependencies here
since ld(1) is reading libelf when linking in libkvm.  Churn would be
reduced if this was able to be limited to direct dependencies.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:48 +00:00
John Baldwin
fe5f4c93fe Fix a double-semicolon typo in my libkvm changes.
Submitted by:	jmallett
2015-11-30 21:53:24 +00:00
John Baldwin
7f911abe54 Add support to libkvm for reading vmcores from other architectures.
- Add a kvaddr_type to represent kernel virtual addresses instead of
  unsigned long.
- Add a struct kvm_nlist which is a stripped down version of struct nlist
  that uses kvaddr_t for n_value.
- Add a kvm_native() routine that returns true if an open kvm descriptor
  is for a native kernel and memory image.
- Add a kvm_open2() function similar to kvm_openfiles().  It drops the
  unused 'swapfile' argument and adds a new function pointer argument for
  a symbol resolving function.  Native kernels still use _fdnlist() from
  libc to resolve symbols if a resolver function is not supplied, but cross
  kernels require a resolver.
- Add a kvm_nlist2() function similar to kvm_nlist() except that it uses
  struct kvm_nlist instead of struct nlist.
- Add a kvm_read2() function similar to kvm_read() except that it uses
  kvaddr_t instead of unsigned long for the kernel virtual address.
- Add a new kvm_arch switch of routines needed by a vmcore backend.
  Each backend is responsible for implementing kvm_read2() for a given
  vmcore format.
- Use libelf to read headers from ELF kernels and cores (except for
  powerpc cores).
- Add internal helper routines for the common page offset hash table used
  by the minidump backends.
- Port all of the existing kvm backends to implement a kvm_arch switch and
  to be cross-friendly by using private constants instead of ones that
  vary by platform (e.g. PAGE_SIZE).  Static assertions are present when
  a given backend is compiled natively to ensure the private constants
  match the real ones.
- Enable all of the existing vmcore backends on all platforms.  This means
  that libkvm on any platform should be able to perform KVA translation
  and read data from a vmcore of any platform.

Tested on:	amd64, i386, sparc64 (marius)
Differential Revision:	https://reviews.freebsd.org/D3341
2015-11-27 18:58:26 +00:00
Bryan Drewery
7fdd45b091 Use LIBEXECDIR for /usr/libexec.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:40 +00:00
Bryan Drewery
114350b9de Replace DPSRCS that work fine in SRCS.
This is so that 'make depend' is not a required build step in these
files.

DPSRCS is overall unneeded.  DPSRCS already contains SRCS, so anything
which can safely be in SRCS should be.  DPSRCS is mostly just a way to
generate files that should not be linked into the final PROG/LIB.  For
headers and grammars it is safe for them to be in SRCS since they will
be excluded during linking and installation.

The only remaining uses of DPSRCS are for generating .c or .o files that
must be built before 'make depend' can run 'mkdep' on the SRCS c files
list.  A semi-proper example is in tests/sys/kern/acct/Makefile where a
checked-in .c file has an #include on a generated .c file.  The
generated .c file should not be linked into the final PROG though since
it is #include'd.  The more proper way here is just to build/link it in
though without DPSRCS.  Another example is in sys/modules/linux/Makefile
where a shell script runs to parse a DPSRCS .o file that should not be
linked into the module.  Beyond those, the need for DPSRCS is largely
unneeded, redundant, and forces 'make depend' to be ran.  Generally,
these Makefiles should avoid the need for DPSRCS and define proper
dependencies for their files as well.

An example of an improper usage and why this matters is in usr.bin/netstat.
nl_defs.h was only in DPSRCS and so was not generated during 'make all',
but only during 'make depend'.  The files including it lacked proper
depenencies on it, which forced running 'make depend' to workaround that
bug.  The 'make depend' target should mostly be used for incremental build
help, not to produce a working build.  This specific example was broken in
the meta build until r287905 since it does not run 'make depend'.

The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS:
SRCS:M*.h' when there is no .depend file.

Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2015-11-25 20:38:17 +00:00
Bryan Drewery
b791fbe630 META MODE: Don't create .meta files when symlinking sources into the obj directory.
Tracking these leads to situations where meta mode will consider the
file to be out of date if /bin/sh or /bin/ln are newer than the source
file.  There's no reason for meta mode to do this as make is already
handling the rebuild dependency fine.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:43 +00:00
Bryan Drewery
7b3ea376a2 META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.
This both avoids some dependencies on xinstall.host and allows
bootstrapping on older releases to work due to lack of at least 'install -l'
support.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:10:28 +00:00