@@ -41,12 +41,12 @@ export CFLAGS += -Iinclude -Wall -g -O2 -Wextra -Wno-unused-parameter \
41
41
42
42
OUTPUT_FORMAT = $(shell $(LD ) -r -print-output-format)
43
43
44
- ifneq (,$(filter $(OUTPUT_FORMAT ) ,elf64-x86-64 elf32-i386 elf64-x86-64-freebsd) )
44
+ ifneq (,$(filter $(OUTPUT_FORMAT ) ,elf64-x86-64 elf32-i386 elf64-x86-64-freebsd elf32-littlearm) )
45
+ OUTPUT_DEF = $(shell echo | $(CC ) -dM -E -)
45
46
CFLAGS += -fPIC -pthread
46
- LDLIBS += -lrt -lpthread
47
- export CONFIG_AUTO_LKL_POSIX_HOST =y
48
- else ifneq (,$(filter $(OUTPUT_FORMAT),elf32-littlearm))
49
- CFLAGS += -fPIC
47
+ ifeq (,$(filter $(OUTPUT_DEF),__ANDROID__))
48
+ LDLIBS += -lrt -lpthread
49
+ endif
50
50
export CONFIG_AUTO_LKL_POSIX_HOST =y
51
51
else ifneq (,$(filter $(OUTPUT_FORMAT),pe-i386))
52
52
KOPT = "KALLSYMS_EXTRA_PASS=1"
@@ -118,8 +118,12 @@ cpfromfs$(EXESUF): cptofs$(EXESUF)
118
118
# because of argp and fuse, none of the binaries will compile on windows
119
119
# because of libdl, liblkl-hijack will not compile on windows
120
120
# arm-android neither for the moment
121
- ifneq (,$(filter $(OUTPUT_FORMAT ) ,pe-i386 elf32-littlearm ) )
121
+ ifneq (,$(filter $(OUTPUT_FORMAT ) ,pe-i386) )
122
122
all : $(filter-out liblkl-hijack$(SOSUF ) , $(ALL_LIBRARIES ) )
123
+ else ifneq (,$(filter $(OUTPUT_DEF),__ANDROID__))
124
+ all : $(filter-out liblkl-hijack$(SOSUF ) , $(ALL_LIBRARIES ) )
125
+ else ifneq (,$(filter $(OUTPUT_FORMAT),elf32-littlearm))
126
+ all : $(filter-out liblkl-hijack$(SOSUF ) , $(ALL_LIBRARIES ) ) $(ALL_PROGRAMS )
123
127
else
124
128
all : $(ALL_PROGRAMS ) $(ALL_LIBRARIES )
125
129
endif
0 commit comments