4081 Commits

Author SHA1 Message Date
Christos Margiolis 7a6d524a31 libsamplerate: Build as internal library
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51666
2025-08-01 16:02:13 +03:00
Kevin Bowling 147b90973b Revert "src.opts.mk: Default LLVM_ASSERTIONS off"
Enabling and disabling LLVM assertions changes the ABI. There have
been multiple reports on the freebsd-current@ mailing list of broken
'cc'.

Out of caution, you may wish to do a clean build while crossing this
commit after building the reverted commit if you do not set
LLVM_ASSERTIONS in your src.conf.

Discussed with:	kevans, jrtc27

This reverts commit 9b3055d0d4.
2025-07-30 20:33:52 -07:00
Baptiste Daroussin 7b68893ffa krb5: remove libedit from the bootstrap tools
libedit breaks the bootstrap on MacOS and Linux.

Activate libedit only for the regular build not for the bootstrap
tools

While here fix the definition of the dependency chain between
libkrb5ss and libedit (and libtinfow) via src.libnames.mk

Remove a local patch to find the readline compatible header and
find them via proper CFLAGS.
2025-07-29 17:49:44 +02:00
Lexi Winter 14f57afb85 bmake: Add a package for bmake and share/mk
bmake along with /usr/share/mk seems to meet the criteria for being in
its own package: it's self-contained and the majority of users (who are
using binary packages) don't need to install it, so it doesn't belong in
FreeBSD-utilities.  Instead, put it in its own package.

Add a dependency on the new package from:

- sendmail (uses make to build its configuration)
- NIS (uses make to build the database).

But not from examples, because while some of the examples do require
make, they are intended as examples rather than something to be used
directly.

Reviewed by:	manu, sjg
Differential Revision:	https://reviews.freebsd.org/D50149
2025-07-28 10:17:36 +01:00
Kevin Bowling 9b3055d0d4 src.opts.mk: Default LLVM_ASSERTIONS off
This noticeably slows down the compiler execution and with the move to
pkgbase is one of the remaining differences that cannot be
administratively controlled; pkg kernels and malloc.conf(5) will allow
quickly testing a snapshot in a configuration closer to stable and
release branches.

dim@ notes that you need to set WITH_LLVM_ASSERTIONS in src.conf(5) if
you want to report an issue with LLVM.

Enabling WITH_LLVM_ASSERTIONS is also a consideration for CI and pkg
builders especially tracking main.

Approved by:	dim, kevans
Differential Revision:	https://reviews.freebsd.org/D50388
2025-07-27 01:00:39 -07:00
Lexi Winter 5e50b89ddf bsd.man.mk: add MANGROUPS
MANGROUPS allows manpages to be divided into groups with their own
options, analogous to CONFGROUPS.  This is mainly used for installing
manpages into the correct package by setting ${<group>PACKAGE}.

Convert the backward-compatibility variables MAN1..MAN9 into man
groups.

Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D51490
2025-07-25 18:31:26 +01:00
Simon J. Gerraty 3717484168 bsd.subdir.mk skip _SUBDIR for DIRDEPS_BUILD
For DIRDEPS_BUILD we want to ignore _SUBDIR regardless of
.MAKE.LEVEL

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D51454
2025-07-21 09:11:44 -07:00
Cy Schubert c7da9fb90b KRB5: Enable MIT KRB5 by default
Set WITH_MITKRB5=yes as the default.

Rebuild all USES=gssapi ports is recommended.

A clean buildworld is required.

Relnotes:	yes
2025-07-21 07:07:22 -07:00
John Baldwin 0d0d6378ad Remove stale reference to EXTRA_ARCHES_arm
Fixes:		7818c2d37c ("armv6: Remove support for building armv6")
2025-07-14 11:02:15 -04:00
John Baldwin 4a3fb7547e powerpc: Disconnect 32-bit powerpc from make universe
World and kernels for 32-bit powerpc can still be built using the
buildworld and buildkernel targets.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D51194
2025-07-14 11:01:09 -04:00
Baptiste Daroussin 0f5c86ddb0 libyaml: import libyaml vendor version 0.2.5
The yaml parser used in nuageinit is too incomplete, import libyaml
in order to be able to use as a complete parser for nuageinit.
2025-06-26 09:02:31 +02:00
SHENGYI HONG 10cb3979a9 share/mk: Add sccache suport for WITH_CCACHE_BUILD option
By setting CCACHE_NAME=sccache , sccache can be used as an alternative
for ccache.

