comp.lang.ada
 help / color / mirror / Atom feed
* to Simon Wright, re Mac OS X builds
@ 2016-10-03 15:14 Lucretia
  2016-10-06  7:57 ` Simon Wright
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-03 15:14 UTC (permalink / raw)


Hi,

I'm trying to replicate your build of 6.1.0 for mac so I get an understanding of the build process on Mac. Problem is, it's failing. There must be more than what you are telling going on on your platform.

This cannot be all you do (my command line taken from yours):

../../source/gcc-6.1.0/configure --prefix=/opt/gcc-6.1.0-mine --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer --disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls --enable-languages=c,c++,ada,fortran,objc,obj-c++ --host=x86_64-apple-darwin15 --build=x86_64-apple-darwin15 --target=x86_64-apple-darwin15  --with-boot-ldflags='-Wl,-headerpad_max_install_names -shared-libgcc'

No matter what I do, I fail:

checking whether the /opt/gcc-6.1.0/bin/gcc linker (ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/Users/laguest/gcc/build/gcc-6.1.0/gmp':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

I've done:

export CPP=/usr/bin/cpp

and

export CPP=/opt/gcc-6.1.0/bin/cpp

I've added quotes, I've even put these vars at the start of my command line:

CC=/opt/gcc-6.1.0/bin/gcc CXX=/opt/gcc-6.1.0/bin/g++ AR=/opt/gcc-6.1.0/bin/gcc-ar NM=/opt/gcc-6.1.0/bin/gcc-nm RANLIB=/opt/gcc-6.1.0/bin/gcc-ranlib ../../source/gcc-6.1.0/configure ...

and

CC=/opt/gcc-6.1.0/bin/gcc CXX=/opt/gcc-6.1.0/bin/g++ AR=/opt/gcc-6.1.0/bin/gcc-ar NM=/opt/gcc-6.1.0/bin/gcc-nm RANLIB=/opt/gcc-6.1.0/bin/gcc-ranlib make all-gcc 2>&1| tee log.make.txt

I've tried make all, make all-gcc, make bootstrap, just to see and they all fail.

What am I doing wrong?

Thanks,
Luke.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-03 15:14 to Simon Wright, re Mac OS X builds Lucretia
@ 2016-10-06  7:57 ` Simon Wright
  2016-10-06 10:54   ` Luke A. Guest
                     ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Simon Wright @ 2016-10-06  7:57 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> I'm trying to replicate your build of 6.1.0 for mac so I get an
> understanding of the build process on Mac. Problem is, it's
> failing. There must be more than what you are telling going on on your
> platform.

> checking how to run the C++ preprocessor... /lib/cpp
> configure: error: in `/Users/laguest/gcc/build/gcc-6.1.0/gmp':
> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
> See `config.log' for more details

I replied to this by mail, perhaps you didn't see it.

I couldn't reproduce the problem; maybe I made some change which is
still there. I don't have any notes about it, but if I did have this
problem I would have started looking in config.log.

This message comes from gmp/configure:10323. Why it's looking for
/lib/cpp I don't know (/lib doesn't exist); it should be using "g++ -E".


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06  7:57 ` Simon Wright
@ 2016-10-06 10:54   ` Luke A. Guest
  2016-10-06 16:30     ` Simon Wright
  2016-10-06 14:38   ` Luke A. Guest
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 22+ messages in thread
From: Luke A. Guest @ 2016-10-06 10:54 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:
> Lucretia <laguest9000@googlemail.com> writes:
> 
>> I'm trying to replicate your build of 6.1.0 for mac so I get an
>> understanding of the build process on Mac. Problem is, it's
>> failing. There must be more than what you are telling going on on your
>> platform.
> 
>> checking how to run the C++ preprocessor... /lib/cpp
>> configure: error: in `/Users/laguest/gcc/build/gcc-6.1.0/gmp':
>> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
>> See `config.log' for more details
> 
> I replied to this by mail, perhaps you didn't see it.

Ive been checking here, I need to change the email address used by google I
think. Plus if it's here, it's archived.

> I couldn't reproduce the problem; maybe I made some change which is
> still there. I don't have any notes about it, but if I did have this
> problem I would have started looking in config.log.

Yeah I did.

> This message comes from gmp/configure:10323. Why it's looking for
> /lib/cpp I don't know (/lib doesn't exist); it should be using "g++ -E".

Yea, but if you look , it tries two variations of the above then /lib/cpp.
Not sure if that's a mac specific thing, I think it is, need to check the
actual configure script.  If so this needs a patch i think to call xcrun
instead, but then I don't know if this is supposed to used apple's cop or
the GCC one from the cross compiler you provided.

Did you build gmp, mpc, mpfr and isl with apple's tools or with GCC? Did
you just link in the firs into the GCC root dir?



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06  7:57 ` Simon Wright
  2016-10-06 10:54   ` Luke A. Guest
@ 2016-10-06 14:38   ` Luke A. Guest
  2016-10-06 16:23   ` Lucretia
  2016-10-06 16:26   ` Lucretia
  3 siblings, 0 replies; 22+ messages in thread
From: Luke A. Guest @ 2016-10-06 14:38 UTC (permalink / raw)


