This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Do not use libiberty's getpagesize on Android


*** TEST RESULTS FOR COMMIT 82ef0f70744ca47057b9e95cd926dbcb25ebb0c8 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 82ef0f70744ca47057b9e95cd926dbcb25ebb0c8

Do not use libiberty's getpagesize on Android

Building libiberty on Android currently fails with the error message
shown below.  This was discovered by trying to build GDBserver
for Android, which stopped building after libiberty became
a GDBserver dependency.

Here is the error message:

[...]/getpagesize.c:64:1: error: redefinition of 'getpagesize'
In file included from /[...]/getpagesize.c:34:0:
/[...]/usr/include/unistd.h:171:23: note: previous definition of 'getpagesize' was here

And looking at the definition, one can see that it defined as
a static inline function...

   static __inline__ int getpagesize(void) {
     extern unsigned int __page_size;
     return __page_size;
   }

... which explains why the AC_CHECK_FUNCS test failed to detect
the function, since there is no associated symbol to be linked in.

This patch prevents getpagesize.c to be compiled in by hard-coding
the fact that getpagesize is available on android hosts.

libiberty/ChangeLog:

        * configure.ac: Set AC_CV_FUNC_GETPAGESIZE to "yes" on
        Android hosts.
        * configure: Regenerate.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]