Commit Graph

3774 Commits

Author SHA1 Message Date
Piotr Kubaj
448045e4a7 share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU
MFC after:	3 days
Approved by:	jhibbits
Differential revision:	https://reviews.freebsd.org/D39240
2023-05-05 16:20:28 +02:00
Simon J. Gerraty
e5e345a4b0 local.dirdeps.mk skip N_host_libs for non-FreeBSD host
The N_host_libs dance only makes sense if host is FreeBSD.
Even then, if MK_host_egacy is yes we need libmd

libnetbsd does not need libutil when using libegacy

Sponsored by:	Juniper Networks, Inc.
2023-05-04 11:58:39 -07:00
Simon J. Gerraty
ba4d333364 dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE
This helps avoid ugly noise in dirdeps.cache on Linux.
2023-05-04 11:29:33 -07:00
Simon J. Gerraty
42d088299c Update meta.sys.mk ensure DEP_* set at level 1+ 2023-05-04 09:46:47 -07:00
Simon J. Gerraty
9f27341c33 local.meta.sys.mk set BOOTSTRAPPING
When building for host on non-FreeBSD
some makefiles want to see BOOTSTRAPPING defined.

With this libmd and hence nmtree build ok
2023-05-03 12:20:02 -07:00
Ed Maste
0b4568e36f src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN
Prior to 590461a4b8 installation of include files was controlled
directly by ${MK_TOOLCHAIN}.  590461a4b8 added an INCLUDES knob
defaulting to YES.  Setting WITHOUT_TOOLCHAIN forced it off to retain
existing behaviour.

Decouple them now, as there are reasonable use cases for installing
libraries and include files without a compiler or other tool chain
components.

Reviewed by:	imp, jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39918
2023-05-01 20:33:08 -04:00
Ed Maste
5f2e84015d bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob
A user may use a tool chain from a package or just use an existing
tool chain from a previous installation.  There is no reason for this
to disable the installation of lib${LIB}_pic.a.

This also means we don't need to force MK_TOOLCHAIN=yes in lib/libc.

This reverts part of commit c0f5aeb032.

Reviewed by:	jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39917
2023-05-01 16:46:39 -04:00
Alexander V. Chernikov
4f6a5e1d6c netlink: enable NETLINK_SUPPORT by default on all architectures.
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D39849
2023-04-28 12:37:09 +00:00
Simon J. Gerraty
e020aa37b8 jobs.mk report JOB_ARGS log and JOB_LOG_START
At the start of a job include info such as JOB_ARGS the log location
and anything in JOB_LOG_START (eg TARGET_SPEC=${TARGET_SPEC})
2023-04-27 13:40:44 -07:00
John Baldwin
7aab8fc5c5 clang: Enable -Wdeprecated-non-prototype by default.
PR:		270919 (exp-run)
Reviewed by:	dim, emaste
Differential Revision:	https://reviews.freebsd.org/D39535
2023-04-25 14:09:21 -07:00
Simon J. Gerraty
4b932c2c9e Set MK_host_egacy=yes earlier
If we need to set MK_host_egacy=yes we might need to check it
in local.toolchain.mk so set it earlier in local.meta.sys.env.mk

Leave the default MK_host_egacy?=no in local.sys.mk so it can
be tested in Makefiles without concern for build mode.
2023-04-25 00:26:35 -07:00
Simon J. Gerraty
976ba7f02a Enable building tar for non-FreeBSD host
For DIRDEPS_BUILD we need Makefile.depend.options to
force libegacy to be built on older FreeBSD and non-FreeBSD hosts.

Add readpassphrase to libegacy to avoid the need for libbsd on Linux