Also, which particular versions of the maths libs did you build with?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06  7:57 ` Simon Wright
  2016-10-06 10:54   ` Luke A. Guest
  2016-10-06 14:38   ` Luke A. Guest
@ 2016-10-06 16:23   ` Lucretia
  2016-10-06 16:26   ` Lucretia
  3 siblings, 0 replies; 22+ messages in thread
From: Lucretia @ 2016-10-06 16:23 UTC (permalink / raw)


On Thursday, 6 October 2016 08:57:40 UTC+1, Simon Wright  wrote:

> I replied to this by mail, perhaps you didn't see it.

Just seen it.
 
> I couldn't reproduce the problem; maybe I made some change which is
> still there. I don't have any notes about it, but if I did have this
> problem I would have started looking in config.log.
> 
> This message comes from gmp/configure:10323. Why it's looking for
> /lib/cpp I don't know (/lib doesn't exist); it should be using "g++ -E".

I'll post what you asked for in email, gmp/config.log. 

FYI, for this test, I downloaded gcc-6.2.0, then just called ./contrib/download_prerequisites to get the maths libs down.

I configured with:

../../source/gcc-6.2.0/configure --prefix=/opt/gcc-6.2.0 --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer --disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls --enable-languages=c,c++,ada,fortran,objc,obj-c++ --host=x86_64-apple-darwin15 --build=x86_64-apple-darwin15 --target=x86_64-apple-darwin15 --with-boot-ldflags='-Wl,-headerpad_max_install_names -shared-libgcc' 2>&1|tee log.config.txt

and then just "make"

>>> gmp/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU MP configure 4.3.2, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ /Users/laguest/gcc/source/gcc-6.2.0/gmp/configure --srcdir=../../../source/gcc-6.2.0/gmp --cache-file=./config.cache --prefix=/opt/gcc-6.2.0 --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer --disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls --with-boot-ldflags=-Wl,-headerpad_max_install_names -shared-libgcc --enable-languages=c,ada,c++,fortran,objc,obj-c++ --program-transform-name=s,y,y, --disable-option-checking --build=x86_64-apple-darwin15 --host=none-apple-darwin15 --target=none-apple-darwin15 --disable-intermodule --enable-checking=yes,types --disable-coverage --enable-languages=c,ada,c++ --disable-build-format-warnings --disable-shared LEX=touch lex.yy.c

## --------- ##
## Platform. ##
## --------- ##

hostname = luke-guests-mac-mini.local
uname -m = x86_64
uname -r = 15.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
	 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 4.00 gigabytes
Default processor set: 133 tasks, 476 threads, 2 processors
Load average: 1.80, Mach factor: 0.34
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /opt/gcc-6.1.0/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1949: loading cache ./config.cache
configure:2123: checking build system type
configure:2141: result: x86_64-apple-darwin15
configure:2163: checking host system type
configure:2178: result: none-apple-darwin15
configure:2215: checking for a BSD-compatible install
configure:2271: result: /usr/bin/install -c
configure:2282: checking whether build environment is sane
configure:2325: result: yes
configure:2382: checking for gawk
configure:2409: result: awk
configure:2420: checking whether /Applications/Xcode.app/Contents/Developer/usr/bin/make sets $(MAKE)
configure:2441: result: yes
configure:2520: checking for none-apple-darwin15-strip
configure:2550: result: no
configure:2560: checking for strip
configure:2576: found /usr/bin/strip
configure:2587: result: strip
configure:2601: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
configure:2623: checking whether to enable maintainer-specific portions of Makefiles
configure:2632: result: no
User:
ABI=
CC=x86_64-apple-darwin15-gcc
CFLAGS=-g 
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=long longlong
cclist=gcc cc
configure:4324: x86_64-apple-darwin15-gcc -c conftest.c >&5
configure:4327: $? = 0
configure:4330: checking whether x86_64-apple-darwin15-gcc is gcc
configure:4332: result: yes
configure:4346: x86_64-apple-darwin15-gcc 2>&1 | grep xlc >/dev/null
configure:4349: $? = 1
configure:4403: checking compiler x86_64-apple-darwin15-gcc -g  -DNO_ASM
Test compile: 
configure:4417: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4420: $? = 0
Test compile: function pointer return
configure:4471: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4474: $? = 0
Test compile: cmov instruction
configure:4527: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4530: $? = 0
Test compile: double -> ulong conversion
configure:4584: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4587: $? = 0
Test compile: double negation
configure:4639: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4642: $? = 0
Test compile: double -> float conversion
configure:4695: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4698: $? = 0
Test compile: gnupro alpha ev6 char spilling
configure:4780: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
conftest.c:6:38: fatal error: string.h: No such file or directory
 #include <string.h>  /* for memcpy */
                                      ^
compilation terminated.
configure:4783: $? = 1
failed program was:
/* The following provokes an internal compiler error from gcc version
   "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char
   values being spilled into floating point registers.  The problem doesn't
   show up all the time, but has occurred enough in GMP for us to reject
   this compiler+flags.  */
#include <string.h>  /* for memcpy */
struct try_t
{
 char dst[2];
 char size;
 long d0, d1, d2, d3, d4, d5, d6;
 char overlap;
};
struct try_t param[6];
int
param_init ()
{
 struct try_t *p;
 memcpy (p, &param[ 2 ], sizeof (*p));
 memcpy (p, &param[ 2 ], sizeof (*p));
 p->size = 2;
 memcpy (p, &param[ 1 ], sizeof (*p));
 p->dst[0] = 1;
 p->overlap = 2;
 memcpy (p, &param[ 3 ], sizeof (*p));
 p->dst[0] = 1;
 p->overlap = 8;
 memcpy (p, &param[ 4 ], sizeof (*p));
 memcpy (p, &param[ 4 ], sizeof (*p));
 p->overlap = 8;
 memcpy (p, &param[ 5 ], sizeof (*p));
 memcpy (p, &param[ 5 ], sizeof (*p));
 memcpy (p, &param[ 5 ], sizeof (*p));
 return 0;
}

int main () { return 0; }
configure:5443: result: no, gnupro alpha ev6 char spilling
configure:4324: x86_64-apple-darwin15-gcc -c conftest.c >&5
configure:4327: $? = 0
configure:4330: checking whether x86_64-apple-darwin15-gcc is gcc
configure:4332: result: yes
configure:4346: x86_64-apple-darwin15-gcc 2>&1 | grep xlc >/dev/null
configure:4349: $? = 1
configure:4403: checking compiler x86_64-apple-darwin15-gcc -g  -DNO_ASM
Test compile: 
configure:4417: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4420: $? = 0
Test compile: function pointer return
configure:4471: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4474: $? = 0
Test compile: cmov instruction
configure:4527: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4530: $? = 0
Test compile: double -> ulong conversion
configure:4584: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4587: $? = 0
Test compile: double negation
configure:4639: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4642: $? = 0
Test compile: double -> float conversion
configure:4695: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
configure:4698: $? = 0
Test compile: gnupro alpha ev6 char spilling
configure:4780: x86_64-apple-darwin15-gcc -g  -DNO_ASM conftest.c >&5
conftest.c:6:38: fatal error: string.h: No such file or directory
 #include <string.h>  /* for memcpy */
                                      ^
compilation terminated.
configure:4783: $? = 1
failed program was:
/* The following provokes an internal compiler error from gcc version
   "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char
   values being spilled into floating point registers.  The problem doesn't
   show up all the time, but has occurred enough in GMP for us to reject
   this compiler+flags.  */
#include <string.h>  /* for memcpy */
struct try_t
{
 char dst[2];
 char size;
 long d0, d1, d2, d3, d4, d5, d6;
 char overlap;
};
struct try_t param[6];
int
param_init ()
{
 struct try_t *p;
 memcpy (p, &param[ 2 ], sizeof (*p));
 memcpy (p, &param[ 2 ], sizeof (*p));
 p->size = 2;
 memcpy (p, &param[ 1 ], sizeof (*p));
 p->dst[0] = 1;
 p->overlap = 2;
 memcpy (p, &param[ 3 ], sizeof (*p));
 p->dst[0] = 1;
 p->overlap = 8;
 memcpy (p, &param[ 4 ], sizeof (*p));
 memcpy (p, &param[ 4 ], sizeof (*p));
 p->overlap = 8;
 memcpy (p, &param[ 5 ], sizeof (*p));
 memcpy (p, &param[ 5 ], sizeof (*p));
 memcpy (p, &param[ 5 ], sizeof (*p));
 return 0;
}

int main () { return 0; }
configure:5443: result: no, gnupro alpha ev6 char spilling
configure:7063: checking for none-apple-darwin15-gcc
configure:7090: result: x86_64-apple-darwin15-gcc
configure:7368: checking for C compiler version
configure:7375: x86_64-apple-darwin15-gcc --version >&5
x86_64-apple-darwin15-gcc (GCC) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:7378: $? = 0
configure:7385: x86_64-apple-darwin15-gcc -v >&5
Using built-in specs.
COLLECT_GCC=x86_64-apple-darwin15-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-6.1.0/libexec/gcc/x86_64-apple-darwin15/6.1.0/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: ../gcc-6.1.0/configure --prefix=/opt/gcc-6.1.0 --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer --disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls --enable-languages=c,c++,ada,fortran,objc,obj-c++ --host=x86_64-apple-darwin15 --target=x86_64-apple-darwin15 --build=x86_64-apple-darwin15 --with-boot-ldflags='-Wl,-headerpad_max_install_names -shared-libgcc'
Thread model: posix
gcc version 6.1.0 (GCC) 
configure:7388: $? = 0
configure:7395: x86_64-apple-darwin15-gcc -V >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-V'
x86_64-apple-darwin15-gcc: fatal error: no input files
compilation terminated.
configure:7398: $? = 1
configure:7421: checking for C compiler default output file name
configure:7448: x86_64-apple-darwin15-gcc -g   -static-libstdc++ -static-libgcc -Wl,-no_pie  conftest.c  >&5
configure:7451: $? = 0
configure:7489: result: a.out
configure:7506: checking whether the C compiler works
configure:7536: result: yes
configure:7543: checking whether we are cross compiling
configure:7545: result: yes
configure:7548: checking for suffix of executables
configure:7555: x86_64-apple-darwin15-gcc -o conftest -g   -static-libstdc++ -static-libgcc -Wl,-no_pie  conftest.c  >&5
configure:7558: $? = 0
configure:7582: result: 
configure:7588: checking for suffix of object files
configure:7614: x86_64-apple-darwin15-gcc -c -g   conftest.c >&5
configure:7617: $? = 0
configure:7640: result: o
configure:7644: checking whether we are using the GNU C compiler
configure:7673: x86_64-apple-darwin15-gcc -c -g   conftest.c >&5
configure:7679: $? = 0
configure:7696: result: yes
configure:7701: checking whether x86_64-apple-darwin15-gcc accepts -g
configure:7731: x86_64-apple-darwin15-gcc -c -g  conftest.c >&5
configure:7737: $? = 0
configure:7836: result: yes
configure:7853: checking for x86_64-apple-darwin15-gcc option to accept ISO C89
configure:7927: x86_64-apple-darwin15-gcc  -c -g   conftest.c >&5
conftest.c:13:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -qlanglvl=extc89 -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-qlanglvl=extc89'
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -qlanglvl=ansi -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-qlanglvl=ansi'
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -std -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-std'
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -Ae -c -g   conftest.c >&5
<command-line>:0:1: error: missing '(' after predicate
conftest.c:13:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -Aa -D_HPUX_SOURCE -c -g   conftest.c >&5
<command-line>:0:1: error: missing '(' after predicate
conftest.c:13:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7927: x86_64-apple-darwin15-gcc -Xc -D__EXTENSIONS__ -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-Xc'; did you mean '-X'?
configure:7933: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
| 
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
| 
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
| 
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:7959: result: unsupported
configure:7976: checking for x86_64-apple-darwin15-gcc option to accept ISO C99
configure:8135: x86_64-apple-darwin15-gcc  -c -g   conftest.c >&5
conftest.c:14:20: fatal error: stdlib.h: No such file or directory
 #include <stdlib.h>
                    ^
compilation terminated.
configure:8141: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
| // Check varargs and va_copy.
| static void
| test_varargs (const char *format, ...)
| {
|   va_list args;
|   va_start (args, format);
|   va_list args_copy;
|   va_copy (args_copy, args);
| 
|   const char *str;
|   int number;
|   float fnumber;
| 
|   while (*format)
|     {
|       switch (*format++)
| 	{
| 	case 's': // string
| 	  str = va_arg (args_copy, const char *);
| 	  break;
| 	case 'd': // int
| 	  number = va_arg (args_copy, int);
| 	  break;
| 	case 'f': // float
| 	  fnumber = va_arg (args_copy, double);
| 	  break;
| 	default:
| 	  break;
| 	}
|     }
|   va_end (args_copy);
|   va_end (args);
| }
| 
| int
| main ()
| {
| 
|   // Check bool.
|   _Bool success = false;
| 
|   // Check restrict.
|   if (test_restrict ("String literal") == 0)
|     success = true;
|   char *restrict newvar = "Another string";
| 
|   // Check varargs.
|   test_varargs ("s, d' f .", "string", 65, 34.234);
|   test_varargs_macros ();
| 
|   // Check flexible array members.
|   struct incomplete_array *ia =
|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|   ia->datasize = 10;
|   for (int i = 0; i < ia->datasize; ++i)
|     ia->data[i] = i * 1.234;
| 
|   // Check named initializers.
|   struct named_init ni = {
|     .number = 34,
|     .name = L"Test wide string",
|     .average = 543.34343,
|   };
| 
|   ni.number = 58;
| 
|   int dynamic_array[ni.number];
|   dynamic_array[ni.number - 1] = 543;
| 
|   // work around unused variable warnings
|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
| 	  || dynamic_array[ni.number - 1] != 543);
| 
|   ;
|   return 0;
| }
configure:8135: x86_64-apple-darwin15-gcc -std=gnu99 -c -g   conftest.c >&5
conftest.c:14:20: fatal error: stdlib.h: No such file or directory
 #include <stdlib.h>
                    ^
compilation terminated.
configure:8141: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
| // Check varargs and va_copy.
| static void
| test_varargs (const char *format, ...)
| {
|   va_list args;
|   va_start (args, format);
|   va_list args_copy;
|   va_copy (args_copy, args);
| 
|   const char *str;
|   int number;
|   float fnumber;
| 
|   while (*format)
|     {
|       switch (*format++)
| 	{
| 	case 's': // string
| 	  str = va_arg (args_copy, const char *);
| 	  break;
| 	case 'd': // int
| 	  number = va_arg (args_copy, int);
| 	  break;
| 	case 'f': // float
| 	  fnumber = va_arg (args_copy, double);
| 	  break;
| 	default:
| 	  break;
| 	}
|     }
|   va_end (args_copy);
|   va_end (args);
| }
| 
| int
| main ()
| {
| 
|   // Check bool.
|   _Bool success = false;
| 
|   // Check restrict.
|   if (test_restrict ("String literal") == 0)
|     success = true;
|   char *restrict newvar = "Another string";
| 
|   // Check varargs.
|   test_varargs ("s, d' f .", "string", 65, 34.234);
|   test_varargs_macros ();
| 
|   // Check flexible array members.
|   struct incomplete_array *ia =
|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|   ia->datasize = 10;
|   for (int i = 0; i < ia->datasize; ++i)
|     ia->data[i] = i * 1.234;
| 
|   // Check named initializers.
|   struct named_init ni = {
|     .number = 34,
|     .name = L"Test wide string",
|     .average = 543.34343,
|   };
| 
|   ni.number = 58;
| 
|   int dynamic_array[ni.number];
|   dynamic_array[ni.number - 1] = 543;
| 
|   // work around unused variable warnings
|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
| 	  || dynamic_array[ni.number - 1] != 543);
| 
|   ;
|   return 0;
| }
configure:8135: x86_64-apple-darwin15-gcc -c99 -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-c99'
configure:8141: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
| // Check varargs and va_copy.
| static void
| test_varargs (const char *format, ...)
| {
|   va_list args;
|   va_start (args, format);
|   va_list args_copy;
|   va_copy (args_copy, args);
| 
|   const char *str;
|   int number;
|   float fnumber;
| 
|   while (*format)
|     {
|       switch (*format++)
| 	{
| 	case 's': // string
| 	  str = va_arg (args_copy, const char *);
| 	  break;
| 	case 'd': // int
| 	  number = va_arg (args_copy, int);
| 	  break;
| 	case 'f': // float
| 	  fnumber = va_arg (args_copy, double);
| 	  break;
| 	default:
| 	  break;
| 	}
|     }
|   va_end (args_copy);
|   va_end (args);
| }
| 
| int
| main ()
| {
| 
|   // Check bool.
|   _Bool success = false;
| 
|   // Check restrict.
|   if (test_restrict ("String literal") == 0)
|     success = true;
|   char *restrict newvar = "Another string";
| 
|   // Check varargs.
|   test_varargs ("s, d' f .", "string", 65, 34.234);
|   test_varargs_macros ();
| 
|   // Check flexible array members.
|   struct incomplete_array *ia =
|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|   ia->datasize = 10;
|   for (int i = 0; i < ia->datasize; ++i)
|     ia->data[i] = i * 1.234;
| 
|   // Check named initializers.
|   struct named_init ni = {
|     .number = 34,
|     .name = L"Test wide string",
|     .average = 543.34343,
|   };
| 
|   ni.number = 58;
| 
|   int dynamic_array[ni.number];
|   dynamic_array[ni.number - 1] = 543;
| 
|   // work around unused variable warnings
|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
| 	  || dynamic_array[ni.number - 1] != 543);
| 
|   ;
|   return 0;
| }
configure:8135: x86_64-apple-darwin15-gcc -qlanglvl=extc99 -c -g   conftest.c >&5
x86_64-apple-darwin15-gcc: error: unrecognized command line option '-qlanglvl=extc99'
configure:8141: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
| // Check varargs and va_copy.
| static void
| test_varargs (const char *format, ...)
| {
|   va_list args;
|   va_start (args, format);
|   va_list args_copy;
|   va_copy (args_copy, args);
| 
|   const char *str;
|   int number;
|   float fnumber;
| 
|   while (*format)
|     {
|       switch (*format++)
| 	{
| 	case 's': // string
| 	  str = va_arg (args_copy, const char *);
| 	  break;
| 	case 'd': // int
| 	  number = va_arg (args_copy, int);
| 	  break;
| 	case 'f': // float
| 	  fnumber = va_arg (args_copy, double);
| 	  break;
| 	default:
| 	  break;
| 	}
|     }
|   va_end (args_copy);
|   va_end (args);
| }
| 
| int
| main ()
| {
| 
|   // Check bool.
|   _Bool success = false;
| 
|   // Check restrict.
|   if (test_restrict ("String literal") == 0)
|     success = true;
|   char *restrict newvar = "Another string";
| 
|   // Check varargs.
|   test_varargs ("s, d' f .", "string", 65, 34.234);
|   test_varargs_macros ();
| 
|   // Check flexible array members.
|   struct incomplete_array *ia =
|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|   ia->datasize = 10;
|   for (int i = 0; i < ia->datasize; ++i)
|     ia->data[i] = i * 1.234;
| 
|   // Check named initializers.
|   struct named_init ni = {
|     .number = 34,
|     .name = L"Test wide string",
|     .average = 543.34343,
|   };
| 
|   ni.number = 58;
| 
|   int dynamic_array[ni.number];
|   dynamic_array[ni.number - 1] = 543;
| 
|   // work around unused variable warnings
|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
| 	  || dynamic_array[ni.number - 1] != 543);
| 
|   ;
|   return 0;
| }
configure:8167: result: unsupported
configure:8177: checking for x86_64-apple-darwin15-gcc option to accept ISO C89
configure:8283: result: unsupported
configure:8301: checking for x86_64-apple-darwin15-gcc option to accept ISO Standard C
configure:8308: result: unsupported
configure:8322: checking how to run the C preprocessor
configure:8362: x86_64-apple-darwin15-gcc -E  conftest.c
In file included from /opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/syslimits.h:7:0,
                 from /opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/limits.h:34,
                 from conftest.c:13:
/opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
 #include_next <limits.h>  /* recurse down to the real one */
                                                             ^
compilation terminated.
configure:8368: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8362: x86_64-apple-darwin15-gcc -E  conftest.c
In file included from /opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/syslimits.h:7:0,
                 from /opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/limits.h:34,
                 from conftest.c:13:
/opt/gcc-6.1.0/lib/gcc/x86_64-apple-darwin15/6.1.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
 #include_next <limits.h>  /* recurse down to the real one */
                                                             ^
compilation terminated.
configure:8368: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8362: x86_64-apple-darwin15-gcc -E -traditional-cpp  conftest.c
conftest.c:15:0: fatal error: assert.h: No such file or directory
 # include <assert.h>
 
compilation terminated.
configure:8368: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8362: x86_64-apple-darwin15-gcc -E -traditional-cpp  conftest.c
conftest.c:15:0: fatal error: assert.h: No such file or directory
 # include <assert.h>
 
compilation terminated.
configure:8368: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8362: /lib/cpp  conftest.c
/Users/laguest/gcc/source/gcc-6.2.0/gmp/configure: line 8363: /lib/cpp: No such file or directory
configure:8368: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8362: /lib/cpp  conftest.c
/Users/laguest/gcc/source/gcc-6.2.0/gmp/configure: line 8363: /lib/cpp: No such file or directory
configure:8368: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8438: result: /lib/cpp
configure:8467: /lib/cpp  conftest.c
/Users/laguest/gcc/source/gcc-6.2.0/gmp/configure: line 8468: /lib/cpp: No such file or directory
configure:8473: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8467: /lib/cpp  conftest.c
/Users/laguest/gcc/source/gcc-6.2.0/gmp/configure: line 8468: /lib/cpp: No such file or directory
configure:8473: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GNU MP"
| #define PACKAGE_TARNAME "gmp"
| #define PACKAGE_VERSION "4.3.2"
| #define PACKAGE_STRING "GNU MP 4.3.2"
| #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
| #define PACKAGE "gmp"
| #define VERSION "4.3.2"
| #define WANT_FFT 1
| #define HAVE_HOST_CPU_none 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:8535: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin15
ac_cv_c_compiler_gnu=yes
ac_cv_env_ABI_set=
ac_cv_env_ABI_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_BUILD_set=set
ac_cv_env_CC_FOR_BUILD_value=x86_64-apple-darwin15-gcc
ac_cv_env_CC_set=set
ac_cv_env_CC_value=x86_64-apple-darwin15-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g '
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_FOR_BUILD_set=
ac_cv_env_CPP_FOR_BUILD_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-g '
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='x86_64-apple-darwin15-g++ -std=gnu++98'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-static-libstdc++ -static-libgcc -Wl,-no_pie '
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_M4_set=set
ac_cv_env_M4_value=gm4
ac_cv_env_YACC_set=set
ac_cv_env_YACC_value='bison -y'
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-apple-darwin15
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=none-apple-darwin15
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=none-apple-darwin15
ac_cv_host=none-apple-darwin15
ac_cv_objext=o
ac_cv_prog_AWK=awk
ac_cv_prog_CC=x86_64-apple-darwin15-gcc
ac_cv_prog_CPP=/lib/cpp
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_c89=no
ac_cv_prog_cc_c99=no
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=no
ac_cv_prog_make__Applications_Xcode_app_Contents_Developer_usr_bin_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ABI=''
ACLOCAL='${SHELL} /Users/laguest/gcc/source/gcc-6.2.0/gmp/missing --run aclocal-1.8'
AMTAR='${SHELL} /Users/laguest/gcc/source/gcc-6.2.0/gmp/missing --run tar'
ANSI2KNR=''
AR='ar'
AS='as'
ASMFLAGS=''
AUTOCONF='${SHELL} /Users/laguest/gcc/source/gcc-6.2.0/gmp/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/laguest/gcc/source/gcc-6.2.0/gmp/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/laguest/gcc/source/gcc-6.2.0/gmp/missing --run automake-1.8'
AWK='awk'
BITS_PER_MP_LIMB=''
CALLING_CONVENTIONS_OBJS=''
CC='x86_64-apple-darwin15-gcc'
CCAS=''
CC_FOR_BUILD='x86_64-apple-darwin15-gcc'
CFLAGS='-g '
CPP='/lib/cpp'
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX='x86_64-apple-darwin15-g++ -std=gnu++98'
CXXCPP=''
CXXFLAGS='-g '
CYGPATH_W='echo'
DEFN_LONG_LONG_LIMB='/* #undef _LONG_LONG_LIMB */'
DEFS=''
DLLTOOL='dlltool'
ECHO='/bin/echo'
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
GMP_LDFLAGS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='/usr/bin/install -c -m 644'
INSTALL_PROGRAM='/usr/bin/install -c'
INSTALL_SCRIPT='/usr/bin/install -c'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS='-static-libstdc++ -static-libgcc -Wl,-no_pie '
LEX='touch lex.yy.c'
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
M4='gm4'
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='makeinfo --split-size=5000000 --split-size=5000000'
OBJDUMP='objdump'
OBJEXT='o'
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs@gmplib.org'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 4.3.2'
PACKAGE_TARNAME='gmp'
PACKAGE_VERSION='4.3.2'
PATH_SEPARATOR=':'
RANLIB='ranlib'
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ=''
STRIP='strip'
TAL_OBJECT=''
TUNE_SQR_OBJ=''
U=''
U_FOR_BUILD=''
VERSION='4.3.2'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WANT_MPBSD_FALSE=''
WANT_MPBSD_TRUE='#'
WITH_READLINE_01=''
YACC='bison -y'
YFLAGS=''
ac_ct_CC=''
ac_ct_CXX=''
am__leading_dot='.'
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin15'
build_alias='x86_64-apple-darwin15'
build_cpu='x86_64'
build_os='darwin15'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='none-apple-darwin15'
host_alias='none-apple-darwin15'
host_cpu='none'
host_os='darwin15'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/Users/laguest/gcc/source/gcc-6.2.0/gmp/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(install_sh) -d'
mpn_objects=''
mpn_objs_in_libgmp=''
mpn_objs_in_libmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/opt/gcc-6.2.0'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='none-apple-darwin15'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "4.3.2"
#define PACKAGE_STRING "GNU MP 4.3.2"
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org"
#define PACKAGE "gmp"
#define VERSION "4.3.2"
#define WANT_FFT 1
#define HAVE_HOST_CPU_none 1

configure: exit 1

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06  7:57 ` Simon Wright
                     ` (2 preceding siblings ...)
  2016-10-06 16:23   ` Lucretia
