2015-12-14 11:25:58 +00:00
|
|
|
From d3b9fc523fc11260ced890c35bc5c9e6391c8656 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
|
|
Date: Mon, 14 Dec 2015 14:19:49 +0200
|
|
|
|
Subject: [PATCH] Append the user provided flags to the auto-detected ones.
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
|
2015-12-14 11:25:58 +00:00
|
|
|
Upstream-Status: Inappropriate
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
2015-12-14 11:25:58 +00:00
|
|
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
|
|
---
|
|
|
|
configure.ac | 14 ++++++++++----
|
|
|
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
|
2015-12-14 11:25:58 +00:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index 9cedfeb..87caee5 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
|
|
|
@@ -1921,8 +1921,12 @@ cclist=$cclist
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
-test_CFLAGS=${CFLAGS+set}
|
|
|
|
-test_CPPFLAGS=${CPPFLAGS+set}
|
|
|
|
+test_CFLAGS=
|
|
|
|
+test_CPPFLAGS=
|
|
|
|
+
|
|
|
|
+user_CFLAGS=$CFLAGS
|
|
|
|
+user_CPPFLAGS=$CPPFLAGS
|
|
|
|
+user_CXXFLAGS=$CXXFLAGS
|
|
|
|
|
|
|
|
for abi in $abilist; do
|
|
|
|
abi_last="$abi"
|
2015-12-14 11:25:58 +00:00
|
|
|
@@ -2353,7 +2357,7 @@ AC_SUBST(CCAS)
|
|
|
|
# The C++ compiler, if desired.
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
want_cxx=no
|
|
|
|
if test $enable_cxx != no; then
|
|
|
|
- test_CXXFLAGS=${CXXFLAGS+set}
|
|
|
|
+ test_CXXFLAGS=
|
2015-12-14 11:25:58 +00:00
|
|
|
AC_PROG_CXX
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
|
2015-12-14 11:25:58 +00:00
|
|
|
echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
|
|
|
|
@@ -2381,7 +2385,7 @@ if test $enable_cxx != no; then
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
# Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
|
|
|
|
#
|
|
|
|
for cxxflags_choice in $cxxflags_list; do
|
|
|
|
- eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
|
|
|
|
+ eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice $user_CXXFLAGS\"
|
|
|
|
GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS,
|
|
|
|
[want_cxx=yes
|
|
|
|
break])
|
2015-12-14 11:25:58 +00:00
|
|
|
@@ -2477,6 +2481,8 @@ if test "$enable_assembly" = "no"; then
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
# done
|
|
|
|
fi
|
|
|
|
|
|
|
|
+CFLAGS="$CFLAGS $user_CFLAGS"
|
|
|
|
+CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
|
|
|
|
|
2015-12-14 11:25:58 +00:00
|
|
|
cat >&AC_FD_CC <<EOF
|
gmp: add configure.ac patch to append user provided compilation flags
gmp configure script is pretty good at auto detecting the ABI and the
tune flags that need to be passes to the compiler. However, the user
provided flags (CFLAGS, CXXFLAGS, CPPFLAGS) take precedence and the ABI
detection may fail, leading to configure errors like the one below:
| configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
| in this configuration expects 64 bits.
| You appear to have set $CFLAGS, perhaps you also need to tell GMP the
| intended ABI, see "ABI and ISA" in the manual.
One solution would be to change the recipe and add the ABI manually, or
let gmp do the job.
So, this patch will:
* allow the configure process to auto-detect the ABI and tune flags
properly;
* append our flags to the detected ones;
[YOCTO #5783]
(From OE-Core rev: 8339b9ac16e7d3206de21a204beffaae5203adbb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 14:58:02 +00:00
|
|
|
Decided:
|
2015-12-14 11:25:58 +00:00
|
|
|
--
|
|
|
|
2.6.2
|
|
|
|
|