ifolder/dev-db/libflaim/files/libflaim-arm.patch

85 lines
2.1 KiB
Diff

Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -462,6 +462,14 @@ ifndef host_native_word_size
endif
ifndef host_native_word_size
+ ifneq (,$(findstring arm,$(HOSTTYPE)))
+ host_processor_family = arm
+ host_native_word_size = 32
+ host_supported_word_sizes = 32
+ endif
+endif
+
+ifndef host_native_word_size
$(error Unable to determine host word size. $(HOSTTYPE))
endif
@@ -1019,7 +1027,9 @@ ifdef unix_target
ifeq ($(compiler),g++)
ccflags += -Wall -fPIC
ifneq ($(target_processor_family),ia64)
- ccflags += -m$(target_word_size)
+ ifneq ($(target_processor_family),arm)
+ ccflags += -m$(target_word_size)
+ endif
endif
endif
@@ -1133,9 +1143,11 @@ ifdef unix_target
ifeq ($(compiler),g++)
ifneq ($(target_processor_family),ia64)
+ ifneq ($(target_processor_family),arm)
shared_link_flags += -m$(target_word_size)
link_flags += -m$(target_word_size)
endif
+ endif
endif
lib_link_libs = -lpthread
Index: src/flaimtk.h
===================================================================
--- src/flaimtk.h.orig
+++ src/flaimtk.h
@@ -54,6 +54,7 @@
#undef FLM_GNUC
#undef FLM_HAS_ASYNC_IO
#undef FLM_HAS_DIRECT_IO
+ #undef FLM_ARM
#if defined( __GNUC__)
#define FLM_GNUC
@@ -149,6 +150,8 @@
#endif
#elif defined( __x86__) || defined( __i386__) || defined( __x86_64__)
#define FLM_X86
+ #elif defined( __arm__) || defined( __thumb__)
+ #define FLM_ARM
#else
#error Platform architecture not supported
#endif
Index: ftk/src/ftk.h
===================================================================
--- ftk/src/ftk.h.orig
+++ ftk/src/ftk.h
@@ -54,6 +54,7 @@
#undef FLM_GNUC
#undef FLM_HAS_ASYNC_IO
#undef FLM_HAS_DIRECT_IO
+ #undef FLM_ARM
#if defined( __GNUC__)
#define FLM_GNUC
@@ -149,6 +150,8 @@
#endif
#elif defined( __x86__) || defined( __i386__) || defined( __x86_64__)
#define FLM_X86
+ #elif defined( __arm__) || defined( __thumb__)
+ #define FLM_ARM
#else
#error Platform architecture not supported
#endif