[Bug 2043384] [NEW] Kernel module cross-compile: unrecognized command-line option ‘-mrecord-mcount’
Michał Fita
2043384 at bugs.launchpad.net
Mon Nov 13 13:31:07 UTC 2023
Public bug reported:
I'm trying to build the external kernel module via cross-compilation for
ARM64 on Ubuntu 23.04 and I'm getting following output w/error:
make -C /lib/modules/6.2.0-36-generic/build M=/home/user/Projekty/Opteran/platform_v4l2_driver modules
make[1]: Wejście do katalogu '/usr/src/linux-headers-6.2.0-36-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
You are using: aarch64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
CC [M] /home/user/Projekty/Opteran/platform_v4l2_driver/ova-one.o
aarch64-linux-gnu-gcc-12: error: unrecognized command-line option ‘-mrecord-mcount’
make[2]: *** [scripts/Makefile.build:260: /home/user/Projekty/Opteran/platform_v4l2_driver/ova-one.o] Błąd 1
make[1]: *** [Makefile:2026: /home/user/Projekty/Opteran/platform_v4l2_driver] Błąd 2
make[1]: Opuszczenie katalogu '/usr/src/linux-headers-6.2.0-36-generic'
make: *** [Makefile:9: modules] Błąd 2
The key one being `unrecognized command-line option ‘-mrecord-mcount’`,
what - according to Google - was a problem with some old <5 gcc. Why am
I facing this today?
My invocation for the build process:
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make
The `Makefile` I'm using:
obj-m := my-module.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
all default: modules
install: modules_install
modules modules_install help clean:
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) $@
** Affects: gcc-12-cross (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-12-cross in Ubuntu.
https://bugs.launchpad.net/bugs/2043384
Title:
Kernel module cross-compile: unrecognized command-line option
‘-mrecord-mcount’
Status in gcc-12-cross package in Ubuntu:
New
Bug description:
I'm trying to build the external kernel module via cross-compilation
for ARM64 on Ubuntu 23.04 and I'm getting following output w/error:
make -C /lib/modules/6.2.0-36-generic/build M=/home/user/Projekty/Opteran/platform_v4l2_driver modules
make[1]: Wejście do katalogu '/usr/src/linux-headers-6.2.0-36-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
You are using: aarch64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
CC [M] /home/user/Projekty/Opteran/platform_v4l2_driver/ova-one.o
aarch64-linux-gnu-gcc-12: error: unrecognized command-line option ‘-mrecord-mcount’
make[2]: *** [scripts/Makefile.build:260: /home/user/Projekty/Opteran/platform_v4l2_driver/ova-one.o] Błąd 1
make[1]: *** [Makefile:2026: /home/user/Projekty/Opteran/platform_v4l2_driver] Błąd 2
make[1]: Opuszczenie katalogu '/usr/src/linux-headers-6.2.0-36-generic'
make: *** [Makefile:9: modules] Błąd 2
The key one being `unrecognized command-line option ‘-mrecord-
mcount’`, what - according to Google - was a problem with some old <5
gcc. Why am I facing this today?
My invocation for the build process:
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make
The `Makefile` I'm using:
obj-m := my-module.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
all default: modules
install: modules_install
modules modules_install help clean:
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) $@
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-12-cross/+bug/2043384/+subscriptions
More information about the foundations-bugs
mailing list