@ 2016-10-06 16:26   ` Lucretia
  2016-10-06 16:29     ` Lucretia
  3 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 16:26 UTC (permalink / raw)


Also, I'm on El Capitan. My Mini is old.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:26   ` Lucretia
@ 2016-10-06 16:29     ` Lucretia
  2016-10-06 16:54       ` Simon Wright
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 16:29 UTC (permalink / raw)


Basically, in the config, it's not finding the C includes because they're hidden away on Mac OS X in the /Library.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 10:54   ` Luke A. Guest
@ 2016-10-06 16:30     ` Simon Wright
  2016-10-06 16:41       ` Lucretia
  2016-10-06 16:51       ` Lucretia
  0 siblings, 2 replies; 22+ messages in thread
From: Simon Wright @ 2016-10-06 16:30 UTC (permalink / raw)


Luke A. Guest <laguest@archeia.com> writes:

> Simon Wright <simon@pushface.org> wrote:
>> Lucretia <laguest9000@googlemail.com> writes:
>> 
>>> I'm trying to replicate your build of 6.1.0 for mac so I get an
>>> understanding of the build process on Mac. Problem is, it's
>>> failing. There must be more than what you are telling going on on your
>>> platform.
>> 
>>> checking how to run the C++ preprocessor... /lib/cpp
>>> configure: error: in `/Users/laguest/gcc/build/gcc-6.1.0/gmp':
>>> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
>>> See `config.log' for more details

