diff options
| -rw-r--r-- | meta/packages/gmp/gmp-4.2.1/disable-stdc.patch | 31 | ||||
| -rw-r--r-- | meta/packages/gmp/gmp_4.2.1.bb | 14 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/packages/gmp/gmp-4.2.1/disable-stdc.patch b/meta/packages/gmp/gmp-4.2.1/disable-stdc.patch new file mode 100644 index 0000000000..83c9eae36a --- /dev/null +++ b/meta/packages/gmp/gmp-4.2.1/disable-stdc.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # "extern inline" in traditional gcc means that the function should be | ||
| 2 | # inlined wherever it's seen, while in C99, "extern inline" means that i | ||
| 3 | # the function should only be inlined where the inline definition is | ||
| 4 | # seen while in other places it's not inlined: | ||
| 5 | # http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html | ||
| 6 | # | ||
| 7 | # gmp checks "--std=gnu99" to use C99 convention however it internally | ||
| 8 | # defines some "extern inline" functions in gmp.h, which is included | ||
| 9 | # by mainly .c files and finally lead a flood of redefinition function | ||
| 10 | # errors when linking objects together. | ||
| 11 | # | ||
| 12 | # So disable C99/ANSI detection to stick to tranditional gcc behavior | ||
| 13 | # | ||
| 14 | # by Kevin Tian <kevin.tian@intel.com>, 2010-08-13 | ||
| 15 | # | ||
| 16 | # (this patch is licensed under GPLv2+) | ||
| 17 | |||
| 18 | diff --git a/configure.in b/configure.in | ||
| 19 | index 450cc92..aab0b59 100644 | ||
| 20 | --- a/configure.in | ||
| 21 | +++ b/configure.in | ||
| 22 | @@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB) | ||
| 23 | |||
| 24 | # The C compiler and preprocessor, put into ANSI mode if possible. | ||
| 25 | AC_PROG_CC | ||
| 26 | -AC_PROG_CC_STDC | ||
| 27 | AC_PROG_CPP | ||
| 28 | -GMP_H_ANSI | ||
| 29 | |||
| 30 | |||
| 31 | # The C compiler on the build system, and associated tests. | ||
diff --git a/meta/packages/gmp/gmp_4.2.1.bb b/meta/packages/gmp/gmp_4.2.1.bb new file mode 100644 index 0000000000..d70dcf2665 --- /dev/null +++ b/meta/packages/gmp/gmp_4.2.1.bb | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers" | ||
| 2 | HOMEPAGE = "http://gmplib.org/" | ||
| 3 | BUGTRACKER = "http://gmplib.org/mailman/listinfo/gmp-bugs" | ||
| 4 | # demo is licensed under GPLv2+, which however we don't package at all | ||
| 5 | LICENSE = "LGPLv2.1+" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \ | ||
| 7 | file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \ | ||
| 8 | file://gmp-h.in;startline=6;endline=21;md5=5e25ffd16996faba8c1cd27b04b16099" | ||
| 9 | PR = "r0" | ||
| 10 | |||
| 11 | SRC_URI = "ftp://ftp.gnu.org/gnu/gmp/${BP}.tar.bz2 \ | ||
| 12 | file://disable-stdc.patch" | ||
| 13 | |||
| 14 | inherit autotools | ||