src.opts.mk disable TESTS for host if MK_host_egacy is yes

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39766
2023-04-24 10:20:17 -07:00
Simon J. Gerraty
baf2dc6476 Set UPDATE_DEPDFILE=NO for showconfig
Exporting UPDATE_DEPDFILE=NO from makeman didn't work,
back to setting it in local.meta.sys.env.mk
2023-04-23 13:43:45 -07:00
Ed Maste
390c31c428 meta.sys.mk: downgrade missing Filemon error to warning
Cirrus-CI was red because `make makeman` failed with a spurious "filemon
is not loaded" error.  For now just make it a warning.
2023-04-23 10:48:22 -04:00
Simon J. Gerraty
d7e3299f60 Ensure good exit status from type
When looking to see if nproc is available we do
not want warnings about 'type nproc' having bad exit.
2023-04-22 23:15:05 -07:00
Simon J. Gerraty
04989ef426 bmake 20230123 gives us .SYSPATH
No need to faff about trying to work out where bmake
is looking - it tells you.
2023-04-22 18:15:31 -07:00
Colin Percival
df53ae0fdd Remove portsnap(8)
Rather than having a tool in the FreeBSD base system for obtaining
the FreeBSD ports tree, users are encouraged to `pkg install git`
and then `git clone https://git.FreeBSD.org/ports.git /usr/ports`.

The portsnap servers will continue operating until FreeBSD 13 reaches
its End-of-Life, and portsnap is available from the ports tree as
ports-mgmt/portsnap.

Requested by:	portmgr
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D39563
X-MFC:		no
2023-04-22 18:12:37 -07:00
Simon J. Gerraty
fb30bb0d4d dirdeps.mk ensure M_dep_qual_fixes is applied 2023-04-22 18:00:45 -07:00
Simon J. Gerraty
3483454556 local.meta.sys.mk skip OBJTOP for host
It was already done by local.meta.sys.env.mk
2023-04-22 17:59:12 -07:00
Simon J. Gerraty
cf20b1f81c Extract some of local.meta.sys.mk to local.meta.sys.env.mk
Latest meta.sys.mk follows sys.mk in including local.meta.sys.env.mk
and local.meta.sys.mk late, but we have things we need done early
so move them to local.meta.sys.env.mk
2023-04-22 15:07:53 -07:00
Simon J. Gerraty
8561d0b2ec Simplify building host tools during DIRDEPS_BUILD
The whole point of the DIRDEPS_BUILD is to avoid tree walks
and basically build everything in a single pass.
We use the pseudo MACHINE "host" to represent the build host.

When the build host is not FreeBSD or is an older version of FreeBSD
it may need some help to build host-tools.

The directory tools/build does this - building libegacy.

local.sys.mk: create a pseudo option MK_host_egacy to indicate
if tools/build needs to be built for "host".

local.dirdeps.mk: set MK_host_egacy.host to ${MK_host_egacy}
all other DEP_MACHINES will get "no"

This allows a Makefile.depend.options in makefs etc to cause tools/build
to be built for host but only if necessary.

local.init.mk: use ISYSTEM as arg to -isystem so that it can be overridden.
The default remains ${STAGE_INCLUDEDIR}

src.init.mk: if MACHINE is host and we are not FreeBSD
set some MK_ flags the same as tools/build/mk/Makefile.boot.pre and
include src.init.${.MAKE.OS:tl}.mk if it exists.

For older versions of FreeBSD add libegacy when building PROGs for "host"

Also instead of -isystem${STAGE_INCLUDEDIR} we want
-I${STAGE_INCLUDEDIR} and -isystem/usr/include so we override ISYSTEM.
This means any headers we stage for "host" will take precedence over
system headers but #include_next will DTRT.

src.init.linux.mk: add
-I${SRCTOP}/tools/build/cross-build/include/linux
and generally deal with building host tools on Linux.
Eg. static linking does not work so set NO_SHARED= no
Override some HAVE_ flags.

src.sys.env.mk: on linux awk throws an warning about # in newvers.sh
just send stderr to /dev/null

Reviewed by:	jrtc27, arichardson
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39744
2023-04-22 12:01:49 -07:00
Simon J. Gerraty
f957a32dac Update meta.sys.mk and related local*mk
Move the setting of TARGET_SPEC_VARS to local.sys.env.mk
so meta.sys.mk can do the processing, and include local.meta.sys.mk
later.

Move the setting of GENDIRDEPS_FILTER*_VARS from local.gendirdeps.mk
to local.meta.sys.mk so we can automatically set DEP_* at level 1+
to avoid syntax errors when DEP_* variables are used in conditionals
in Makefile.depend files.

Update gendirdeps.mk just to get the documentation about the above.
No functional change.

