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:
Ciro Santilli
2018-04-08 12:58:49 +01:00
parent 105c506ac6
commit ecaccfd8d0
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
.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
LIBS :=
OUT_EXT ?= .out

View File

@@ -10,7 +10,7 @@ SAMPLE_PACKAGE_SITE_METHOD = local
define SAMPLE_PACKAGE_BUILD_CMDS
# 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
define SAMPLE_PACKAGE_INSTALL_TARGET_CMDS