Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
On Wed, Sep 11, 2013 at 08:26:31PM -0500, Cayce Pollard wrote: Also, would that work for linking __clear_cache to the Android equivalent cacheflush? I would prefer directly using the __ARM_NR_cacheflush syscall to make it work on non-Bionic Linux as well. The syscall has been introduced into Linux in 2.3.7pre6. Glibc uses it in libdl after perfoming relocations since 2005 and according to https://github.com/android/platform_bionic/blob/master/libc/arch-arm/syscalls/cacheflush.S it is what Bionic's cacheflush uses under der hood. Unfortunately it is not exposed by Glibc. Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold (Found cause)
Ignore my previous message...bionic libc doesn't have strtold. Back to the drawing board... On Wed, Sep 11, 2013 at 3:40 PM, Cayce Pollard mlisaoverdr...@gmail.comwrote: Hello, When building tinycc using the Android NDK standalone toolchain, I get the following error: Putting child 0x01bcc300 (tcc.o) PID 24373 on the chain. Live child 0x01bcc300 (tcc.o) PID 24373 In file included from ./../tinycc/tcc.c:24:0: ./../tinycc/tcc.h:943:20: error: conflicting types for 'strtold' In file included from ./../tinycc/tcc.h:32:0, from ./../tinycc/tcc.c:24: /project/arm-cc/bin/../sysroot/usr/include/stdlib.h:68:15: note: previous declaration of 'strtold' was here If I comment out strtold in tcc.h, I get the following error ./../tinycc/tccpp.c:1961: error: undefined reference to 'strtold' collect2: error: ld returned 1 exit status I'm including the -std=c99 in the --extra-ldflags for configure. Is there a different arg I should be using? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
Just saw your email as I was getting ready to post my next questions. 1) should I just find/replace in the code or make an alias to strtod? 2) Android's version of __clear_cache is cacheflush, can I make an alias for that as well? I On Wed, Sep 11, 2013 at 4:38 PM, Daniel Glöckner daniel...@gmx.net wrote: On Wed, Sep 11, 2013 at 03:40:15PM -0500, Cayce Pollard wrote: ./../tinycc/tccpp.c:1961: error: undefined reference to 'strtold' Just substitute strtod for strtold. It has probably been omitted from Android's libc because long double == double on ARM nowadays (i.e. with EABI or VFP). Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
On Wed, Sep 11, 2013 at 03:40:15PM -0500, Cayce Pollard wrote: ./../tinycc/tccpp.c:1961: error: undefined reference to 'strtold' Just substitute strtod for strtold. It has probably been omitted from Android's libc because long double == double on ARM nowadays (i.e. with EABI or VFP). Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
I suspect you're right...now off to find out where that particular option goes... (still grepping my way through pages of gcc documentation and Android internals) Will the same work for __clear_cache? I suspect not, based on a cursory examination of that and cacheflush, but I'd be happy if someone corrected me. On Wed, Sep 11, 2013 at 5:16 PM, Stephan Beal sgb...@googlemail.com wrote: On Wed, Sep 11, 2013 at 11:48 PM, Cayce Pollard mlisaoverdr...@gmail.comwrote: Just saw your email as I was getting ready to post my next questions. 1) should I just find/replace in the code or make an alias to strtod? i _suspect_ that -Dstrtold=strtod might do the trick for you. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
On Wed, Sep 11, 2013 at 11:48 PM, Cayce Pollard mlisaoverdr...@gmail.comwrote: Just saw your email as I was getting ready to post my next questions. 1) should I just find/replace in the code or make an alias to strtod? i _suspect_ that -Dstrtold=strtod might do the trick for you. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold
I couldn't figure out how to correctly use -Dstrtold=strtod, so I did a simple find/replace to test build. It worked, but I would like to do this correctly. I did a search on -D, Makefiles, -D gcc options and grepped for D within the source directory. I couldn't find/see anything that resembled the original suggestion but I did find a lot of articles on overriding a library during compile or with weak aliases. What is the standard way for making one function a reference to another in a different header? Also, would that work for linking __clear_cache to the Android equivalent cacheflush? On Wed, Sep 11, 2013 at 5:37 PM, Cayce Pollard mlisaoverdr...@gmail.comwrote: I suspect you're right...now off to find out where that particular option goes... (still grepping my way through pages of gcc documentation and Android internals) Will the same work for __clear_cache? I suspect not, based on a cursory examination of that and cacheflush, but I'd be happy if someone corrected me. On Wed, Sep 11, 2013 at 5:16 PM, Stephan Beal sgb...@googlemail.comwrote: On Wed, Sep 11, 2013 at 11:48 PM, Cayce Pollard mlisaoverdr...@gmail.com wrote: Just saw your email as I was getting ready to post my next questions. 1) should I just find/replace in the code or make an alias to strtod? i _suspect_ that -Dstrtold=strtod might do the trick for you. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel