1 $NetBSD: README,v 1.3 2012/03/20 08:21:38 mrg Exp $
3 GMP in NetBSD. We need GMP for GCC >= 4.2.
6 Building GMP without configure - how to port GMP build to a new platform.
8 The GMP build doesn't map very well to normal make. The ./configure phase
9 creates a bunch of symlinks and weeds out the sources lists, and there are
10 files with the same name in different subdirectories linked into the same
11 final product. All of these issues need to be dealt with.
13 There are a few steps to this:
15 - run ./configure, save the output
17 - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir,
18 and copy these files into it:
25 some of these files might have src/obj references. in particular
26 fix GMP_MPARAM_H_SUGGEST to start from ./mpn/... and make sure
27 we #define __GMP_CC to "gcc -std=gnu99". XXX make this automatic
30 - parse the ./configure output and note all created symlinks
31 for mpn. these need to be converted into a new Makefile.inc.
32 there is a script in this subdir build-gmp-Makefile.inc.awk
33 that can be used to do this. it should just work to generate
34 the first section of Makefile.inc if fed the entire configure
37 assembler files generally want -DOPERATION_${foo} defined for
38 each way they are compiled or pre-processed. the pre-processor
39 used is m4 to parse, and we and create .s files from the .asm
40 files that we then we feed into $CC.
42 The amd64 port is a good reference to compare. The trialdivtab.h
43 generation may need to be moved the into libgmp/Makefile itself.
46 This is still a work in progress and methods used to build may be