Reviewed by:	emaste, jhb
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49417
2025-06-20 01:43:48 -04:00
Cy Schubert ee3960cba1 krb5: Add build plumbing
Add tne necessary Makefiles and header files to facilitate building
MIT KRB5 as part of buildworld. Nothing will build until the
WITH_MITKRB5/MK_MITKRB5 option has been plumbed in Makefile.inc1.

Before any changes to Makefile.inc1 are made to enable MIT KRB5,
additional commits to other affected software will need to be committed.

krb5/Makefile was inspired by kerberos5/Makefile. The Makefiles in
krb5/util and krb5/lib were inspired by those in lib/libc and in
lib/ncurses.

Differential revision:	https://reviews.freebsd.org/D50695
Sponsored by:		The FreeBSD Foundation
2025-06-15 19:49:35 -07:00
Ricardo Branco f580578877 Makefile.inc1: Cleanup (un)compressed manpages
When switching between compressed and uncompressed manual pages, the
other type is left behind as divots. Compensate by removing the
now-unwanted man pages automatically.

Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1295
2025-06-12 13:55:51 -06:00
Simon J. Gerraty ac05fc3953 local.dirdeps.mk remove stray .endif 2025-06-04 20:35:59 -07:00
Simon J. Gerraty bf407f36c5 local.dirdeps.mk move MK_RUN_TESTS .endif
The MK_RUN_TESTS check should bound all of the logic
relevant to hooking tests into the graph.
2025-06-04 20:27:39 -07:00
Cy Schubert 290e8aaa38 share/mk: Add MIT KRB5 build knob
This is the first in a series of commits to replace Heimdal with
MIT KRB5. This first commit adds the WITH_MITKRB5/MK_MITKRB5 knob
to src.opts.mk and its corresponding documentation in
tools/build/options. The default is off.

This change of and by itself is of no consequence as MIT KRB5 has
yet to be imported in to HEAD. But it does insulate the build from
inremental change until the last patch is committed when WITH_MITKRB5
will build MIT KRB5 1.21.3 instead of Heimdal.

The affords us the opportunity to review smaller commits.

This is the first of many commits.

Reviewed by:	imp, jhb, brooks, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D50684
2025-06-04 19:45:46 -07:00
Mark Johnston 1776ba8de5 share/mk: Define a rule for dtrace -G to generate .pieo files
Now that bsd.prog.mk uses .pieo instead of .o for object files linked
into PIEs, we need to ensure that the object file generated by dtrace -G
has the same extension.

Fixes:		245bb01106 ("Use .pieo extension for WITH_PIE bsd.prog.mk output")
Sponsored by:	Innovate UK
2025-06-04 20:58:38 +00:00
Simon J. Gerraty 8e1e989c77 Add host.test.mk for DIRDEPS_BUILD
If we are doing DIRDEPS_BUILD and MK_RUN_TESTS is yes
we can hook tests associated with dirs to be built into the graph
such that we avoid circular dependencies but the build will fail
should any test fail.

Make MK_RUN_TESTS independent of MK_TESTS
also for non-DIRDEPS_BUILD ensure we have RELDIR and check it
against patterns in HOST_RUN_TESTS.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D50387
2025-06-04 12:56:44 -07:00
Simon J. Gerraty a40d73475b Export SB_OBJROOT for later reference
The build varies MAKEOBJDIRPREFIX at times which
can make it difficult to track the original OBJROOT.
This is easier when we get the original from env as SB_OBJROOT.
If SB_OBJROOT did not come from env, set and export it
the first time we set OBJROOT.

This allows SB_OBJROOT to be used in .MAKE.META.IGNORE* variables
to tweak what should be considered as making a target out-of-date.

