Commit Graph

870 Commits

Author SHA1 Message Date
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh
b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
John Baldwin
2f7f899536 libdialog: Bump shared library version to 10.
The upgrade to libdialog 1.3 included changes to the ABI.

Bump libdpv to 3 since it links against libdialog.

Reported by:	Mark Millard <marklmi@yahoo.com>
Reviewed by:	bapt
Fixes:		a96ef45019 dialog: import dialog 1.3-20210117
Differential Revision:	https://reviews.freebsd.org/D32675
2021-10-27 09:30:24 -07:00
Baptiste Daroussin
cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Baptiste Daroussin
95da5e131a dialog: fix macro redefinition
dialog.h defines MIN and MAX (making sure to undefine the previous
macros if it already exists), but sys/param.h also defines those
macros (without guards) and is included after dialog.h resulting
in both gcc and clang complaining about macro redefiniton

While clang do accept -Wno-macro-redefined to ignore the redefinition
warning, gcc does not [1]

Undefine both macros prior inclusion of sys/param.h to avoid the warning

Reported by:	arichardson
2021-03-01 16:01:44 +01:00
Baptiste Daroussin
172f2fc11c dialog: guard macros definition to avoid redifinition
This unbreaks building libdpv
2021-02-26 11:13:43 +01:00
Baptiste Daroussin
ec74116ace dialog: finish update to 1.3-20210117
patch dialog.c which requires stddef for the usage of offsetof
catchup on the config header
2021-02-26 10:17:19 +01:00
John Baldwin
0b7f1af804 Bump shared library versions after ncurses bump in 13.
A few shared libraries in the base system link against ncurses.  An
upgrade from a 12.x host to 13 results in ABI breakage for existing
binaries since the newer versions of these libraries link against the
newer ncurses while the binary itself links against the older ncurses.
For example, dialog4ports built on 12.x sometimes crashes on 13 since
it depends on libdialog which links against ncurses internally.

MFC after:	3 days
Reviewed by:	kib, delphij
Differential Revision:	https://reviews.freebsd.org/D28448
2021-02-01 17:11:49 -08:00
Kyle Evans
47d1ad2413 gnu: remove gnugrep and libgnuregex
Differential Revision:	https://reviews.freebsd.org/D27732
2020-12-25 15:16:33 -06:00
Kyle Evans
8aff76fb37 build: remove the option to build gnugrep
Unconditionally install bsdgrep as grep, bootstrap or not. Remove all
build glue and stop installing both gnugrep and libgnuregex now that
all consumers of the latter are gone.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27732
2020-12-25 15:14:17 -06:00
Ed Maste
fe7dff1759 Remove additional GDB leftovers missed in r368667 2020-12-15 18:12:03 +00:00
Kyle Evans
2756e13843 gnu: don't build libgnuregex for WITH_GNU_GREP_COMPAT
bsdgrep switched over to libregex back in r363823 to fill
WITH_GNU_GREP_COMPAT, since libgnuregex in base is quite buggy and libregex
is somewhat functional. Don't build libgnuregex on our account, please.
2020-12-04 15:21:12 +00:00
Kyle Evans
fe815331bb build: provide a default WARNS for all in-tree builds
The current default is provided in various Makefile.inc in some top-level
directories and covers a good portion of the tree, but doesn't cover parts
of the build a little deeper (e.g. libcasper).

Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that
variable is defined. This lets us relatively cleanly provide a default WARNS
no matter where you're building in the src tree without breaking things
outside of the tree.

Crunchgen has been updated as a bootstrap tool to work on this change
because it needs r365605 at a minimum to succeed. The cleanup necessary to
successfully walk over this change on WITHOUT_CLEAN builds has been added.

There is a supplemental project to this to list all of the warnings that are
encountered when the environment has WARNS=6 NO_WERROR=yes:
https://warns.kevans.dev -- this project will hopefully eventually go away
in favor of CI doing a much better job than it.

Reviewed by:	emaste, brooks, ngie (all earlier version)
Reviewed by:	emaste, arichardson (depend-cleanup.sh change)
Differential Revision:	https://reviews.freebsd.org/D26455
2020-09-18 17:17:46 +00:00
Ed Maste
57f804675e remove GCC 4.2.1 build infrastructure
As described in Warner's email message[1] to the FreeBSD-arch mailing
list we have reached GCC 4.2.1's retirement date.  At this time all
supported architectures either use in-tree Clang, or rely on external
toolchain (i.e., a contemporary GCC version from ports).

GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later
that year, in r171825.  GCC has served us well, but version 4.2.1 is
obsolete and not used by default on any architecture in FreeBSD.  It
does not support modern C and does not support arm64 or RISC-V.

Thanks to everyone responsible for maintaining, updating, and testing
GCC in the FreeBSD base system over the years.

So long, and thanks for all the fish.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		228919
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23124
2020-02-29 03:25:51 +00:00
Ed Maste
3b387214e6 remove stale gnu/lib/csu directory
As of r357338 gnu/lib/csu is never used.
2020-02-03 13:50:15 +00:00
Ed Maste
43e8403953 retire BSD_CRTBEGIN option
BSD crt is currently used on all architectures (other than sparc64).
Remove the option and use BSD crt everywhere as part of the GCC 4.2.1
retirement plan.

