d186a20caf
to parse the GMP ./configure output and generate part of a makefile. move all the mpn build stuff into the MD part of the framework, and update the amd64 port to build all the parts it should. XXX: amd64 build fails to preprocess redc_1.asm gcd_1.asm mod_1_4.asm, XXX: so we're using the generic C versions for now. |
||
---|---|---|
.. | ||
dist | ||
lib/libgmp | ||
build-gmp-Makefile.inc.awk | ||
README |
$NetBSD: README,v 1.1 2011/06/24 03:50:23 mrg Exp $ GMP in NetBSD. We need GMP for GCC >= 4.2. Building GMP without configure - how to port GMP build to a new platform. The GMP build doesn't map very well to normal make. The ./configure phase creates a bunch of symlinks and weeds out the sources lists, and there are files with the same name in different subdirectories linked into the same final product. All of these issues need to be dealt with. There are a few steps to this: - run ./configure, save the output - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, and copy these files into it: config.h config.m4 gmp-mparam.h gmp.h mp.h - parse the ./configure output and note all created symlinks for mpn. these need to be converted into a new Makefile.inc. there is a script in this subdir build-gmp-Makefile.inc.awk that can be used to do this. it should just work to generate the first section of Makefile.inc if fed the entire configure output. assembler files generally want -DOPERATION_${foo} defined for each way they are compiled or pre-processed. the pre-processor used is m4 to parse, and we and create .s files from the .asm files that we then we feed into $CC. The amd64 port is a good reference to compare. The trialdivtab.h generation may need to be moved the into libgmp/Makefile itself. This is still a work in progress and methods used to build may be changed at any time. mrg@netbsd.org - 2001/06/22