>> I couldn't reproduce the problem; maybe I made some change which is
>> still there. I don't have any notes about it, but if I did have this
>> problem I would have started looking in config.log.
>
> Yeah I did.
>
>> This message comes from gmp/configure:10323. Why it's looking for
>> /lib/cpp I don't know (/lib doesn't exist); it should be using "g++ -E".
>
> Yea, but if you look , it tries two variations of the above then
> /lib/cpp.  Not sure if that's a mac specific thing, I think it is,
> need to check the actual configure script.  If so this needs a patch i
> think to call xcrun instead, but then I don't know if this is supposed
> to used apple's cop or the GCC one from the cross compiler you
> provided.

The GMP 5.1.3 config seems not to want to use C++, and it's disabled
unless you say --enable-cxx; and I doubt that's done if gmp is linked
into the top-level GCC directory.

> Did you build gmp, mpc, mpfr and isl with apple's tools or with GCC?
> Did you just link in the firs into the GCC root dir?

I've always (since I read that it was possible) linked the maths
packages into the top-level GCC directory and let GCC build them.

   gmp-5.1.3
   mpc-1.0.2
   mpfr-3.1.2


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:30     ` Simon Wright
@ 2016-10-06 16:41       ` Lucretia
  2016-10-06 19:15         ` Simon Wright
  2016-10-06 16:51       ` Lucretia
  1 sibling, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 16:41 UTC (permalink / raw)