https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		239851
Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23122
2020-01-31 18:04:04 +00:00
Ed Maste
305f30cc29 Retire build support for GCC's DWARF unwinder
As of r356514 LLVM's libunwind is used as the DWARF unwinder on all
supported CPU architectures, and GCC and its libraries will be removed
soon.  Retire the build infrastructure for GCC's unwinder; from here
if there are any unwinder bugs (on any arch) the path forward is to fix
LLVM's libunwind.
2020-01-08 21:07:55 +00:00
Kyle Evans
241972461f Remove gcclibs libssp build glue
r356356 started providing libssp based on ^/lib/libc/secure and disconnected
this version from the build. This one did formally provide runtime support
for _FORTIFY_SOURCE, but FreeBSD lacks the build support that would have
been needed to take advantage of it.

MFC after:	never
2020-01-07 19:49:31 +00:00
Kyle Evans
cd0d51baaa Provide libssp based on libc
For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
abort built into it.

For libssp_nonshared.a, steal stack_protector_compat.c from
^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
is a hidden symbol.

libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
build environment, and the gcclibs version has been disconnected from the
build in favor of this one.

PR:		242950 (exp-run)
Reviewed by:	kib, emaste, pfg, Oliver Pinter (earlier version)
Also discussed with:	kan
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D22943
2020-01-04 20:19:25 +00:00
Simon J. Gerraty
2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Ed Maste
7381dcc9ee libc: remove gets
gets is unsafe and shouldn't be used (for many years now).  Leave it in
the existing symbol version so anything that previously linked aginst it
still runs, but do not allow new software to link against it.

(The compatability/legacy implementation must not be static so that
the symbol and in particular the compat sym gets@FBSD_1.0 make it
into libc.)

PR:		222796 (exp-run)
Reported by:	Paul Vixie
Reviewed by:	allanjude, cy, eadler, gnn, jhb, kib, ngie (some earlier)
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12298
2019-09-01 16:12:05 +00:00
Bryan Drewery
35c12dd688 csu: Add proper .depend tracking for each object.
This doesn't appear to have ever worked. After a .depend is generated
there will be duplicate .c dependencies so only use the first one.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:39 +00:00
Bryan Drewery
dcf1f83876 Support reading in .depend files.
This is for an upcoming change that fixes .depend handling in here.
It will cause some duplicate sources which need to be trimmed out.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:32 +00:00
Dimitry Andric
b0840a28f6 Connect lib/libomp to the build.
* Set MK_OPENMP to yes by default only on amd64, for now.
* Bump __FreeBSD_version to signal this addition.
* Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes.
* Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h.
* Regenerate src.conf(5) with new WITH/WITHOUT fragments.

Relnotes:	yes
PR:		236062
MFC after:	1 month
X-MFC-With:	r344779
2019-03-16 15:45:15 +00:00
Justin Hibbits
5d031e332f Create crtsavres.o for powerpc builds
Summary:
GCC expects to link in a crtsavres.o on powerpc platforms.  On
powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain
some save/restore functions, which may not actually be necessary for newer
modern GCC and clang.  This appeases the in-tree gcc, though, and is needed in
order to switch to the BSD CRTRBEGIN.

PR:	233751
Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D18826
2019-01-12 21:29:54 +00:00
Andrew Turner
31d62a73c2 Implement a BSD licensed crtbegin/crtend
These are needed for .ctors/.dtors and .jcr handling. The former needs
all the function pointers to be called in the correct order from the
.init/.fini section. The latter just needs to call a gcj specific function
if it exists with a pointer to the start of the .jcr section.

This is currently disabled until __dso_handle support is added.

Reviewed by:	emaste
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17587
2018-10-25 17:39:41 +00:00
Baptiste Daroussin
6794a0c94c Bring back the WARNS level to what it used to be to please gcc arches at least 2018-10-20 21:33:34 +00:00
Baptiste Daroussin
f4f33ea0c7 Update libdialog to 1.3-20180621 2018-10-20 20:49:46 +00:00
Pedro F. Giffuni
bafc378147 Update libstdc++ configuration.
Its been quite a while since the last time we updated this and since then
we have grown iconv and a bunch of complex math functions.

This only applies to the platforms which still use GCC 4.2.1 in the
toolchain.

Differential Revision:	https://reviews.freebsd.org/D16289
2018-07-16 18:53:28 +00:00
Baptiste Daroussin
8134347f26 Remove libreadline from the source tree, all consumers but gdb
has been switched to libedit long ago, libreadline was built as an
internallib for a while and kept only for gdbtui which was broken using
libreadline.

Since gdb has been mostly deorbitted in all arches, gdbtui was only installed
on arm and sparc64, given it has been removed, gdb has been switched to use
libedit, no consumers are left for libreadline. Thus this removal
2018-02-06 12:22:42 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Baptiste Daroussin
af8612c17a GNU diff is done and GNU diff3 is not using libgnuregex, so no need to
condition the build of libgnuregex anymore on WITHOUT_GNU_DIFF
2017-04-20 19:33:00 +00:00
Baptiste Daroussin
fd1444e4c9 Only build libreadline for gdb, binutils actually does not need it 2017-04-20 19:29:35 +00:00
Warner Losh
ffec315183 Convert gnu to using SRCTOP
Prefer SRCTOP over CURDIR/../../contrib, etc. However, retain the "up
one level" instances of ../ because they are really relative to this
part of the tree and not a means to find the root of the tree. As
such, it's better to leave them since that further the goal of being
able to move directories if watned to in the future.

Differential Revision:	https://reviews.freebsd.org/D9932
Sponsored by:		Netflix
Silence	On:		arch@ (twice)
2017-03-12 18:59:16 +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
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
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
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
Ed Maste
b31f85961d Don't build libdialog if WITHOUT_DIALOG is set
X-MFC-With:	r306375
2016-10-03 17:34:50 +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