Update auto.obj.mk to latest from contrib/bmake - handles relative
objdirs more simply and reliably.

Also update jobs.mk and stage-install.sh

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D50313
2025-06-03 12:55:18 -07:00
Ed Maste 7866f1270f bsd.own.mk: Introduce TAR_XZ_CMD
It is TAR_CMD with -J added, and can be used to avoid a tar | xz pipe
that could mask errors.

Reviewed by:	bz
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50473
2025-05-24 21:00:41 -04:00
Brooks Davis 9c20010361 share/mk: pass SHARED_CFLAGS to PIC and PIE from assembly
This matches what we do with C sources.  Document SHARED_CFLAGS.

PR:		286975
Reviewed by:	jhb, emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D50466
2025-05-24 00:38:06 +01:00
Brooks Davis cba6bf5d95 share/mk/bsd.README: refer to the linker, not the loader
We're invoking the linker to create programs or libraries from one or
more object files not the loader to load them in to memory.

Reviewed by:	jhb, emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D50481
2025-05-24 00:37:50 +01:00
Brooks Davis fbfc85d9e8 share/mk: make *ADD and *FLAGS descriptions common
Move ACFLAGS, AFLAGS, CFLAGS, CXXFLAGS, DPADD, LDADD, LDFLAGS, and
LIBADD descriptions into the common section since they aren't limited
to bsd.progs.mk.  Mostly just relocated, but updated the DPADD text to
reflect its relocation.

Reviewed by:	jhb
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D50479
2025-05-24 00:37:50 +01:00
Brooks Davis b15f5c8fa5 src.libnames.mk: add LIBSYS_PIC
Make it possible to find libsys_pic.a.

Reviewed by:	jhb
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D50474
2025-05-24 00:33:27 +01:00
Brooks Davis 83812c4ecc bsd.suffixes-extra.mk: rewrap long lines
Group CFLAGS variables together either on one line or all separate
depending on length.

Reviewed by:	jhb
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D50463
2025-05-24 00:32:05 +01:00
Dimitry Andric 245bb01106 Use .pieo extension for WITH_PIE bsd.prog.mk output
When object files for programs are built using bsd.prog.mk, and WITH_PIE
is enabled, the extension used is still plain ".o". To be consistent
with bsd.lib.mk, and to allow changes in WITH_PIE settings to propagate
correctly, the extension should be ".pieo" instead.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D49966
2025-04-25 19:51:55 +02:00
Dimitry Andric 9c4f1497da Move extra suffix-transformation rules into bsd.suffixes-extra.mk
To make it possible to use the .SUFFIXES list and suffix-transformation
rules from bsd.lib.mk in other places, move them to a separate file,
bsd.suffixes-extra.mk.

Note that we cannot add the list and rules to bsd.suffixes.mk, since
that file also gets included by sys.mk, which applies to non-source
builds. That would require a whole ports exp-run.

No functional change intended.

Reviewed by:	brooks, emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D49965
2025-04-23 17:42:22 +02:00
Dag-Erling Smørgrav 12668eadcb bsd.compiler.mk: Add a blocks compiler feature.
Sponsored by:	Klara, Inc.
Reviewed by:	jrtc27
Differential Revision:	https://reviews.freebsd.org/D49963
2025-04-22 19:44:58 +02:00
Simon J. Gerraty cf5f0744cd Add .NOTMAIN to guard targets
Avoid make mistaking a guard target for the .MAIN one.
2025-04-19 12:57:41 -07:00
John Baldwin 5e6befdaca atf: Switch from std::auto_ptr<> to std::unique_ptr<>
This mirrors upstream commit f053ab687f6e27aa264f599ecbfc5ef27ad4e2d3.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D49789
2025-04-16 10:10:35 -04:00
John Baldwin f1a94c5552 bsd.sys.mk: Re-enable warnings for C++11 extensions
This should no longer be relevant since the default C++ standard is
C++17.

