Difference between revisions of "GMP"
From CBLFS
Jump to navigationJump to search (→64Bit) |
(→64Bit) |
||
Line 69: | Line 69: | ||
mv -v /usr/include/gmp{,-64}.h | mv -v /usr/include/gmp{,-64}.h | ||
− | + | {{Stub-Header|gmp.h}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:32, 26 December 2006
Download Source: | ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.1.tar.bz2 |
---|
Contents
Introduction to GMP
The GMP package contains math libraries. These have useful functions for arbitrary precision arithmetic.
Dependencies
Non-Multilib
Compile the package:
./configure --prefix=/usr --enable-cxx \ --enable-mpbsd && make
Install the package
make install
Multilib
32Bit
Compile the package:
CC="gcc ${BUILD32}" ./configure --prefix=/usr \ --host=${CLFS_TARGET32} --enable-cxx \ --enable-mpbsd && make
Install the package
make install && mv -v /usr/include/gmp{,-32}.h
N32
Compile the package:
CC="gcc ${BUILDN32}" ./configure --prefix=/usr \ --libdir=/usr/lib32 --enable-cxx \ --enable-mpbsd && make
Install the package
make install && mv -v /usr/include/gmp{,-n32}.h
64Bit
Compile the package:
CC="gcc ${BUILD64}" ./configure --prefix=/usr \ --libdir=/usr/lib64 --enable-cxx \ --enable-mpbsd && make
Install the package
make install && mv -v /usr/include/gmp{,-64}.h
Creating a Stub Header (Multilib Only)
Creating a Generic Stub Header
cat > /usr/include/gmp.h.h << "EOF" /* gmp.h.h - Stub Header */ #ifndef __STUB__GMP.H_H__ #define __STUB__GMP.H_H__ #if defined(__x86_64__) || \ defined(__sparc64__) || \ defined(__arch64__) || \ defined(__powerpc64__) || \ defined (__s390x__) # include "gmp.h-64.h" #else # include "gmp.h-32.h" #endif #endif /* __STUB__GMP.H_H__ */ EOF
Creating a Stub Header For Mips
cat > /usr/include/gmp.h.h << "EOF" /* gmp.h.h - Stub Header */ #ifndef __STUB__GMP.H_H__ #define __STUB__GMP.H_H__ #include <sgidefs.h> #if (_MIPS_SIM == _ABIO32) # include "gmp.h-32.h" #elif (_MIPS_SIM == _ABIN32) # include "gmp.h-n32.h" #elif (_MIPS_SIM == _ABI64) # include "gmp.h-64.h" #endif #endif /* __STUB__GMP.H_H__ */ EOF