aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorulion <ulion2002@gmail.com>2013-03-15 09:53:52 +0800
committerulion <ulion2002@gmail.com>2013-03-15 09:59:21 +0800
commite1c1c49dbecbc36af10f04d58cb2ec4cceaab38d (patch)
tree8dc292907e1a97672bc76de77e3b54b8790e627d /tools
parent8cf7f2aa6ddc307a016304e27ca2da001f47f580 (diff)
Fix libffi link warnings 'ARM function not 4-byte aligned' when build for ios.
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/target/libffi/01_ios_arm_align_fix.patch21
-rw-r--r--tools/depends/target/libffi/Makefile1
2 files changed, 22 insertions, 0 deletions
diff --git a/tools/depends/target/libffi/01_ios_arm_align_fix.patch b/tools/depends/target/libffi/01_ios_arm_align_fix.patch
new file mode 100644
index 0000000000..6a1aeb38d8
--- /dev/null
+++ b/tools/depends/target/libffi/01_ios_arm_align_fix.patch
@@ -0,0 +1,21 @@
+diff -ru iphoneos5.1_armv7-target/src/arm/sysv.S iphoneos5.1_armv7-target.patched/src/arm/sysv.S
+--- src/arm/sysv.S 2012-04-12 10:46:06.000000000 +0800
++++ src/arm/sysv.S 2013-03-15 09:43:06.000000000 +0800
+@@ -113,7 +113,7 @@
+ #if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
+ .macro ARM_FUNC_START name
+ .text
+- .align 0
++ .align 2
+ .thumb
+ .thumb_func
+ #ifdef __APPLE__
+@@ -136,7 +136,7 @@
+ #else
+ .macro ARM_FUNC_START name
+ .text
+- .align 0
++ .align 2
+ .arm
+ #ifdef __APPLE__
+ ENTRY($0)
diff --git a/tools/depends/target/libffi/Makefile b/tools/depends/target/libffi/Makefile
index e30f72ce0c..958c586587 100644
--- a/tools/depends/target/libffi/Makefile
+++ b/tools/depends/target/libffi/Makefile
@@ -20,6 +20,7 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); patch -p0 < ../01_ios_arm_align_fix.patch
cd $(PLATFORM); $(CONFIGURE)
$(LIBDYLIB): $(PLATFORM)