diff options
author | crass <[email protected]> | 2022-06-15 16:22:52 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-15 14:22:52 -0700 |
commit | bc00d2c711c5bd930fe63deae3946ed3fb2463b4 (patch) | |
tree | b92cab7f601d7ab16980831553d6900aae020441 /module/zfs/vdev_missing.c | |
parent | 988431966639d791ac269011d136e85f3602df75 (diff) |
Add support for ARCH=um for x86 sub-architectures
When building modules (as well as the kernel) with ARCH=um, the options
-Dsetjmp=kernel_setjmp and -Dlongjmp=kernel_longjmp are passed to the C
preprocessor for C files. This causes the setjmp and longjmp used in
module/lua/ldo.c to be kernel_setjmp and kernel_longjmp respectively in
the object file. However, the setjmp and longjmp that is intended to be
called is defined in an architecture dependent assembly file under the
directory module/lua/setjmp. Since it is an assembly and not a C file,
the preprocessor define is not given and the names do not change. This
becomes an issue when modpost is trying to create the Module.symvers
and sees no defined symbol for kernel_setjmp and kernel_longjmp. To fix
this, if the macro CONFIG_UML is defined, then setjmp and longjmp
macros are undefined.
When building with ARCH=um for x86 sub-architectures, CONFIG_X86 is not
defined. Instead, CONFIG_UML_X86 is defined. Despite this, the UML x86
sub-architecture can use the same object files as the x86 architectures
because the x86 sub-architecture UML kernel is running with the same
instruction set as CONFIG_X86. So the modules/Kbuild build file is
updated to add the same object files that CONFIG_X86 would add when
CONFIG_UML_X86 is defined.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Glenn Washburn <[email protected]>
Closes #13547
Diffstat (limited to 'module/zfs/vdev_missing.c')
0 files changed, 0 insertions, 0 deletions