You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build for clang-build Linux 6.10.10 fails for me -- make system is trying to use gcc.
I try build as follows:
git clone https://github.com/freemed/tty0tty.git
cd tty0tty/module
CC=clang make
KERNEL_CC=clang CC=clang make fails with
make -C /lib/modules/6.10.10-xanmod-customconfig-clang/build M=/tmp/tty0tty/module modules
make[1]: Entering directory '/usr/lib/modules/6.10.10-xanmod-customconfig-clang/build'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: clang version 18.1.8
You are using: gcc (GCC) 14.2.1 20240910
CC [M] /tmp/tty0tty/module/tty0tty.o
gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘kcfi’
gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’
make[3]: *** [scripts/Makefile.build:244: /tmp/tty0tty/module/tty0tty.o] Error 1
make[2]: *** [/usr/lib/modules/6.10.10-xanmod-customconfig-clang/build/Makefile:2080: /tmp/tty0tty/module] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.10.10-xanmod-customconfig-clang/build'
make: *** [Makefile:26: default] Error 2
The kernel is built with clang, but this seems to be ignored.
git describe --tags of the cloned tty0tty source shows 1.2-59-gac540b8, i.e. at commit ac540b8.
Edit: With dkms, it works, though.
Regards!
The text was updated successfully, but these errors were encountered:
dreirund
changed the title
CC=clang make uses gcc instead of clang for clang-built kernel. Build fails with warning: the compiler differs from the one used to build the kernel and gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘kcfi’ and gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’.KERNEL_CC=clang CC=clang make uses gcc instead of clang for clang-built kernel. Build fails with warning: the compiler differs from the one used to build the kernel and gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘kcfi’ and gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’.
Sep 15, 2024
stappersg
changed the title
KERNEL_CC=clang CC=clang make uses gcc instead of clang for clang-built kernel. Build fails with warning: the compiler differs from the one used to build the kernel and gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘kcfi’ and gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’.KERNEL_CC=clang CC=clang makeSep 15, 2024
Ahoj,
build for clang-build Linux 6.10.10 fails for me -- make system is trying to use gcc.
I try build as follows:
KERNEL_CC=clang CC=clang make
fails withThe kernel is built with
clang
, but this seems to be ignored.git describe --tags
of the clonedtty0tty
source shows1.2-59-gac540b8
, i.e. at commitac540b8
.Edit: With
dkms
, it works, though.Regards!
The text was updated successfully, but these errors were encountered: