On 10/19/2011 04:17 PM, Rainer Orth wrote:
As described in the PR, Solaris 10 bootstrap is currently broken
compiling ggc-page.c in stage2 due to no declaration for madvise().
This happens because g++ defines _XOPEN_SOURCE=600, which hides the
declaration, and configure doesn't check for a declaration at all.
The following patch fixes both issues by checking for a madvise()
declaration separately and doing so with the C++ compiler.
Testing in progress on i386-pc-solaris2.8 (where it worked before),
i386-pc-solaris2.10 (bootstrap broken), i386-pc-solaris2.11 (worked
before), and x86_64-unknown-linux-gnu.
HAVE_MADVISE is 1 everywhere, HAVE_DECL_MADVISE is 1 everwhere except on
Solaris 10 in stages 2 and 3 where g++ is used.
All bootstraps are beyond the point of the breakage now. Ok for
mainline if they pass?
Thanks.
Rainer
2011-10-19 Rainer Orth<r...@cebitec.uni-bielefeld.de>
PR bootstrap/50777
* configure.ac: Save and restore CXXFLAGS around
gcc_AC_CHECK_DECLS uses.
Check for madvise() declaration with g++ if --enable-build-with-cxx.
* configure: Regenerate.
* config.in: Regenerate.
* ggc-page.c (USING_MADVISE): Also check HAVE_DECL_MADVISE.
Ok.
Paolo