History log of /freebsd/sys/conf/kmod.mk (Results 1 – 25 of 777)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6e3875eb 10-Nov-2024 Ka Ho Ng <khng@FreeBSD.org>

sys: move SAN and COVERAGE options handling to kern.mk

This allows the flags to be picked up more easily when building external
modules.

Sponsored by: Juniper Networks, Inc.
Reviewed by: markj (ear

sys: move SAN and COVERAGE options handling to kern.mk

This allows the flags to be picked up more easily when building external
modules.

Sponsored by: Juniper Networks, Inc.
Reviewed by: markj (earlier)
Differential Revision: https://reviews.freebsd.org/D45563

show more ...


# 41283b45 26-Sep-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: always include linux/kconfig.h

Always include linux/kconfig.h which seems to match Linux behaviour
and avoid errors compiling code expected from that file but never
included.

Sponsored by

LinuxKPI: always include linux/kconfig.h

Always include linux/kconfig.h which seems to match Linux behaviour
and avoid errors compiling code expected from that file but never
included.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D46801

show more ...


Revision tags: release/13.4.0
# 12a6257a 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

sys/conf: Introduce NOSAN_CFLAGS and NOSAN_C

To simplify disabling the kernel sanitizers in some files add
NOSAN_CFLAGS and NOSAN_C variables. These are CFLAGS and NORMAL_C with
the sanitizer flags

sys/conf: Introduce NOSAN_CFLAGS and NOSAN_C

To simplify disabling the kernel sanitizers in some files add
NOSAN_CFLAGS and NOSAN_C variables. These are CFLAGS and NORMAL_C with
the sanitizer flags removed.

While here add MSAN_CFLAGS to simplify keeping KMSAN in kern_kcov.c

Reviewed by: khng, brooks, imp, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45498

show more ...


Revision tags: release/14.1.0
# dd4d206c 10-May-2024 Simon J. Gerraty <sjg@FreeBSD.org>

kmod.mk use ${XARGS}

Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D45146


Revision tags: release/13.3.0, release/14.0.0
# 8e1a7e29 10-Oct-2023 Mark Johnston <markj@FreeBSD.org>

sanitizers: Avoid building genassym.c and genoffset.c with sanitizers

Some, particularly KASAN, may insert redzones around global symbols,
resulting in incorrect offset definitions because genassym.

sanitizers: Avoid building genassym.c and genoffset.c with sanitizers

Some, particularly KASAN, may insert redzones around global symbols,
resulting in incorrect offset definitions because genassym.sh (ab)uses
symbol sizes to assign semantic meaning.

(Ideally I would be able to define this pattern in one place, but I
haven't found a way to define a GENSYM_CFLAGS that actually works for
all of the consumers (kern.post.mk, kmod.mk, sys/conf/files*).)

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

show more ...


# c6ae97c4 27-Dec-2023 Alex Xu (Hello71) <alex_y_xu@yahoo.ca>

sys: ${CFLAGS:N-flto} -> ${CFLAGS:N-flto*}

For the same reason as the original https://reviews.freebsd.org/D9659:
-flto=<N>, -flto=full, and -flto=thin also produce the GIMPLE/bitcode
which is not s

sys: ${CFLAGS:N-flto} -> ${CFLAGS:N-flto*}

For the same reason as the original https://reviews.freebsd.org/D9659:
-flto=<N>, -flto=full, and -flto=thin also produce the GIMPLE/bitcode
which is not supported by genassym, so filter those out as well.

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/898

show more ...


# 3812c653 14-Dec-2023 Jessica Clarke <jrtc27@FreeBSD.org>

Revert "Don't try and run kldxref for arm kernels"

Now that kldxref supports arm this should not be needed.

This reverts commit 0840bdbf2a07b68e29267bc49057ca6df2351360.


# 0840bdbf 14-Dec-2023 Jessica Clarke <jrtc27@FreeBSD.org>

Don't try and run kldxref for arm kernels

Surprisingly, kldxref does not currently support arm, and unhelpfully
this means it silently does nothing rather than give an error, so the
linker.hints ent

Don't try and run kldxref for arm kernels

Surprisingly, kldxref does not currently support arm, and unhelpfully
this means it silently does nothing rather than give an error, so the
linker.hints entry added to the METALOG for -DNO_ROOT builds (and
pkgbase ones) refers to a file that doesn't exist. Ideally it would be
supported (and ideally the METALOG handling would be less fragile, but
without integrating it into kldxref the only real option would be to
just run find(1) to get the list of linker.hints files, which feels a
little backwards), but for now just paper over this by skipping the
build step on arm.

Reported by: bapt
Fixes: ff7c12c1f17e ("Make kldxref a bootstrap tool and use unconditionally")

show more ...


# ff7c12c1 13-Dec-2023 Jessica Clarke <jrtc27@FreeBSD.org>

Make kldxref a bootstrap tool and use unconditionally

Now that kldxref is a generic cross tool and can be built on non-FreeBSD
we can bootstrap it during the build and thus remove the condition for

Make kldxref a bootstrap tool and use unconditionally

Now that kldxref is a generic cross tool and can be built on non-FreeBSD
we can bootstrap it during the build and thus remove the condition for
whether it exists. We also need to make sure to add it to the METALOG
for -DNO_ROOT builds.

Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D43051

show more ...


# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 8a6ab0f7 28-Jul-2023 Jessica Clarke <jrtc27@FreeBSD.org>

Pre-quote macros passed to .incbin to avoid unwanted substitution

Currently for the MFS, firmware and VDSO template assembly files we pass
the path to include with .incbin unquoted and use __XSTRING

Pre-quote macros passed to .incbin to avoid unwanted substitution

Currently for the MFS, firmware and VDSO template assembly files we pass
the path to include with .incbin unquoted and use __XSTRING within the
assembly file to stringify it. However, __XSTRING doesn't just perform a
single level of expansion, it performs the normal full expansion of the
macro, and so if the path itself happens to tokenise to something that
includes a defined macro in it that will itself be substituted. For
example, with #define MACRO 1, a path like /path/containing/MACRO/in/it
will expand to /path/containing/1/in/it and then, when stringified, end
up as "/path/containing/1/in/it", not the intended string. Normally,
macros have names that start or end witih underscores and are unlikely
to appear in a tokenised path (even if technically they could), but now
that we've switched to GNU C as of commit ec41a96daaa6 ("sys: Switch the
kernel's C standard from C99 to GNU99.") there are a few new macros
defined which don't start or end with underscores: unix, which is always
defined to 1, and i386, which is defined to 1 on i386. The former
probably doesn't appear in user paths in practice, but the latter has
been seen to and is likely quite common in the wild.

Fix this by defining the macro pre-quoted instead of using __XSTRING.
Note that technically we don't need to do this for vdso_wrap.S today as
all the paths passed to it are safe file names with no user-controlled
prefix but we should do it anyway for consistency and robustness against
future changes.

This allows make tinderbox to pass when built with source and object
directories inside ~/path-with-unix, which would otherwise expand to
~/path-with-1 and break.

PR: 272744
Fixes: ec41a96daaa6 ("sys: Switch the kernel's C standard from C99 to GNU99.")

show more ...


# 80e4ac29 23-Jul-2023 Dimitry Andric <dim@FreeBSD.org>

Work around VNET and DPCPU related panics on aarch64

lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr
instructions, which breaks VNET and DPCPU when used in modules.

Until VNET and DPCPU

Work around VNET and DPCPU related panics on aarch64

lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr
instructions, which breaks VNET and DPCPU when used in modules.

Until VNET and DPCPU can be fixed to deal with these relaxed
instructions, disable linker relaxation for now.

PR: 264094
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41156

show more ...


# c84617e8 19-Jul-2023 Dmitry Chagin <dchagin@FreeBSD.org>

i386: Switch to PIC kernel modules

It seems since the last llvm project update, the lld linker has started
creating a PLT dependent kernel module object files.

Reviewed by: kib, jhb, emaste
Differ

i386: Switch to PIC kernel modules

It seems since the last llvm project update, the lld linker has started
creating a PLT dependent kernel module object files.

Reviewed by: kib, jhb, emaste
Differential Revision: https://reviews.freebsd.org/D41088

show more ...


# d1e44bc9 11-Jul-2023 Jessica Clarke <jrtc27@FreeBSD.org>

kmod.mk: Use portable printf '%s' over non-portable echo -n

Whilst /bin/echo on macOS and Linux implement -n, as do the builtin
echos in bash and zsh, the builtin echo in dash does not, causing the

kmod.mk: Use portable printf '%s' over non-portable echo -n

Whilst /bin/echo on macOS and Linux implement -n, as do the builtin
echos in bash and zsh, the builtin echo in dash does not, causing the
first line of the output to be -n foo rather than just foo, and there to
be an extra newline in the output and thus blank line, both of which
result in "Symbol ... is not present in *.kld" warnings appearing in the
build output (once for -n foo and once for the empty string for each
module where EXPORT_SYMS is a list of symbols).

MFC after: 1 week

show more ...


Revision tags: release/13.2.0
# dddb1aec 22-Mar-2023 John Baldwin <jhb@FreeBSD.org>

sys: Retire OPENZFS_CWARNFLAGS now that it is empty.

Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D39217


# 4ffeb3b8 22-Mar-2023 John Baldwin <jhb@FreeBSD.org>

sys: Stop enabling -Wnested-externs.

clang doesn't implement this warning, so violations are only caught by
GCC. It is also no longer a common practice to use this as it was in
the original BSD cod

sys: Stop enabling -Wnested-externs.

clang doesn't implement this warning, so violations are only caught by
GCC. It is also no longer a common practice to use this as it was in
the original BSD code, so the need for the warning is not as important
as when it was used to do cleanups 20 years ago. A recent commit
(c3179891f897d840f578a5139839fcacb587c96d) triggers this warning on
GCC, but that commit uses nested externs purposefully.

Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D39214

show more ...


# b926b6db 11-Jan-2023 Mitchell Horne <mhorne@FreeBSD.org>

riscv: always include frame pointer

Specifically it is missing in kernel modules, meaning a proper backtrace
can't be constructed.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Found

riscv: always include frame pointer

Specifically it is missing in kernel modules, meaning a proper backtrace
can't be constructed.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37657

show more ...


# ab8b2d10 14-Dec-2022 Mark Johnston <markj@FreeBSD.org>

sys/conf: Remove an unneeded flag variable

After commit fac6dee9eb58 ("Remove tests for obsolete compilers in the
build system"), we always set -fdebug-prefix-map, so there's no point in
defining an

sys/conf: Remove an unneeded flag variable

After commit fac6dee9eb58 ("Remove tests for obsolete compilers in the
build system"), we always set -fdebug-prefix-map, so there's no point in
defining and testing _MAP_DEBUG_PREFIX. No functional change intended.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

show more ...


Revision tags: release/12.4.0
# f8bad561 23-Sep-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add the "dummy" includes directory to builds

While we could add the dummy includes directory manually to only the
drivers needing it, it seems a lot easier to simply add it to all
without

LinuxKPI: add the "dummy" includes directory to builds

While we could add the dummy includes directory manually to only the
drivers needing it, it seems a lot easier to simply add it to all
without any expected harm.

This is needed for more drivers (and to remove some #ifdef in current
ones) with empty header files being present not yielding errors.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: hselasky, imp
Differential Revision: https://reviews.freebsd.org/D36684

show more ...


# 514fb387 23-Sep-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: define LINUXKPI_INCLUDES for module builds as well

While for in-kernel we already have LINUXKPI_INCLUDES in kern.pre.mk
for kmod builds we've not had a common define to use leading to vari

LinuxKPI: define LINUXKPI_INCLUDES for module builds as well

While for in-kernel we already have LINUXKPI_INCLUDES in kern.pre.mk
for kmod builds we've not had a common define to use leading to various
spellings of include paths.

In order for the include list to be expanded more easily in the future,
e.g., adding the "dummy" includes (for all) and to harmonize code,
duplicate LINUXKPI_INCLUDES to kmod.mk and use it for all module Makefiles.

MFC after: 1 week
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D36683

show more ...


# 628a4156 14-Jun-2022 John Baldwin <jhb@FreeBSD.org>

firmware: Map '@' in filenames to '_' in symbols.

'@' is not a valid character in symbol names and can sometimes appear
in path names.

Reviewed by: imp, markj
Obtained from: CheriBSD
Sponsored by:

firmware: Map '@' in filenames to '_' in symbols.

'@' is not a valid character in symbol names and can sometimes appear
in path names.

Reviewed by: imp, markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D35480

show more ...


# d07600c5 13-Jun-2022 Brooks Davis <brooks@FreeBSD.org>

amd64: symlink i386 includes into build dir

By creating an i386 symlink, this allows code compiled with -m32 to
build (32-bit vdso and linux bits) when -m32 support requires files
in the i386 hierar

amd64: symlink i386 includes into build dir

By creating an i386 symlink, this allows code compiled with -m32 to
build (32-bit vdso and linux bits) when -m32 support requires files
in the i386 hierarchy.

Reviewed by: jhb, imp

show more ...


# e3709cfe 08-Jun-2022 Ed Maste <emaste@FreeBSD.org>

Add SPLIT_KERNEL_DEBUG knob

Prior to 9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS split kernel debug data
into standalone debug files at build time, but did not install those
files. As of 9b6edf364eb0 it st

Add SPLIT_KERNEL_DEBUG knob

Prior to 9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS split kernel debug data
into standalone debug files at build time, but did not install those
files. As of 9b6edf364eb0 it stopped splitting the debug data, leaving
it in the kernel and modules (the default kernel configs include
DEBUG=-g).

Revert 9b6edf364eb0 and introduce a new build-time SPLIT_KERNEL_DEBUG
knob, as some people rely on the pre-9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS
behaviour and that was imp's original intent.

PR: 264433
Reviewed by: eugen, imp
MFC after: 3 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35437

show more ...


# 0817c8dc 14-May-2022 Dimitry Andric <dim@FreeBSD.org>

Avoid adding -d to kernel module link command lines for lld >= 14

Since 0b3178a45cd0 we have added '-d' to the link command line for
kernel modules, so if any unexpected common symbols turn up (even

Avoid adding -d to kernel module link command lines for lld >= 14

Since 0b3178a45cd0 we have added '-d' to the link command line for
kernel modules, so if any unexpected common symbols turn up (even though
we use -fno-common in CFLAGS), storage will be allocated in in the
module itself.

However, with lld this option did not have any effect since ~2017, and
as of lld 14 it warns: "-d, -dc, -dp, and --[no-]define-common will be
removed. See https://github.com/llvm/llvm-project/issues/53660"

Add a linker type and version check, to avoid adding the option for lld
14 and later.

Reported by: bz
MFC after: 2 weeks

show more ...


12345678910>>...32