summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gmp/gmp/configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gmp/gmp/configure.patch')
-rw-r--r--meta/recipes-support/gmp/gmp/configure.patch222
1 files changed, 222 insertions, 0 deletions
diff --git a/meta/recipes-support/gmp/gmp/configure.patch b/meta/recipes-support/gmp/gmp/configure.patch
new file mode 100644
index 0000000000..349da3c6b0
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/configure.patch
@@ -0,0 +1,222 @@
1Upstream-Status: Pending
2
3Updated to apply to gmp-5.1.0
4
5Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
6
7---
8 acinclude.m4 | 32 +++++++++++++++++---------------
9 configure.ac | 26 +++++++++-----------------
10 2 files changed, 26 insertions(+), 32 deletions(-)
11
12diff --git a/acinclude.m4 b/acinclude.m4
13index 227712a..199aa6f 100644
14--- a/acinclude.m4
15+++ b/acinclude.m4
16@@ -40,29 +40,29 @@ dnl a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
17 dnl conftest.exe - various DOS compilers
18
19
20-define(IA64_PATTERN,
21+define([IA64_PATTERN],
22 [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
23
24 dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
25 dnl of which config.sub accepts. (Though none of which are likely to work
26 dnl with GMP.)
27 dnl
28-define(M68K_PATTERN,
29+define([M68K_PATTERN],
30 [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
31
32-define(POWERPC64_PATTERN,
33+define([POWERPC64_PATTERN],
34 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
35
36-define(S390_PATTERN,
37+define([S390_PATTERN],
38 [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
39
40-define(S390X_PATTERN,
41+define([S390X_PATTERN],
42 [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
43
44-define(X86_PATTERN,
45+define([X86_PATTERN],
46 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
47
48-define(X86_64_PATTERN,
49+define([X86_64_PATTERN],
50 [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
51
52 dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
53@@ -80,7 +80,7 @@ dnl x86 -> x86
54 dnl x86/k6 -> k6
55 dnl x86/k6/mmx -> k6_mmx
56
57-define(GMP_FAT_SUFFIX,
58+define([GMP_FAT_SUFFIX],
59 [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
60
61
62@@ -89,7 +89,7 @@ dnl ----------------------------------
63 dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
64 dnl shell expression like $foo if desired.
65
66-define(GMP_REMOVE_FROM_LIST,
67+define([GMP_REMOVE_FROM_LIST],
68 [remove_from_list_tmp=
69 for remove_from_list_i in $[][$1]; do
70 if test $remove_from_list_i = [$2]; then :;
71@@ -105,12 +105,12 @@ dnl GMP_STRIP_PATH(subdir)
72 dnl ----------------------
73 dnl Strip entries */subdir from $path and $fat_path.
74
75-define(GMP_STRIP_PATH,
76+define([GMP_STRIP_PATH],
77 [GMP_STRIP_PATH_VAR(path, [$1])
78 GMP_STRIP_PATH_VAR(fat_path, [$1])
79 ])
80
81-define(GMP_STRIP_PATH_VAR,
82+define([GMP_STRIP_PATH_VAR],
83 [tmp_path=
84 for i in $[][$1]; do
85 case $i in
86@@ -131,7 +131,7 @@ dnl
87 dnl Dummy value for GMP_LIMB_BITS is enough
88 dnl for all current configure-time uses of gmp.h.
89
90-define(GMP_INCLUDE_GMP_H,
91+define([GMP_INCLUDE_GMP_H],
92 [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
93 #define GMP_NAIL_BITS $GMP_NAIL_BITS
94 #define GMP_LIMB_BITS 123
95@@ -146,7 +146,7 @@ dnl Expand at autoconf time to the value of a "#define NAME" from the given
96 dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
97 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
98
99-define(GMP_HEADER_GETVAL,
100+define([GMP_HEADER_GETVAL],
101 [patsubst(patsubst(
102 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
103 [^.*$1[ ]+],[]),
104@@ -160,7 +160,7 @@ dnl The gmp version number, extracted from the #defines in gmp-h.in at
105 dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
106 dnl like 3.0.1 if patchlevel > 0.
107
108-define(GMP_VERSION,
109+define([GMP_VERSION],
110 [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
111 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
112 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
113@@ -1524,7 +1524,9 @@ esac
114 echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
115
116 # All CPUs use asm-defs.m4
117-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
118+echo -n ["include("] >>$gmp_tmpconfigm4i
119+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
120+echo [")"] >>$gmp_tmpconfigm4i
121 ])
122
123
124diff --git a/configure.ac b/configure.ac
125index 64b2c50..f07b821 100644
126--- a/configure.ac
127+++ b/configure.ac
128@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
129 AC_PREREQ(2.59)
130 AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
131 AC_CONFIG_SRCDIR(gmp-impl.h)
132-m4_pattern_forbid([^[ \t]*GMP_])
133-m4_pattern_allow(GMP_LDFLAGS)
134-m4_pattern_allow(GMP_LIMB_BITS)
135-m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
136-m4_pattern_allow(GMP_NAIL_BITS)
137-m4_pattern_allow(GMP_NUMB_BITS)
138-m4_pattern_allow(GMP_NONSTD_ABI)
139-m4_pattern_allow(GMP_CPU_TYPE)
140
141 # If --target is not used then $target_alias is empty, but if say
142 # "./configure athlon-pc-freebsd3.5" is used, then all three of
143@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
144 # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
145 # called. User selections of CC etc are respected.
146 #
147-# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
148+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
149 # pre-testing, since they of course depend on AC_PROG_CC, and also some of
150 # them cache their results, which is not wanted.
151 #
152@@ -440,7 +432,7 @@ abilist="standard"
153 # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
154 # c89 over cc here. But note that on HP-UX c89 provides a castrated
155 # environment, and would want to be excluded somehow. Maybe
156-# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
157+# already does enough to stick cc into ANSI mode and
158 # we don't need to worry.
159 #
160 cclist="gcc cc"
161@@ -1843,7 +1835,7 @@ esac
162 CFLAGS_or_unset=${CFLAGS-'(unset)'}
163 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
164
165-cat >&AC_FD_CC <<EOF
166+cat >&AS_MESSAGE_LOG_FD() <<EOF
167 User:
168 ABI=$ABI
169 CC=$CC
170@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
171
172 # The C compiler and preprocessor, put into ANSI mode if possible.
173 AC_PROG_CC
174-AC_PROG_CC_STDC
175 AC_PROG_CPP
176
177
178@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
179
180 # The C++ compiler, if desired.
181 want_cxx=no
182+AC_PROG_CXX
183 if test $enable_cxx != no; then
184 test_CXXFLAGS=${CXXFLAGS+set}
185- AC_PROG_CXX
186
187- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
188+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
189 cxxflags_ac_prog_cxx=$CXXFLAGS
190 cxxflags_list=ac_prog_cxx
191
192@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
193 fi
194
195
196-cat >&AC_FD_CC <<EOF
197+cat >&AS_MESSAGE_LOG_FD() <<EOF
198 Decided:
199 ABI=$ABI
200 CC=$CC
201@@ -3781,7 +3772,7 @@ GMP_FINISH
202 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
203 # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
204
205-AC_OUTPUT(Makefile \
206+AC_CONFIG_FILES([Makefile \
207 mpf/Makefile mpn/Makefile mpq/Makefile \
208 mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
209 tests/Makefile tests/devel/Makefile \
210@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile \
211 tests/cxx/Makefile \
212 doc/Makefile tune/Makefile \
213 demos/Makefile demos/calc/Makefile demos/expr/Makefile \
214- gmp.h:gmp-h.in)
215+ gmp.h:gmp-h.in])
216+AC_OUTPUT
217
218 AC_MSG_NOTICE([summary of build options:
219
220--
2211.9.1
222