Skip to content

Commit

Permalink
Merge pull request #104 from ngkaho1234/fix-makefile
Browse files Browse the repository at this point in the history
lkl: Don't specify different compiler/linker flags for elf32-littlearm.
  • Loading branch information
Octavian Purdila committed Mar 1, 2016
2 parents 7746789 + dd31a56 commit 403be24
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tools/lkl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ 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))
OUTPUT_DEF = $(shell echo | $(CC) -dM -E -)
CFLAGS += -fPIC -pthread
LDLIBS += -lrt -lpthread
export CONFIG_AUTO_LKL_POSIX_HOST=y
else ifneq (,$(filter $(OUTPUT_FORMAT),elf32-littlearm))
CFLAGS += -fPIC
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"
Expand Down Expand Up @@ -118,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
Expand Down

0 comments on commit 403be24

Please sign in to comment.