mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
-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
22 lines
660 B
Makefile
22 lines
660 B
Makefile
################################################################################
|
|
#
|
|
# sample_package
|
|
#
|
|
################################################################################
|
|
|
|
SAMPLE_PACKAGE_VERSION = 1.0
|
|
SAMPLE_PACKAGE_SITE = $(BR2_EXTERNAL_SAMPLE_PACKAGE_PATH)
|
|
SAMPLE_PACKAGE_SITE_METHOD = local
|
|
|
|
define SAMPLE_PACKAGE_BUILD_CMDS
|
|
# D contains the source code of this package.
|
|
$(MAKE) -C '$(@D)' CC=clang CFLAGS=-static
|
|
endef
|
|
|
|
define SAMPLE_PACKAGE_INSTALL_TARGET_CMDS
|
|
# Anything put inside TARGET_DIR will end up on the guest relative to the root directory.
|
|
$(INSTALL) -D -m 0755 $(@D)/*.out '$(TARGET_DIR)'
|
|
endef
|
|
|
|
$(eval $(generic-package))
|