local.dirdeps.mk be more careful about adding to DIRDEPS to avoid
unnecessary overhead, and introducing cycles in the graph.
Also set DEP_MACHINE_CPUARCH.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39737
2023-04-20 20:38:53 -07:00
Brooks Davis
8612e44589 Remove unused NETLINK build option
NETLINK was added along side NETLINK_SUPPORT to control building netlink
specific programs, but it has no consumers so remove it for now.

Reviewed by:	melifaro
Differential Revision:	https://reviews.freebsd.org/D39678
2023-04-20 22:38:36 +01:00
John Baldwin
47e888f836 Remove a few more references to riscv64sf.
Fixes:		1ca12bd927 Remove the riscv64sf architecture.
2023-04-20 11:00:46 -07:00
Simon J. Gerraty
8fe4f8f7a7 Fix building host tools for host
Several makefile depend on tools built for host.
At least when using DIRDEPS_BUILD we can build these for the
pseudo machine "host" to facilitate building on older host versions.

Ideally we would build these tools in their own directories to avoid
building more than needed.

For now, setting an appropriate default for BTOOLSPATH will suffice

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39708
2023-04-20 10:05:43 -07:00
Simon J. Gerraty
0df4d8ad7a Add jobs.mk to allow for target-jobs
jobs.mk automates -j$JOB_MAX and capturing build log based on target.

Compute a default for JOB_MAX in local.sys.mk

Reviewed by:	stevek, imp
Differential Revision:	https://reviews.freebsd.org/D39683
2023-04-20 09:40:39 -07:00
Stephen J. Kiernan
64a67b7266 meta: remove LDFLAGS setting when cross building
The setting was left over from older clang version and is not
necessary any more (and also causes link issues.)

Reviewed by:	sjg
2023-04-19 21:40:29 -04:00
Simon J. Gerraty
a6bd50f712 Avoid breaking crunchgen with meta stats
When using DIRDEPS_BUILD we normally get stats as each dir finishes.
This upsets crunchen, so keep quiet when _RECURSING_CRUNCH is defined
2023-04-18 20:25:33 -07:00
Simon J. Gerraty
5ef0969e62 Handle libs that create linker scripts as libs
Eg ncurses creates libncursesw.ald
This is the only example so far, but if we are staging
handle it.

Reviewed by:	stevek
2023-04-18 20:22:13 -07:00
Simon J. Gerraty
cb05ce69c2 Ensure the stage_* targets we use exist 2023-04-18 20:19:11 -07:00
Simon J. Gerraty
9eaf82f27c dirdeps.mk guard against inclusion from Makefile.depend.options
A typo in Makefile.depend.options including dirdeps.mk rather than
dirdeps-options.mk can result in infinite recursion - don't let that happen.

Reviewed by:	stevek
2023-04-18 20:15:25 -07:00
Steve Kiernan
4e8b87afe0 Handle errors if WARNS is not defined.
One conditional outside of ifdef WARNS did not protect against an
unset WARNS. Default WARNS to 0 in conditional if not defined.

Obtained from:	Juniper Networks, Inc.
2023-04-18 13:18:01 -04:00
Stephen J. Kiernan
49b6bc83cc meta: print some additional variables on build errors.
Add CPUTYPE and MACHINE_CPUARCH to the list of variables printed
when there are build errors.

Protect local.sys.mk from multiple inclusion.

Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2023-04-18 01:30:34 -04:00
Stephen J. Kiernan
d664658015 meta: Allow TARGET_SPEC_VARS to be overridden
Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2023-04-18 00:25:59 -04:00
Simon J. Gerraty
c4c981c1e6 Move include of site.src.opts.mk to allow more control
Sometimes a site may have different policy needs,
include site.src.opts.mk just before bsd.mkopt.mk to allow
more control.

Reviewed by: imp
2023-04-17 10:44:37 -07:00
Dimitry Andric
2ba84b4bcd Suppress lld 16 errors about undefined symbols in version maps
lld >= 16 turned on --no-undefined-version by default, which results in
errors whenever symbols are mentioned in version maps, but are not
actually defined in the binary.

Since we have quite a few instances of symbols that are defined or not,
depending on various compile-time settings, suppress this lld check for
the time being.

MFC after:	1 week
2023-04-17 18:25:52 +02:00
Simon J. Gerraty
bf7aa99a55 Update meta mode makefiles
meta2deps - add checks to detect truncated/corrupted filemon data
(only known to happen on Linux hosts), to ensure we do not auto
update dependencies based on incomplete data.