Reviewed by:	imp, asomers, emaste
Differential Revision:	https://reviews.freebsd.org/D49787
2025-04-16 09:41:42 -04:00
John Baldwin 6527682ab7 src: Use gnu++17 as the default C++ standard
Previously the compiler's default C++ standard was used unlike C where
bsd.sys.mk explicitly sets a default language version.  Setting an
explicit default version will give a more uniform experience across
different compilers and compiler versions.

gnu++17 was chosen to match the default C standard.  It is well
supported by a wide range of clang (5+) and GCC (9+) versions.

gnu++17 is also the default C++ standard in recent versions of clang
(16+) and GCC (11+).  As a result, many of the explicit CXXSTD
settings in Makefiles had the effect of lowering the C++ standard
instead of raising it as was originally intended and are removed.

Note that the remaining explicit CXXSTD settings for atf and liblutok
explicitly lower the standard to C++11 due to use of the deprecated
auto_ptr<> template which is removed in later versions.

Reviewed by:	imp, asomers, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D49223
2025-04-11 09:53:50 -04:00
Ed Maste 1cae7121c6 Enable LLVM_BINUTILS by default
Starting in 2014 FreeBSD migrated from GNU binutils to ELF Tool Chain
tools.  At that time there were no usable LLVM versions of those tools,
but they have been developing rapidly since then.  Migrate to LLVML's
tools for both functionality and maintainability reasons.

This will eventually support the use of link-time optimization (LTO) in
the FreeBSD base system.  LTO runs optimization passes over the entire
executable (or library) at link time and thus allows for more effective
optimization than when performed on individual compilation units.

When using LTO object files (.o) including those contained in static
library archives (.a) contain LLVM IR bitcode rather than target
object code.  This means that utilities that operate on object files
need to support LLVM IR.

As with ELF Tool Chain the LLVM tools aim for command line and output
format compatibility with GNU binutils, although there are a few minor
differences.  Where these cause a material issue (breaking a port or
eliminating required functionality) we can submit LLVM bugs and work
on patches.

PR:		258872 (exp-run)
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49361
2025-03-14 13:29:06 -04:00
Brooks Davis e62ff34a67 sys.mk: Improve ports compatibility hack guard
Back in 9ca5434380 and include of bsd.cpu.mk in sys.mk was added as a
hack for ports Makefiles.  This works fine in general (for values of
fine that include not being able to use MK_ variables in bsd.cpu.mk),
but has surprising effects on MacOS with a case insensitive filesystems.
There we build things in paths like share/docs/IPv6 where
../../Mk/bsd.port.mk matches share/mk/bsd.port.mk.

Fix this issue by checking for ../../Mk/Uses which seems highly unlikely
to match something in share/mk.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D49232
2025-03-04 20:51:10 +00:00
Ed Maste 085c0641a2 bsd.mkopt.mk: Avoid warning from makeman
Setting WITHOUT_X where X is a __REQUIRED_OPTION produces a warning.

This occurred during makeman's `make showconfig` invocatation, but the
warning serves no purpose there, and clutters makeman's output.  Skip
the warning for the showconfig target used by makeman.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49123
2025-02-25 08:10:07 -05:00
Simon J. Gerraty e9c2838d93 Add newlog.sh and setops.sh to share/mk
jobs.mk makes use of newlog.sh if found.

Set NEWLOG_SH in local.sys.env.mk to save jobs.mk searching for it.

PR:	284390
Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D48737
2025-02-11 09:42:17 -08:00
Minsoo Choo ca4eddea97 src: Use gnu17 as the default C standard for userland instead of gnu99
Tracking newer versions of C (and C++) permits assuming newer language
features in the base system.  Some C11 extensions are already used in
the base system but implemented on top of GNU C extensions such as
_Alignas and _Static_assert.  In some cases the fallback versions in
cdefs.h are more limited than the native C11 extensions.

Even though C11 is the next major version of C, C17 is chosen instead
since C17 does not add new features to C but merely fixes defects in
C11.  It is also well supported by a wide range of clang (7.0.0+) and
GCC (8.1+) versions.

