Builder confuses itself when compiling assembly code

Put problems with the Android NDK in this forum.

Builder confuses itself when compiling assembly code

Postby paulscode » Fri Dec 10, 2010 12:06 am

This is probably more of an Eclipse + NDK plugin question, but I assume a lot of people here use Eclipse, so I thought I would ask. For some reason, when the builder compiles an assembly file (name.s), it decides to give the output from the first command an extension of ".s" instead of ".o". This then confuses the builder when it executes the second command (apparently it sees that ".s" extension and expects a text file with assembly commands, and it spits out a hundred "bad instruction" errors). From the command line, simply changing the extension of the output file from ".s" to ".o" fixes the problem.

So my question is, are there some kind of options I can change so the builder either:
A) Calls the output from the first build command name.o instead of name.s; OR
B) Doesn't assume the output file is assembly code just because it ends in .s

Or am I doomed to build this library manually from the command line?

For reference, the commands the builder is trying to execute:
Code: Select all
/home/paul/bin/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc -march=armv7-a -mtune=cortex-a8 -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300  -I/home/paul/workspace/HelloAndroid/jni -DANDROID  -Wa,--noexecstack -O2 -DNDEBUG -g -c -MMD -MP -MF /home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.s.d /home/paul/workspace/HelloAndroid/jni/linkage_arm.s -o /home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.s

And then:
Code: Select all
/home/paul/bin/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc -nostdlib -Wl,-soname, -Wl,-shared,-Bsymbolic  /home/paul/workspace/HelloAndroid/obj/local/armeabi/objs/linkage_arm/linkage_arm.s -Wl,--whole-archive  -Wl,--no-whole-archive  /home/paul/bin/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/libgcc.a  /home/paul/bin/android-ndk-r4b/build/platforms/android-8/arch-arm/usr/lib/ /home/paul/bin/android-ndk-r4b/build/platforms/android-8/arch-arm/usr/lib/ /home/paul/bin/android-ndk-r4b/build/platforms/android-8/arch-arm/usr/lib/  -Xlinker --section-start -Xlinker .init=0x08000000 -Xlinker --section-start -Xlinker .init=0x08000000 -Wl,--no-undefined -Wl,-z,noexecstack  -Wl,-rpath-link=/home/paul/bin/android-ndk-r4b/build/platforms/android-8/arch-arm/usr/lib -o /home/paul/workspace/HelloAndroid/obj/local/armeabi/

Obviously, this is just a simple test-case - ultimately I'm trying to build this file into a much larger shared library. Building it alone into a separate shared library is an option, but it would require changing the current memory mapping which is complicated as well (otherwise I would just build it from the command line and not worry about it).
Experienced Developer
Experienced Developer
Posts: 79
Joined: Thu Nov 11, 2010 3:57 pm


Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 2 guests