Re: getrandom not replaced

2022-12-26 Thread Po Lu
Bruno Haible writes: > Why cross-compile? Both the Terminal-IDE and the Termux app support > native compilation. My port is "Emacs as an Android application package." The SDK build tools and Java compiler are only available on the host. > Again, what is the Android API level that you are using

Re: getrandom not replaced

2022-12-25 Thread Po Lu
Paul Eggert writes: > I meant to use the compiler that is actually used to compile > lib/getrandom.c. You can deduce this with something like this: > > rm lib/getrandom.o; cd lib; make V=1 getrandom.o > > and replace '-c -o getrandom.o' with '-E' in the resulting command. > > >> #if 1 >> /* Fill

Re: getrandom not replaced

2022-12-25 Thread Paul Eggert
On 12/25/22 18:50, Po Lu wrote: Paul Eggert writes: What's the output of gcc -E? Which of armv7a-unknown-linux-android19-clang -E or gcc -E on the host do you mean? I meant to use the compiler that is actually used to compile lib/getrandom.c. You can deduce this with something like this:

Re: getrandom not replaced

2022-12-25 Thread Po Lu
Paul Eggert writes: > What's the output of gcc -E? Which of armv7a-unknown-linux-android19-clang -E or gcc -E on the host do you mean? > Also, it sounds like lib/sys/random.h wasn't generated correctly; > what's in that file? Here it is, thanks. /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /*

Re: getrandom not replaced

2022-12-25 Thread Paul Eggert
On 12/25/22 17:07, Po Lu wrote: ~/emacs-dev/emacs-android/lib/getrandom.c:112:1: warning: no previous prototype for function 'getrandom' [-Wmissing-prototypes] getrandom (void *buffer, size_t length, unsigned int flags) What's the output of gcc -E? Also, it sounds like lib/sys/random.h wasn't

Re: getrandom not replaced

2022-12-25 Thread Bruno Haible
Po Lu wrote: > I know Emacs doesn't usually cross compile Why cross-compile? Both the Terminal-IDE and the Termux app support native compilation. > Trying to build Emacs on Android results in the following problematic > gnulib.mk. Again, what is the Android API level that you are using? Bruno