Along with changing the default, this change also removes explicit
requests for c11 via the CSTD variable in various Makefiles.

Libraries and binaries for ZFS continue to use c99.

PR:		284039 (exp-run)
Reviewed by:	imp, arichardson, emaste
Differential Revision:	https://reviews.freebsd.org/D43237
2025-02-11 09:16:25 -05:00
Simon J. Gerraty c8245ceb47 Update dirdeps.mk et al
Update dirdeps.mk and friends to match latest contrib/bmake/mk

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D48855
2025-02-10 14:20:06 -08:00
Ed Maste 5bb9236d27 src.libnames.mk: Apply -L also for privatelibs
For INTERNALLIBS and regular libs we add -L to specify the library path,
which may be needed if a library is in a non-default path but also means
we can link against those libraries when built independently.  Do the
same for privatelibs as well.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48891
2025-02-09 14:00:29 -05:00
John Baldwin 0e4c4cc491 share/mk: Remove more support for building profiled libraries
- Remove documentation of profiled library support from bsd.README

- Remove rules to create individual .po files.  The rules to generate
  an archive from these files was already removed, so these .po rules
  aren't used.

Reviewed by:	emaste
Fixes:		3750ccefb8 ("Retire MK_PROFILE infrastructure")
Differential Revision:	https://reviews.freebsd.org/D48819
2025-02-05 09:49:11 -05:00
Jose Luis Duran 955f974a1a mk: Add missing escape character
Add a missing escape character that splits a long line to avoid breaking
the builds.

Reported by:	cy
Approved by:	emaste (mentor)
Fixes:	88d448ec81 ("mk: Move vm stack test debug symbols")
MFC after:	1 week
2025-02-04 15:23:25 +00:00
Jose Luis Duran 88d448ec81 mk: Move vm stack test debug symbols
Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by
placing sys/vm/stack test debug symbols under /usr/lib/debug.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48796
2025-02-04 14:47:24 +00:00
Alexander Leidinger 1c2ae9233b Limit some cc options based upon features
Limit the use of stack clash protection and zeroregs based upon
compiler features:
 - switch unconditional use of stack clash protection into a compiler
   feature
 - limit the use of stack clash protection on unsupported architectures
   (I did not wade into the source of each compiler to determine when
   support arrived for each architecture, I used the compiler version
   when it was introduced with what is supported currently)
 - add a safeguard for stack clash protection in places where we have no
   SSP provisions (we may not need it, but better safe than sorry when
   something changes or is overridden by the user)
 - limit the use of zeroregs the same way, so that even specifying it
   will not lead to build failures (useful for universe builds when
   WITH_ZEROREGS is specified in src.conf)

Differential Revision:	https://reviews.freebsd.org/D48724
2025-01-31 13:15:29 +01:00
Alexander Leidinger f934e629dc Add stack clash protection to the WITH_SSP flag
Some background info availabe in:
https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html
https://developers.redhat.com/blog/2020/05/22/stack-clash-mitigation-in-gcc-part-3
https://blog.llvm.org/posts/2021-01-05-stack-clash-protection/

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D48651
2025-01-25 13:45:53 +01:00
Alexander Leidinger 2a44cccd40 Add option to clear caller-used registers on function return.
The WITH_ZEROREGS option for src.conf will zero caller-used register
contents just before returning from a function, ensuring that
temporary values are not leaked beyond the function boundary. This
means that register contents are less likely to be available for side
channel attacks and information exposures.

It reduces all except 1 of the simple "write-what-where" ROP gadgets in
/lib:
    grep "Gadget found" /tmp/before_lib* | wc -l
     197
    grep "Gadget found" /tmp/after_lib* | wc -l
       1
    grep "Gadget found" /tmp/after_lib*
    /tmp/after_libbsdxml.so.4.txt:  [+] Gadget found: 0x1b3f1 mov qword ptr [rdi], rcx ; pop rbp ; ret

