Skip to content
This repository
Browse code

Fix libffi link warnings 'ARM function not 4-byte aligned' when build…

… for ios.
  • Loading branch information...
commit e1c1c49dbecbc36af10f04d58cb2ec4cceaab38d 1 parent 8cf7f2a
ulion authored
21  tools/depends/target/libffi/01_ios_arm_align_fix.patch
... ...
@@ -0,0 +1,21 @@
  1
+diff -ru iphoneos5.1_armv7-target/src/arm/sysv.S iphoneos5.1_armv7-target.patched/src/arm/sysv.S
  2
+--- src/arm/sysv.S	2012-04-12 10:46:06.000000000 +0800
  3
++++ src/arm/sysv.S	2013-03-15 09:43:06.000000000 +0800
  4
+@@ -113,7 +113,7 @@
  5
+ #if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
  6
+ .macro	ARM_FUNC_START name
  7
+ 	.text
  8
+-	.align 0
  9
++	.align 2
  10
+ 	.thumb
  11
+ 	.thumb_func
  12
+ #ifdef __APPLE__
  13
+@@ -136,7 +136,7 @@
  14
+ #else
  15
+ .macro	ARM_FUNC_START name
  16
+ 	.text
  17
+-	.align 0
  18
++	.align 2
  19
+ 	.arm
  20
+ #ifdef __APPLE__
  21
+ 	ENTRY($0)
1  tools/depends/target/libffi/Makefile
@@ -20,6 +20,7 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
20 20
 $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
21 21
 	rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
22 22
 	cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
  23
+	cd $(PLATFORM); patch -p0 < ../01_ios_arm_align_fix.patch
23 24
 	cd $(PLATFORM); $(CONFIGURE)
24 25
 
25 26
 $(LIBDYLIB): $(PLATFORM)

0 notes on commit e1c1c49

Please sign in to comment.
Something went wrong with that request. Please try again.