On Thursday, 6 October 2016 17:30:16 UTC+1, Simon Wright  wrote:
> Luke A. Guest  writes:
> The GMP 5.1.3 config seems not to want to use C++, and it's disabled
> unless you say --enable-cxx; and I doubt that's done if gmp is linked
> into the top-level GCC directory.

I did grep gcc sources to see if anything utilised the gmpcxx.h and it didn't, so tried building separate libs and without c++ support enabled as that flag was causing all kinds of problems. like I said, I managed to get them to build using the system cc just not your gcc.

> > Did you build gmp, mpc, mpfr and isl with apple's tools or with GCC?
> > Did you just link in the firs into the GCC root dir?
> 
> I've always (since I read that it was possible) linked the maths
> packages into the top-level GCC directory and let GCC build them.
> 
>    gmp-5.1.3
>    mpc-1.0.2
>    mpfr-3.1.2

and ISL? Which version?

I have always built them separately. But in this case, I'm trying integrated into the dir.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:30     ` Simon Wright
  2016-10-06 16:41       ` Lucretia
@ 2016-10-06 16:51       ` Lucretia
  2016-10-06 19:09         ` Simon Wright
  1 sibling, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 16:51 UTC (permalink / raw)


Do you have a /usr/include on your machine?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:29     ` Lucretia
@ 2016-10-06 16:54       ` Simon Wright
  2016-10-06 17:14         ` Lucretia
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Wright @ 2016-10-06 16:54 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> Basically, in the config, it's not finding the C includes because
> they're hidden away on Mac OS X in the /Library.

