Merge lp:~rsalveti/android-audiosystem/enabling-build-i386 into lp:android-audiosystem

Proposed by Ricardo Salveti
Status: Merged
Approved by: Ricardo Mendoza
Approved revision: 49
Merged at revision: 49
Proposed branch: lp:~rsalveti/android-audiosystem/enabling-build-i386
Merge into: lp:android-audiosystem
Diff against target: 231 lines (+114/-17)
7 files modified
build-component.sh (+4/-0)
debian/control (+3/-3)
lib/libcutils/Makefile (+6/-0)
lib/libcutils/atomics_x86.S (+97/-0)
lib/wctlplugin/Makefile (+1/-6)
lib/wpcmplugin/Makefile (+1/-6)
project_make (+2/-2)
To merge this branch: bzr merge lp:~rsalveti/android-audiosystem/enabling-build-i386
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+167671@code.launchpad.net

Commit message

Enabling build for i386

Description of the change

Enabling build for i386

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-component.sh'
2--- build-component.sh 2012-06-06 20:28:40 +0000
3+++ build-component.sh 2013-06-05 23:37:27 +0000
4@@ -44,9 +44,13 @@
5 done
6
7 mkdir -p lib/libcutils/.obj/arch-arm
8+mkdir -p lib/libcutils/.obj/arch-x86
9+
10 touch lib/libcutils/.obj/arch-arm/.gitignore
11+touch lib/libcutils/.obj/arch-x86/.gitignore
12
13 mkdir -p lib/libcutils/.dep/arch-arm
14+mkdir -p lib/libcutils/.dep/arch-x86
15
16 rm -fr makedirs.$$ dirslist.$$
17
18
19=== modified file 'debian/control'
20--- debian/control 2013-04-12 15:07:54 +0000
21+++ debian/control 2013-06-05 23:37:27 +0000
22@@ -13,7 +13,7 @@
23 Vcs-Bzr: https://code.launchpad.net/~phablet-team/android-audiosystem/trunk
24
25 Package: libwaudio1
26-Architecture: armel armhf
27+Architecture: armhf i386
28 Multi-Arch: same
29 Depends: ${misc:Depends},
30 ${shlibs:Depends},
31@@ -23,7 +23,7 @@
32
33 Package: libwaudio1-dev
34 Section: libdevel
35-Architecture: armel armhf
36+Architecture: armhf i386
37 Multi-Arch: same
38 Depends: libwaudio1 (= ${binary:Version}),
39 ${misc:Depends},
40@@ -33,7 +33,7 @@
41 which uses libwaudio.
42
43 Package: libandroid-audiosystem-asound2
44-Architecture: armel armhf
45+Architecture: armhf i386
46 Multi-Arch: same
47 Depends: pulseaudio,
48 ${misc:Depends},
49
50=== modified file 'lib/libcutils/Makefile'
51--- lib/libcutils/Makefile 2013-01-21 23:42:55 +0000
52+++ lib/libcutils/Makefile 2013-06-05 23:37:27 +0000
53@@ -64,7 +64,13 @@
54 memory.c
55
56 CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32
57+
58+ifeq ($(ARCH), armhf)
59 SFILES += arch-arm/memset32.S atomics_arm.S atomic-android-arm.S
60+endif
61+ifeq ($(ARCH), i386)
62+SFILES += arch-x86/android_memset16.S atomics_x86.S arch-x86/android_memset32.S
63+endif
64
65 #CCFILES =
66 #CPPFILES =
67
68=== modified file 'lib/libcutils/atomics_x86.S'
69--- lib/libcutils/atomics_x86.S 2012-05-03 14:32:30 +0000
70+++ lib/libcutils/atomics_x86.S 2013-06-05 23:37:27 +0000
71@@ -41,6 +41,103 @@
72 popl %ebx
73 ret
74
75+/* int __atomic_cmpxchg(int old, int new, volatile int* addr) */
76+
77+.text
78+.globl __atomic_cmpxchg
79+.type __atomic_cmpxchg, @function
80+.align 4
81+__atomic_cmpxchg:
82+ mov 4(%esp), %eax /* old */
83+ mov 8(%esp), %ecx /* new */
84+ mov 12(%esp), %edx /* addr */
85+ lock cmpxchg %ecx, (%edx)
86+ jnz 1f
87+ xor %eax, %eax
88+ jmp 2f
89+1:
90+ movl $1, %eax
91+2:
92+ ret /* 0 == success, 1 == failure */
93+
94+
95+/* int __atomic_swap(int new, volatile int* addr) */
96+
97+.text
98+.globl __atomic_swap
99+.type __atomic_swap, @function
100+.align 4
101+__atomic_swap:
102+ mov 4(%esp), %ecx /* new */
103+ mov 8(%esp), %edx /* addr */
104+ lock xchg %ecx, (%edx)
105+ mov %ecx, %eax
106+ ret
107+
108+
109+/*
110+ * int __atomic_dec(volatile int* addr)
111+ *
112+ * My x86 asm is really rusty.. this is probably suboptimal
113+ */
114+
115+.text
116+.globl __atomic_dec
117+.type __atomic_dec, @function
118+.align 4
119+__atomic_dec:
120+ pushl %ebx
121+ pushl %esi
122+ movl 12(%esp), %ebx /* addr */
123+
124+1:
125+ movl (%ebx), %esi /* old = *addr */
126+ movl %esi, %edx
127+ subl $1, %edx /* new = old - 1 */
128+
129+ pushl %ebx
130+ pushl %edx
131+ pushl %esi
132+ call __atomic_cmpxchg
133+ addl $12, %esp
134+ test %eax, %eax
135+ jnz 1b
136+
137+ movl %esi, %eax /* return old */
138+ popl %esi
139+ popl %ebx
140+ ret
141+
142+
143+.text
144+/* int __atomic_inc(volatile int* addr) */
145+.globl __atomic_inc
146+.type __atomic_inc, @function
147+.align 4
148+__atomic_inc:
149+ pushl %ebx
150+ pushl %esi
151+ movl 12(%esp), %ebx /* addr */
152+
153+1:
154+ movl (%ebx), %esi /* old = *addr */
155+ movl %esi, %edx
156+ addl $1, %edx /* new = old + 1 */
157+
158+ pushl %ebx
159+ pushl %edx
160+ pushl %esi
161+ call __atomic_cmpxchg
162+ addl $12, %esp
163+ test %eax, %eax
164+ jnz 1b
165+
166+ movl %esi, %eax /* return old */
167+ popl %esi
168+ popl %ebx
169+ ret
170+
171+
172 /* int __futex_syscall3(volatile void *ftx, int op, int count) */
173 .text
174 .globl __futex_syscall3
175
176=== modified file 'lib/wctlplugin/Makefile'
177--- lib/wctlplugin/Makefile 2012-10-18 11:23:57 +0000
178+++ lib/wctlplugin/Makefile 2013-06-05 23:37:27 +0000
179@@ -53,12 +53,7 @@
180
181 MAKESUBDIR = YES
182
183-ifeq ($(ARCH), armel)
184-LIBSUBDIR = /usr/lib/arm-linux-gnueabi/alsa-lib
185-endif
186-ifeq ($(ARCH), armhf)
187-LIBSUBDIR = /usr/lib/arm-linux-gnueabihf/alsa-lib
188-endif
189+LIBSUBDIR = /usr/lib/$(DEB_HOST_MULTIARCH)/alsa-lib
190
191 HDRSUBDIR = /usr/include/alsa
192
193
194=== modified file 'lib/wpcmplugin/Makefile'
195--- lib/wpcmplugin/Makefile 2012-10-18 11:23:57 +0000
196+++ lib/wpcmplugin/Makefile 2013-06-05 23:37:27 +0000
197@@ -55,12 +55,7 @@
198
199 MAKESUBDIR = YES
200
201-ifeq ($(ARCH), armel)
202-LIBSUBDIR = /usr/lib/arm-linux-gnueabi/alsa-lib
203-endif
204-ifeq ($(ARCH), armhf)
205-LIBSUBDIR = /usr/lib/arm-linux-gnueabihf/alsa-lib
206-endif
207+LIBSUBDIR = /usr/lib/$(DEB_HOST_MULTIARCH)/alsa-lib
208
209 HDRSUBDIR = /usr/include/alsa
210
211
212=== modified file 'project_make'
213--- project_make 2013-01-26 04:28:26 +0000
214+++ project_make 2013-06-05 23:37:27 +0000
215@@ -3,14 +3,14 @@
216 # Macros, targets, etc.
217
218 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
219-DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
220+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
221
222 #####################
223 # Directory hierarchy
224 #####################
225
226 install_app_rel = usr/bin/
227-install_lib_rel = usr/lib/$(DEB_HOST_GNU_TYPE)/
228+install_lib_rel = usr/lib/$(DEB_HOST_MULTIARCH)/
229 install_hdr_rel = usr/include/
230
231 ifeq ($(INSTALL_ROOT),1)

Subscribers

People subscribed via source and target branches