From 33e31a706d9fb664fc3006698b9a8e5ad888224b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 02:25:16 +0000 Subject: [PATCH 1/2] lkl: Don't specify different compiler/linker flags for elf32-littlearm. Originally it was designed for Android target, however it breaks the compilation for 32bit arm target. --- tools/lkl/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/lkl/Makefile b/tools/lkl/Makefile index fb1254dec61767..565c88a4c6a5b3 100644 --- a/tools/lkl/Makefile +++ b/tools/lkl/Makefile @@ -41,13 +41,10 @@ export CFLAGS += -Iinclude -Wall -g -O2 -Wextra -Wno-unused-parameter \ OUTPUT_FORMAT = $(shell $(LD) -r -print-output-format) -ifneq (,$(filter $(OUTPUT_FORMAT),elf64-x86-64 elf32-i386 elf64-x86-64-freebsd)) +ifneq (,$(filter $(OUTPUT_FORMAT),elf64-x86-64 elf32-i386 elf64-x86-64-freebsd elf32-littlearm)) CFLAGS += -fPIC -pthread LDLIBS += -lrt -lpthread export CONFIG_AUTO_LKL_POSIX_HOST=y -else ifneq (,$(filter $(OUTPUT_FORMAT),elf32-littlearm)) - CFLAGS += -fPIC - export CONFIG_AUTO_LKL_POSIX_HOST=y else ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386)) KOPT = "KALLSYMS_EXTRA_PASS=1" LDLIBS += -lws2_32 From dd31a56383ddadcd55fb76528ff7245f4082f340 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 05:27:45 +0000 Subject: [PATCH 2/2] lkl: Add new build specification for Android builds. --- tools/lkl/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/lkl/Makefile b/tools/lkl/Makefile index 565c88a4c6a5b3..66a69c3b732fc6 100644 --- a/tools/lkl/Makefile +++ b/tools/lkl/Makefile @@ -42,8 +42,11 @@ export CFLAGS += -Iinclude -Wall -g -O2 -Wextra -Wno-unused-parameter \ OUTPUT_FORMAT = $(shell $(LD) -r -print-output-format) ifneq (,$(filter $(OUTPUT_FORMAT),elf64-x86-64 elf32-i386 elf64-x86-64-freebsd elf32-littlearm)) + OUTPUT_DEF = $(shell echo | $(CC) -dM -E -) CFLAGS += -fPIC -pthread - LDLIBS += -lrt -lpthread + ifeq (,$(filter $(OUTPUT_DEF),__ANDROID__)) + LDLIBS += -lrt -lpthread + endif export CONFIG_AUTO_LKL_POSIX_HOST=y else ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386)) KOPT = "KALLSYMS_EXTRA_PASS=1" @@ -115,8 +118,12 @@ cpfromfs$(EXESUF): cptofs$(EXESUF) # because of argp and fuse, none of the binaries will compile on windows # because of libdl, liblkl-hijack will not compile on windows # arm-android neither for the moment -ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386 elf32-littlearm)) +ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386)) all: $(filter-out liblkl-hijack$(SOSUF), $(ALL_LIBRARIES)) +else ifneq (,$(filter $(OUTPUT_DEF),__ANDROID__)) + all: $(filter-out liblkl-hijack$(SOSUF), $(ALL_LIBRARIES)) +else ifneq (,$(filter $(OUTPUT_FORMAT),elf32-littlearm)) + all: $(filter-out liblkl-hijack$(SOSUF), $(ALL_LIBRARIES)) $(ALL_PROGRAMS) else all: $(ALL_PROGRAMS) $(ALL_LIBRARIES) endif