ndk r10d support for ARM SMC

OP (Company: Infosecure) #4215243
I have seen threads about this issue here, and I have tried the 
suggested fixes but I still get the same error. Basically I am using 
above version of ndk to compile a sample project composed of C and 
assembly files. I get the following error:

/tmp/ccEEI8oF.s: Assembler messages:
/tmp/ccEEI8oF.s:16: Error: selected processor does not support ARM mode 
`smc #0'
make: *** [obj/local/armeabi/objs/hello_tz/main_normal.o] Error 1


I have tried changing the -march=armv7-a. But I still get the error. 
Here is a copy of my Android.mk file:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# give module name
APP_PLATFORM := android-18
LOCAL_MODULE := hello_tz
$(warning This is in NDK_ROOT $(NDK_ROOT))
LOCAL_C_INCLUDES += 
$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm/usr/include
APP_ABI := armeabi-v7a
#LOCAL_CFLAGS := -mcpu=cortex-m3 -mthumb -march=armv7-a 
-mtune=cortex-a15
#LOCAL_CFLAGS := -mcpu=cortex-a15 -march=armv7-a
LOCAL_CFLAGS := -march=armv7-a -D__ASSEMBLY__ -mabi=aapcs-linux 
-gdwarf-2 -Wall -Wundef -Wstrict-prototypes -Wno-trigrap
hs -fno-strict-aliasing -fno-common 
-Werror-implicit-function-declaration -Wno-format-security 
-fno-delete-null-pointer-
checks -Os -Wno-maybe-uninitialized -marm -fno-dwarf2-cfi-asm 
-fstack-protector -mabi=aapcs-linux -mno-thumb-interwork -
funwind-tables -D__LINUX_ARM_ARCH__=7 -mcpu=cortex-a15 -msoft-float 
-Uarm -Wframe-larger-than=1024 -Wno-unused-but-set-v
ariable -fomit-frame-pointer -g -Wdeclaration-after-statement 
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D
CC_HAVE_ASM_GOTO
# list your C files to compile
FILE_LIST := $(patsubst %.c,%.c.arm,$(wildcard $(LOCAL_PATH)/*.c))
#$(warning here is what is in FILE_LIST after an attempt to collect all 
the C files$(FILE_LIST))
FILE_LIST += $(wildcard $(LOCAL_PATH)/*.s)
#$(warning here is what is in FILE_LIST after an attempt to collect all 
the S files$(FILE_LIST))
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
# this option will build executables instead of building library for 
android application.
include $(BUILD_EXECUTABLE)

Reply

A question of your own? This thread is over 11 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.