To reproduce:
    for lib in *.so.*; do
        echo $lib:
        ROPgadget --ropchain --binary /tmp/be_mount.Sx87/lib/$lib | sed -n '/Step 1/,/Step 2/p' >! /tmp/before_$lib.txt
        ROPgadget --ropchain --binary $lib | sed -n '/Step 1/,/Step 2/p' >!  /tmp/after_$lib.txt
    done

Additionally, in some cases this reduces the number of all ROP gadgets
(quick check with /libs only):
libalias.so.7: reduction 10.000%
libavl.so.2: reduction 13.900%
libbsdxml.so.4: reduction 37.500%
libc.so.7: reduction 10.000%
libc++.so.1: reduction 14.800%
libcam.so.7: reduction 50.700%
libcap_netdb.so.1: reduction 5.800%
libcasper.so.1: reduction 14.600%
libcrypto.so.30: reduction 7.500%
libdtrace.so.2: reduction 3.900%
libelf.so.2: reduction 15.800%
libgcc_s.so.1: reduction 32.700%
libibverbs.so.1: reduction 5.300%
libicp.so.3: reduction 2.100%
libipt.so.0: reduction 28.200%
libirdma.so.1: reduction 1.600%
libkiconv.so.4: reduction 0%
libm.so.5: reduction 21.900%
libmd.so.6: reduction 0%
libmd.so.7: reduction 3.100%
libncursesw.so.9: reduction 11.200%
libnvpair.so.2: reduction 40.200%
libpcap.so.8: reduction 11.400%
libpjdlog.so.0: reduction 27.400%
libsbuf.so.6: reduction 2.900%
libspl.so.2: reduction 42.300%
libsys.so.7: reduction 2.700%
libthr.so.3: reduction 21.000%
libuutil.so.2: reduction 13.100%
libz.so.6: reduction 5.600%
libzpool.so.2: reduction 15.100%

In some cases it adds some ROP gadgets despite removing the simple ROP
gadgets:
lib80211.so.1: reduction -32.700%
libbe.so.1: reduction -22.300%
libbegemot.so.4: reduction -20.500%
libcap_dns.so.2: reduction -58.000%
libcap_fileargs.so.1: reduction -28.200%
libcap_grp.so.1: reduction -54.000%
libcap_net.so.1: reduction -28.800%
libcap_pwd.so.1: reduction -38.800%
libcap_sysctl.so.2: reduction -71.100%
libcap_syslog.so.1: reduction -15.000%
libcrypt.so.5: reduction -14.600%
libctf.so.2: reduction -.300%
libcxxrt.so.1: reduction -14.000%
libdevstat.so.7: reduction -1.600%
libedit.so.8: reduction -4.200%
libgeom.so.5: reduction -16.500%
libicp_rescue.so.3: reduction -2.300%
libipsec.so.4: reduction -31.800%
libjail.so.1: reduction -21.700%
libkvm.so.7: reduction -5.300%
libmlx5.so.1: reduction -6.300%
libmt.so.5: reduction -23.000%
libnv.so.1: reduction -.400%
librss.so.1: reduction -3.800%
librt.so.1: reduction -24.000%
libssp.so.0: reduction -21.100%
libstats.so.0: reduction -9.000%
libtinfow.so.9: reduction -3.500%
libtpool.so.2: reduction -36.500%
libufs.so.8: reduction -11.900%
libulog.so.0: reduction -67.400%
libumem.so.2: reduction -2.000%
libutil.so.9: reduction -7.200%
libxo.so.0: reduction -9.000%
libzdb.so.2: reduction -11.700%
libzfs_core.so.2: reduction -17.700%
libzfs.so.4: reduction -.300%
libzfsbootenv.so.1: reduction -26.900%
libzutil.so.2: reduction -5.600%

To reproduce:
    for lib in *.so.*; do
        echo -n $lib:
        before="$(ROPgadget --nosys --nojop --binary /tmp/be_mount.Sx87/lib/$lib | tail -n1 | cut -d : -f 2)"
        after="$(ROPgadget --nosys --nojop --binary $lib | tail -n1 | cut -d : -f 2)"
        echo " reduction" $(bc -S 3 -e "(1-${after}/${before})*100")%
    done >/tmp/reduction.txt