I don't recall doing anything special to get the C include files in the
standard place, i.e. /usr/include, but this answer
http://superuser.com/a/1014872 looks as though it's what I must have
done.

I've taken to installing just the command line tools, as Ondřej
suggests, because I don't have any reason to use Xcode.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:54       ` Simon Wright
@ 2016-10-06 17:14         ` Lucretia
  2016-10-06 18:13           ` Lucretia
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 17:14 UTC (permalink / raw)


On Thursday, 6 October 2016 17:54:50 UTC+1, Simon Wright  wrote:
> Lucretia <meh@meh.com> writes:
> 
> > Basically, in the config, it's not finding the C includes because
> > they're hidden away on Mac OS X in the /Library.
> 
> I don't recall doing anything special to get the C include files in the
> standard place, i.e. /usr/include, but this answer
> http://superuser.com/a/1014872 looks as though it's what I must have
> done.
> 
> I've taken to installing just the command line tools, as Ondřej
> suggests, because I don't have any reason to use Xcode.

Aaaaand, that seems to be working. Thanks! Should be able to build an iPhone compiler once this is done, Fun times!

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 17:14         ` Lucretia
@ 2016-10-06 18:13           ` Lucretia
  2016-10-06 19:08             ` Simon Wright
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 18:13 UTC (permalink / raw)


On Thursday, 6 October 2016 18:14:28 UTC+1, Lucretia  wrote:

> Aaaaand, that seems to be working. Thanks! Should be able to build an iPhone compiler once this is done, Fun times!

I do wonder whether it should use the system libstdc++ rather than build the gcc one.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 18:13           ` Lucretia
@ 2016-10-06 19:08             ` Simon Wright
  2016-10-06 19:29               ` Lucretia
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Wright @ 2016-10-06 19:08 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> On Thursday, 6 October 2016 18:14:28 UTC+1, Lucretia  wrote:
>
>> Aaaaand, that seems to be working. Thanks! Should be able to build an
>> iPhone compiler once this is done, Fun times!
>
> I do wonder whether it should use the system libstdc++ rather than
> build the gcc one.

