1$NetBSD: README,v 1.2 2011/06/29 01:38:27 simonb Exp $ 2 3GMP in NetBSD. We need GMP for GCC >= 4.2. 4 5 6Building GMP without configure - how to port GMP build to a new platform. 7 8The GMP build doesn't map very well to normal make. The ./configure phase 9creates a bunch of symlinks and weeds out the sources lists, and there are 10files with the same name in different subdirectories linked into the same 11final product. All of these issues need to be dealt with. 12 13There are a few steps to this: 14 15 - run ./configure, save the output 16 17 - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, 18 and copy these files into it: 19 config.h 20 config.m4 21 gmp-mparam.h 22 gmp.h 23 mp.h 24 25 - parse the ./configure output and note all created symlinks 26 for mpn. these need to be converted into a new Makefile.inc. 27 there is a script in this subdir build-gmp-Makefile.inc.awk 28 that can be used to do this. it should just work to generate 29 the first section of Makefile.inc if fed the entire configure 30 output. 31 32 assembler files generally want -DOPERATION_${foo} defined for 33 each way they are compiled or pre-processed. the pre-processor 34 used is m4 to parse, and we and create .s files from the .asm 35 files that we then we feed into $CC. 36 37The amd64 port is a good reference to compare. The trialdivtab.h 38generation may need to be moved the into libgmp/Makefile itself. 39 40 41This is still a work in progress and methods used to build may be 42changed at any time. 43 44 45mrg@netbsd.org 46- 2011/06/22 47