Опять я пытаюсь скомпилировать модуль ядра под arm.
Установил aarch64-linux-gnu-gcc
cat Makefile
CC=aarch64-linux-gnu-gcc
ARCH=arm64
PWD = $(shell pwd)
KVERSION = $(uname -r)
K_DIR = /lib/modules/5.13.0-rc5/build
MODULE_NAME = charDevice
obj-m = char.o
all:
make -C $(K_DIR) M=$(PWD) modules
clean:
make -C $(K_DIR) M=$(PWD) clean
В итоге
aarch64-linux-gnu-gcc: error: unrecognized argument in option ‘-mcmodel=kernel’
aarch64-linux-gnu-gcc: note: valid arguments to ‘-mcmodel=’ are: large small tiny
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-sse’; did you mean ‘-fno-dse’?
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-mmx’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-sse2’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-3dnow’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-avx’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-80387’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-fp-ret-in-387’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mpreferred-stack-boundary=3’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mskip-rax-setup’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-red-zone’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mindirect-branch=thunk-extern’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mindirect-branch-register’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mrecord-mcount’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mfentry’; did you mean ‘--entry’?
С обычным gcc проблем нет.
Я так понимаю он не поддерживает эти флаги, но я их и не передаю..
Как можно решить?