Building against the gcc one causes problems when some of the symbols
aren't defined in the system one.

  build/genpreds -h ../../gcc-6.1.0/gcc/common.md ../../gcc-6.1.0/gcc/config/i386/i386.md > tmp-preds.h
  dyld: Symbol not found: __ZdlPvm
    Referenced from: /Users/simon/tmp/gcc-6.1.0-build/gcc/build/genpreds (which was built for Mac OS X 10.11)
    Expected in: /usr/lib/libstdc++.6.dylib
   in /Users/simon/tmp/gcc-6.1.0-build/gcc/build/genpreds

which I fixed by moving the just-built GCC libstdc++.6.dylib to the
place it's expected to be, in my case /opt/gcc-6.1.0/lib, and then
carrying on with the build.

I haven't reported this; perhaps -static-libstdc++ needed in
--with-boot-ldflags? This is a complicated and timeconsuming area to
investigate.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:51       ` Lucretia
@ 2016-10-06 19:09         ` Simon Wright
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Wright @ 2016-10-06 19:09 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> Do you have a /usr/include on your machine?

Yes (as discussed downthread).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 16:41       ` Lucretia
@ 2016-10-06 19:15         ` Simon Wright
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Wright @ 2016-10-06 19:15 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

>> > Did you build gmp, mpc, mpfr and isl with apple's tools or with GCC?
>> > Did you just link in the firs into the GCC root dir?
>> 
>> I've always (since I read that it was possible) linked the maths
>> packages into the top-level GCC directory and let GCC build them.
>> 
>>    gmp-5.1.3
>>    mpc-1.0.2
>>    mpfr-3.1.2
>
> and ISL? Which version?

I don't have it (so I don't get the Graphite loop optimisations). But
personally I would avoid aggressive/unusual optimisations; If -O2 was
good enough for Nelson, it's good enough for me.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 19:08             ` Simon Wright
@ 2016-10-06 19:29               ` Lucretia
  2016-10-06 22:16                 ` Lucretia
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 19:29 UTC (permalink / raw)


On Thursday, 6 October 2016 20:08:56 UTC+1, Simon Wright  wrote:
> Lucretia  writes:
> 
> > On Thursday, 6 October 2016 18:14:28 UTC+1, Lucretia  wrote:
> >
> >> Aaaaand, that seems to be working. Thanks! Should be able to build an
> >> iPhone compiler once this is done, Fun times!
> >
> > I do wonder whether it should use the system libstdc++ rather than
> > build the gcc one.
> 
> Building against the gcc one causes problems when some of the symbols
> aren't defined in the system one.
> 
>   build/genpreds -h ../../gcc-6.1.0/gcc/common.md ../../gcc-6.1.0/gcc/config/i386/i386.md > tmp-preds.h
>   dyld: Symbol not found: __ZdlPvm
>     Referenced from: /Users/simon/tmp/gcc-6.1.0-build/gcc/build/genpreds (which was built for Mac OS X 10.11)
>     Expected in: /usr/lib/libstdc++.6.dylib
>    in /Users/simon/tmp/gcc-6.1.0-build/gcc/build/genpreds

I just had this exact error!

> 
> which I fixed by moving the just-built GCC libstdc++.6.dylib to the
> place it's expected to be, in my case /opt/gcc-6.1.0/lib, and then
> carrying on with the build.
> 
> I haven't reported this; perhaps -static-libstdc++ needed in
> --with-boot-ldflags? This is a complicated and timeconsuming area to
> investigate.

I'll try it.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 19:29               ` Lucretia
@ 2016-10-06 22:16                 ` Lucretia
  2016-10-07  7:26                   ` Simon Wright
  0 siblings, 1 reply; 22+ messages in thread
From: Lucretia @ 2016-10-06 22:16 UTC (permalink / raw)


Just so people know what I did and it's archived forever:

# Install the command line tools
$ xcode-select --install

