toolchain problem

586 views
Skip to first unread message

bhoj

unread,
Feb 19, 2009, 6:40:43 AM2/19/09
to android-platform
Whenever I try to compile any library by writing an android makefile I
am getting such errors. I have no idea how to go about this.

/tmp/ccOVNK9d.s: Assembler messages:
/tmp/ccOVNK9d.s:249: Error: unshifted register required -- `eor
r2,r0,r0,ror#16'
/tmp/ccOVNK9d.s:250: Error: unshifted register required -- `bic
r2,r2,#0xFF0000'
/tmp/ccOVNK9d.s:252: Error: unshifted register required -- `eor
r0,r0,r2,lsr#8'


Another case
/tmp/cceqT1Bl.s: Assembler messages:
/tmp/cceqT1Bl.s:97: Error: selected processor does not support `smull
ip,r4,r2,r3'
/tmp/cceqT1Bl.s:99: Error: unshifted register required -- `adc
r3,ip,r4,lsl#4'
/tmp/cceqT1Bl.s:122: Error: selected processor does not support `smull
ip,r4,r2,r3'
/tmp/cceqT1Bl.s:124: Error: unshifted register required -- `adc
r3,ip,r4,lsl#4'
/tmp/cceqT1Bl.s:162: Error: selected processor does not support `smull
r1,r0,r2,r4'
/tmp/cceqT1Bl.s:164: Error: unshifted register required -- `adc
r3,r1,r0,lsl#4'
/tmp/cceqT1Bl.s:744: Error: selected processor does not support `smull
r0,r1,r3,r2'
/tmp/cceqT1Bl.s:746: Error: unshifted register required -- `adc
r3,r0,r1,lsl#4'
/tmp/cceqT1Bl.s:756: Error: selected processor does not support `smull
r0,ip,r3,r2'
/tmp/cceqT1Bl.s:758: Error: unshifted register required -- `adc
r1,r0,ip,lsl#4'
/tmp/cceqT1Bl.s:770: Error: selected processor does not support `smull
r1,r0,r3,r2'
/tmp/cceqT1Bl.s:772: Error: unshifted register required -- `adc
r2,r1,r0,lsl#4'
/tmp/cceqT1Bl.s:1021: Error: selected processor does not support
`smull r0,r1,r3,r2'
/tmp/cceqT1Bl.s:1023: Error: unshifted register required -- `adc
r3,r0,r1,lsl#4'
/tmp/cceqT1Bl.s:1033: Error: selected processor does not support
`smull r0,ip,r3,r2'
/tmp/cceqT1Bl.s:1035: Error: unshifted register required -- `adc
r1,r0,ip,lsl#4'
/tmp/cceqT1Bl.s:1046: Error: selected processor does not support
`smull r1,r0,r3,r2'
/tmp/cceqT1Bl.s:1048: Error: unshifted register required -- `adc
r2,r1,r0,lsl#4'
/tmp/cceqT1Bl.s:1691: Error: selected processor does not support
`smull r1,ip,r2,r3'
/tmp/cceqT1Bl.s:1693: Error: unshifted register required -- `adc
fp,r1,ip,lsl#4'
/tmp/cceqT1Bl.s:1708: Error: selected processor does not support
`smull ip,r0,fp,r3'
/tmp/cceqT1Bl.s:1710: Error: unshifted register required -- `adc
r1,ip,r0,lsl#4'
/tmp/cceqT1Bl.s:1835: Error: selected processor does not support
`smull ip,r1,r5,r6'
/tmp/cceqT1Bl.s:1837: Error: unshifted register required -- `adc
r0,ip,r1,lsl#4'
/tmp/cceqT1Bl.s:1865: Error: selected processor does not support
`smull r1,r2,r0,r3'
/tmp/cceqT1Bl.s:1867: Error: unshifted register required -- `adc
r3,r1,r2,lsl#4'


Is there any flags that I should set in Android makefile ?

David Turner

unread,
Feb 19, 2009, 5:15:04 PM2/19/09
to android-...@googlegroups.com
Hello,

It looks like the assembler is complaining that the content of the .s file is not Thumb.

can you tell us more about how you configure your build, what is in your Android.mk file and how you invoke the toolchain ?. I suspect some misconfiguration, somewhere.

vishal bhoj

unread,
Feb 19, 2009, 11:26:33 PM2/19/09
to android-...@googlegroups.com
Yes it was the problem with the configurations of the toolchain now I have added the CFLAGS  -mno-thumb-interwork -mno-thumb -marm
and I hence I am not getting those errors now . Is this the right way . this is the format of my Android makefile  NOW.


LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \


LOCAL_CFLAGS +=-O4  -mno-thumb-interwork -mno-thumb -marm
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/ \
$(LOCAL_PATH)/../

LOCAL_SHARED_LIBRARIES:=

LOCAL_STATIC_LIBRARIES:=

LOCAL_MODULE:=


include $(BUILD_SHARED_LIBRARY)


I first do source= build/envsetup.sh

and then build my library.

Is my procedure right ?
--
with regards vishal

rktb

unread,
Feb 19, 2009, 11:43:24 PM2/19/09
to android-platform
You can probably add the following line for your library to be
compiled in arm mode:

LOCAL_ARM_MODE := arm

-Ravi

David Turner

unread,
Feb 20, 2009, 3:36:06 AM2/20/09
to android-...@googlegroups.com
This is not the right procedure, the toolchain should deal with these details automatically.
Do you have inline assembly in your source code ? If this is true, you should do either one
of these things to force ARM compilation:

- define "LOCAL_ARM-MODE := arm" to force ARM compilation of all your sources

- otherwise, add your source file as "mysource.c.arm" instead of "mysource.c" to LOCAL_SRC_FILES, this will make only mysource.c built in ARM mode, the rest will be in thumb.

vishal bhoj

unread,
Feb 20, 2009, 4:06:27 AM2/20/09
to android-...@googlegroups.com

Thanks David , I will follow your instruction
--
with regards vishal

vishal bhoj

unread,
Feb 20, 2009, 4:38:41 AM2/20/09
to android-...@googlegroups.com


I am able to compile but it fails at prelinking. I manually copy the shared object into obj/lib. How can I avoid this prelinking stage in the build process
--
with regards vishal

Freepine

unread,
Feb 20, 2009, 7:32:43 AM2/20/09
to android-...@googlegroups.com
You can add below line in your make file:
LOCAL_PRELINK_MODULE := false
Reply all
Reply to author
Forward
0 new messages