Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Problem z kompilacją kernela: code model kernel does not support PIC mode
#4
0
To ewentualnie flaga KBUILD_CFLAGS += -fno-pie
Zresztą pokaż co tam masz.
U mnie z kernela 3.16 mam tak:
Kod:
cat /usr/src/linux-headers-3.16.0-4-common/Makefile | grep _CFLAGS
KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
KBUILD_CFLAGS_KERNEL :=
KBUILD_CFLAGS_MODULE  := -DMODULE
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
KBUILD_CFLAGS    += $(call cc-option,-fno-delete-null-pointer-checks,)
KBUILD_CFLAGS    += -Os $(call cc-disable-warning,maybe-uninitialized,)
KBUILD_CFLAGS    += -O2
KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
KBUILD_CFLAGS += $(stackp-flag)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
KBUILD_CFLAGS    += -fno-omit-frame-pointer -fno-optimize-sibling-calls
KBUILD_CFLAGS    += -fomit-frame-pointer
KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
KBUILD_CFLAGS    += -g
KBUILD_CFLAGS     += $(call cc-option, -femit-struct-debug-baseonly) \
KBUILD_CFLAGS    += -pg $(CC_USING_FENTRY)
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
KBUILD_CFLAGS    += $(call cc-option,-fno-strict-overflow)
KBUILD_CFLAGS   += $(call cc-option,-fconserve-stack)
KBUILD_CFLAGS   += $(call cc-option,-Werror=implicit-int)
KBUILD_CFLAGS   += $(call cc-option,-Werror=strict-prototypes)
KBUILD_CFLAGS   += $(call cc-option,-Werror=date-time)
    KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
KBUILD_CFLAGS += $(KCFLAGS)
To bym się dopisał na koniec:
KBUILD_CFLAGS += $(KCFLAGS) -fno-pie
Odpowiedz


Wiadomości w tym wątku
RE: Problem z kompilacją kernela: code model kernel does not support PIC mode - przez dedito - 29-04-2020, 14:54

Skocz do:




Użytkownicy przeglądający ten wątek: 8 gości