$ ../../source/gcc-6.2.0/configure --prefix=/opt/gcc-6.2.0 --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch --disable-libsanitizer --disable-libcc1 --disable-libcilkrts --disable-multilib --disable-nls --enable-languages=c,c++,ada,fortran,objc,obj-c++ --host=x86_64-apple-darwin15 --build=x86_64-apple-darwin15 --target=x86_64-apple-darwin15 --with-boot-ldflags='-Wl,-headerpad_max_install_names -shared-libgcc' --disable-libstdcxx  2>&1|tee log.config.txt

$ make -j4 2>&1 |tee log.make.txt


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-06 22:16                 ` Lucretia
@ 2016-10-07  7:26                   ` Simon Wright
  2016-10-07  9:24                     ` Luke A. Guest
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Wright @ 2016-10-07  7:26 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> writes:

> Just so people know what I did and it's archived forever:
>
> # Install the command line tools
> $ xcode-select --install
>
> $ ../../source/gcc-6.2.0/configure --prefix=/opt/gcc-6.2.0
> --without-libiconv-prefix --disable-libmudflap --disable-libstdcxx-pch
> --disable-libsanitizer --disable-libcc1 --disable-libcilkrts
> --disable-multilib --disable-nls
> --enable-languages=c,c++,ada,fortran,objc,obj-c++
> --host=x86_64-apple-darwin15 --build=x86_64-apple-darwin15
> --target=x86_64-apple-darwin15
> --with-boot-ldflags='-Wl,-headerpad_max_install_names -shared-libgcc'
> --disable-libstdcxx 2>&1|tee log.config.txt
>
> $ make -j4 2>&1 |tee log.make.txt

Thank you.

Does --disable-libstdcxx stop building libstdc++*.dylib?

For info, that list of targets is longer than most of us would need! I
included Fortran because I was developing my gnat-math-extn project on
Sourceforge, and Objective C[++] on request.

Also, the configure flag --with-boot-ldflags supports relocation of the
built binary, and (together with the patch gcc-6.1.0.diff), suppresses
GCC PR 61027.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-07  7:26                   ` Simon Wright
@ 2016-10-07  9:24                     ` Luke A. Guest
  2016-10-07 13:20                       ` Simon Wright
  2016-10-08 11:28                       ` Lucretia
  0 siblings, 2 replies; 22+ messages in thread
From: Luke A. Guest @ 2016-10-07  9:24 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:

> 
> Does --disable-libstdcxx stop building libstdc++*.dylib?
>

Yes. Given that GCC just uses the host Linux, it really should use the host
libc++ as well, especially for iOS where, it looks like, the Dylan's are in
the firmware image on the hardware.

But I'm new to Apple stuff, even though I bought this old Mac for iOS dev a
few years back, never got very far.

> For info, that list of targets is longer than most of us would need! I
> included Fortran because I was developing my gnat-math-extn project on
> Sourceforge, and Objective C[++] on request.
> 

Yeah, as long as we can interface to objc, but it's nice to have the option
I suppose. 

How well does Ada bind to objc? I know the objc language just calls c
functions in the objc runtime underneath.

> Also, the configure flag --with-boot-ldflags supports relocation of the
> built binary, and (together with the patch gcc-6.1.0.diff), suppresses
> GCC PR 61027.
> 

I don't know anything about this. 

The only thing I've done with Ada so far is to test SDLAda on Mac.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-07  9:24                     ` Luke A. Guest
@ 2016-10-07 13:20                       ` Simon Wright
  2016-10-08 11:28                       ` Lucretia
  1 sibling, 0 replies; 22+ messages in thread
From: Simon Wright @ 2016-10-07 13:20 UTC (permalink / raw)


Luke A. Guest <laguest@archeia.com> writes:

> Simon Wright <simon@pushface.org> wrote:

> How well does Ada bind to objc? I know the objc language just calls c
> functions in the objc runtime underneath.

Sorry, I just did as I was asked without knowing much at all about
objc. The last time I tried there were quite a lot of check failures.

>> Also, the configure flag --with-boot-ldflags supports relocation of
>> the built binary, and (together with the patch gcc-6.1.0.diff),
>> suppresses GCC PR 61027.
>
> I don't know anything about this.

If you can say "gnatchop --help" and not get a SEGV, you are OK

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: to Simon Wright, re Mac OS X builds
  2016-10-07  9:24                     ` Luke A. Guest
  2016-10-07 13:20                       ` Simon Wright
@ 2016-10-08 11:28                       ` Lucretia
  1 sibling, 0 replies; 22+ messages in thread
From: Lucretia @ 2016-10-08 11:28 UTC (permalink / raw)


On Friday, 7 October 2016 10:24:37 UTC+1, Luke A. Guest  wrote:

> Yes. Given that GCC just uses the host Linux, it really should use the host
> libc++ as well, especially for iOS where, it looks like, the Dylan's are in
> the firmware image on the hardware.

Bloody autocomplete on my phone!!

I do wonder if we should be building libstdc++ libs as the system one was design, apparently, to be abi compatible to the gcc one. so if dynamic linking is used, the installed package would just use the system one.

But right now, GCC doesn't support arm-apple-darwin*, so that needs to be ported or use the old files that apple wrote and update them.

Luke.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-10-08 11:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 15:14 to Simon Wright, re Mac OS X builds Lucretia
2016-10-06  7:57 ` Simon Wright
2016-10-06 10:54   ` Luke A. Guest
2016-10-06 16:30     ` Simon Wright
2016-10-06 16:41       ` Lucretia
2016-10-06 19:15         ` Simon Wright
2016-10-06 16:51       ` Lucretia
2016-10-06 19:09         ` Simon Wright
2016-10-06 14:38   ` Luke A. Guest
2016-10-06 16:23   ` Lucretia
2016-10-06 16:26   ` Lucretia
2016-10-06 16:29     ` Lucretia
2016-10-06 16:54       ` Simon Wright
2016-10-06 17:14         ` Lucretia
2016-10-06 18:13           ` Lucretia
2016-10-06 19:08             ` Simon Wright
2016-10-06 19:29               ` Lucretia
2016-10-06 22:16                 ` Lucretia
2016-10-07  7:26                   ` Simon Wright
2016-10-07  9:24                     ` Luke A. Guest
2016-10-07 13:20                       ` Simon Wright
2016-10-08 11:28                       ` Lucretia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox