From ecaccfd8d0e550b3ec79dd3a2bc9363249e304db Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 8 Apr 2018 12:58:49 +0100 Subject: [PATCH] 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 --- sample_package/Makefile | 2 +- sample_package/external.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample_package/Makefile b/sample_package/Makefile index b1bed7d..4cb5e64 100644 --- a/sample_package/Makefile +++ b/sample_package/Makefile @@ -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 diff --git a/sample_package/external.mk b/sample_package/external.mk index 34725a8..95019d5 100644 --- a/sample_package/external.mk +++ b/sample_package/external.mk @@ -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