On 16 January 2013 23:15, Bernhard Rosenkränzer <bernhard.rosenkranzer@linaro.org> wrote:
Hi,

On 16 January 2013 16:02, YongQin Liu <yongqin.liu@linaro.org> wrote:
Hi, bero

Sorry, just copied my question in IRC here.

Looks like my answers somehow didn't get through:


<liuyq> bero, can our toolchain be used directly for NDK?
<bero> liuyq: Probably just needs a few minor tweaks
<liuyq> in DEV-SCRIPTS-USAGE.TXT, I see such things:

<liuyq> The AOSP toolchain/ repository contains sources corresponding to toolchains
<liuyq> that are used to build the Android platform tree. For various reasons, they
<liuyq> need to be slightly patched for use with the NDK.
<liuyq> bero, I confused that if the toolchain used for normal build can be used directly for NDK
<liuyq> bero, in out normal build, we just specify TARGET_TOOLS_PREFIX before build, are the jni files are built with the same toolchain specified by TARGET_TOOLS_PREFIX?
<bero> liuyq: yes
<bero> NDK is somewhat special because it builds outside the Android source tree
<bero> So we can't just use -nostdinc -I/sourcetree/bionic/libc and the likes
<liuyq> bero, so it need the patches?
<bero> The best thing IMO would be to have a proper sysroot environment (which we can do easily)
<bero> But that's not the way NDK does (or at least did it last time I checked)
<bero> Have to see what exactly they're doing

My proposal is to have a proper sysroot environment that also emulates whatever the NDK does for maximum compatibility.
Yeah, this is good proposal.

and seems not all of the patches are related to the path of the lib, like
ndk/build/tools/toolchain-patches/gcc/0003-Work-around-for-Android-__cxa_finalize-bug.patch
ndk/build/tools/toolchain-patches/gcc/0009-Enable-assembler-linker-default-for-security.patch

if the toolchain for normal build is the same one used in NDK,
then there is a possibility that it also includes some of these patches.
Or there is some errors(outdated information) in the DEV-SCRIPTS-USAGE.TXT, file :(


--
Thanks,
Yongqin Liu
---------------------------------------------------------------
#mailing list
linaro-android@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-android
linaro-validation@lists.linaro.org
http://lists.linaro.org/pipermail/linaro-validation