mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
sample-package: hack to use host clang
-static is required, otherwise the dynamic linker is wrong. There is no clang support in Buildroot it seems: https://elinux.org/Buildroot:GSoC2017Ideas#Support_for_LLVM Initially done for: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/22
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
CFLAGS_EXTRA ?= -ggdb3 -fopenmp -O0 -std=c99 -Wall -Werror -Wextra
|
CFLAGS_EXTRA ?= -ggdb3 -O0 -std=c99 -Wall -Werror -Wextra
|
||||||
IN_EXT ?= .c
|
IN_EXT ?= .c
|
||||||
LIBS :=
|
LIBS :=
|
||||||
OUT_EXT ?= .out
|
OUT_EXT ?= .out
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ SAMPLE_PACKAGE_SITE_METHOD = local
|
|||||||
|
|
||||||
define SAMPLE_PACKAGE_BUILD_CMDS
|
define SAMPLE_PACKAGE_BUILD_CMDS
|
||||||
# D contains the source code of this package.
|
# D contains the source code of this package.
|
||||||
$(MAKE) -C '$(@D)' CC="$(TARGET_CC)" LD="$(TARGET_LD)"
|
$(MAKE) -C '$(@D)' CC=clang CFLAGS=-static
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define SAMPLE_PACKAGE_INSTALL_TARGET_CMDS
|
define SAMPLE_PACKAGE_INSTALL_TARGET_CMDS
|
||||||
|
|||||||
Reference in New Issue
Block a user