Most of the time the size difference is very small (<1% for >50% of the
files and >10% for only 2 files):
lib80211.so.1: size change .100%
libalias.so.7: size change 0%
libavl.so.2: size change 0%
libbe.so.1: size change .100%
libbegemot.so.4: size change .100%
libbsdxml.so.4: size change 0%
libc.so.7: size change 1.200%
libc++.so.1: size change 1.600%
libcam.so.7: size change 1.900%
libcap_dns.so.2: size change .100%
libcap_fileargs.so.1: size change .100%
libcap_grp.so.1: size change .100%
libcap_net.so.1: size change .100%
libcap_netdb.so.1: size change .100%
libcap_pwd.so.1: size change .100%
libcap_sysctl.so.2: size change .100%
libcap_syslog.so.1: size change .100%
libcasper.so.1: size change 0%
libcrypt.so.5: size change 3.900%
libcrypto.so.30: size change 1.400%
libctf.so.2: size change .100%
libcxxrt.so.1: size change .100%
libdevstat.so.7: size change 15.400%		exceptional
libdtrace.so.2: size change .600%
libedit.so.8: size change 1.800%
libelf.so.2: size change .100%
libgcc_s.so.1: size change 3.000%
libgeom.so.5: size change 0%
libibverbs.so.1: size change .100%
libicp_rescue.so.3: size change .100%
libicp.so.3: size change 1.500%
libipsec.so.4: size change .100%
libipt.so.0: size change 3.100%
libirdma.so.1: size change .100%
libjail.so.1: size change .100%
libkiconv.so.4: size change .100%
libkvm.so.7: size change .100%
libm.so.5: size change 1.700%
libmd.so.6: size change 0%
libmd.so.7: size change .100%
libmlx5.so.1: size change 0%
libmt.so.5: size change .100%
libncursesw.so.9: size change 1.900%
libnv.so.1: size change 4.300%
libnvpair.so.2: size change 4.300%
libpcap.so.8: size change 1.200%
libpjdlog.so.0: size change .100%
librss.so.1: size change .200%
librt.so.1: size change .100%
libsbuf.so.6: size change .100%
libspl.so.2: size change 0%
libssp.so.0: size change .100%
libstats.so.0: size change .100%
libsys.so.7: size change .100%
libthr.so.3: size change 2.400%
libtinfow.so.9: size change 1.600%
libtpool.so.2: size change .100%
libufs.so.8: size change .100%
libulog.so.0: size change .100%
libumem.so.2: size change 54.300%		exceptional
libutil.so.9: size change .100%
libuutil.so.2: size change .100%
libxo.so.0: size change .100%
libz.so.6: size change .100%
libzdb.so.2: size change .300%
libzfs_core.so.2: size change .100%
libzfs.so.4: size change 2.000%
libzfsbootenv.so.1: size change .100%
libzpool.so.2: size change 1.200%
libzutil.so.2: size change 0%
2025-01-22 19:33:23 +01:00
Warner Losh cc6d72cfcc bsd.cpu.mk: Remove xscale reference
We've retired all the armv5te support, so we don't need this here anymore.

Sponsored by:		Netflix
2025-01-21 14:24:10 -07:00
Norikatsu Shigemura 0fb33e049a bsd.cpu.mk: Add _CPUFLAGS to CXXFLAGS as well
PR: 180365
Reviewed by: imp
Sponsored by: Netflix
2025-01-21 14:24:10 -07:00
Kyle Evans 05427f4639 secure: hook up libecc as libpkgecc
libecc is not intended to be general use, other applications should
really be using openssl.  pkg(7) uses libecc to align with the pkg(8)
project and its goals.  This will be used in the upcoming support for
ECC in pkg(7).

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D48117
2025-01-01 15:11:22 -06:00
Kyle Evans f59bb61e1e lib: hook libder up to the build
libder will be used in upcoming ECC support in the pkg(7) bootstrap to
read DER-encoded keys and signatures.

Differential Revision:	https://reviews.freebsd.org/D48116
2025-01-01 15:11:06 -06:00