meta.stage.mk adds STAGE_SHLIB_LINKS_FILTER and STAGE_LINK_AS_*

We also allow for hosts where egrep is deprecated for grep -E

Reviewed by: stevek
2023-04-16 18:40:53 -07:00
Simon J. Gerraty
a3d015bbf1 Update dirdeps.mk
Fix handling of local.dirdeps-missing.mk
we need to reset DEP_RELDIR and DIRDEPS just as if including
a Makefile.depend*

Also fix a typo in DIRDEP_LOADAVG_REPORT
and improve debug output.

Reviewed by: stevek
2023-04-16 18:17:26 -07:00
John Baldwin
1ca12bd927 Remove the riscv64sf architecture.
Reviewed by:	jrtc27, arichardson, br, kp, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39496
2023-04-12 11:09:27 -07:00
John Baldwin
cd800d3c96 Enable -Warray-parameter for clang.
I fixed many of these previously for GCC 12 and make tinderbox passes
with this enabled.

Differential Revision:	https://reviews.freebsd.org/D39378
2023-04-11 13:47:59 -07:00
John Baldwin
eeedaefab5 Remove LLVM build glue for MIPS as a native architecture.
This does not remove LLVM_TARGET_MIPS.  Note that the only
MACHINE_ARCH values ending in 'hf' were all MIPS architectures, hence
removing the pattern matches for 'hf'.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39331
2023-03-29 15:06:15 -07:00
Alexander V. Chernikov
a85dcd4ac4 netlink: restrict default userland switch to netlink to i386/amd64. 2023-03-26 11:06:53 +00:00
Alexander V. Chernikov
64dfea8651 netlink: add NETLINK/NETLINK_SUPPORT userland options.
Make userland tools such as netstat, route, arp and ndp use
 either netlink or rtsock interfaces based on the NETLINK_SUPPORT
 options.
Both NETLINK and NETLINK_SUPPORT options are turned on by default.

Reviewed By: eugen
Differential Revision: https://reviews.freebsd.org/D39148
2023-03-26 08:59:58 +00:00
Jessica Clarke
9e914c7af1 Add new DISK_IMAGE_TOOLS_BOOTSTRAP option
This will build etdump, makefs and mkimg as bootstrap tools to allow
easily creating disk images. Note that etdump is bootstrapped due to its
use in the release scripts for building ISO images.

Reviewed by:	emaste, arichardson
Differential Revision:	https://reviews.freebsd.org/D39072
2023-03-15 00:06:53 +00:00
Alfredo Dal'Ava Junior
63715498ac powerpc: enable ZFS on 32 bit powerpc/powerpcspe
Enable ZFS on powerpc 32 bit since it appears to build and work
correctly.

MFC after:	3 weeks
Relnotes:	yes
2023-03-12 03:20:11 -03:00
Warner Losh
3916fdd2f2 opts: fix silly typo
It's powerpcspe not powerpcspc

Pointy Hat To:		imp
Noticed by:		jhibbits
Fixes:			41cf798e82
Sponsored by:		Netflix
2023-03-10 09:00:38 -07:00
Warner Losh
41cf798e82 opts: popwerpcspc is also 32-bit
Mark ZFS broken here too, add comment about why.  Add comments about
OFED being disabled on 32-bit arm, add comment about why too.

Sponsored by:		Netflix
2023-03-10 08:49:04 -07:00
Warner Losh
9503d2704c opts: Minor cleanup of ZFS options
Remove redundant CPUARCH test: we really just want a plain MACHINE_ARCH
here.

Second, always turn off LOADER_ZFS when we turn off ZFS. Not 100%
required, but we did it some places and not others. There's no current
mechanism to say that if X is disabled then X_Y must be too.

Sponsored by:		Netflix
2023-03-10 07:14:04 -07:00
Brooks Davis
aad600e52e Remove WITH(OUT)_ATM option
With the removal of NgATM it no longer controls anything.

Reviewed by:	manu, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38882
2023-03-09 18:09:18 +00:00
John Baldwin
fe0f695039 Enable OFED on all platforms except for 32-bit arm.
32-bit arm triggers multiple -Wunaligned-access errors due to
structure packing.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38972
2023-03-08 15:12:00 -08:00