[PATCH v2] Support powerpc64le-linux platform
Ulrich Weigand
uweigand at de.ibm.com
Sat Dec 14 13:47:22 UTC 2013
Torbjorn Granlund wrote:
> There are a handful of regressions for 32-bit powerpc and powerc64
> running in 32-bit mode.
>
> https://gmplib.org/devel/tm-date.html
Ah, I hadn't realized that some of the 32-bit targets actually
use files under powerpc64/, but still an .m4 file in powerpc32/.
I guess this means the relevant .m4 files in powerpc32 also
need to accept and ignore the second PROLOGUE_cpu argument.
As far as I can see, this affects only elf.m4 and darwin.m4.
Fixed by the patch below.
Tested using
ABI=mode32 ../gmp/configure --host=power6-unknown-linux-gnu
which is one of the configurations that failed before the patch.
Bye,
Ulrich
2013-12-14 Ulrich Weigand <Ulrich.Weigand at de.ibm.com>
* mpn/powerpc32/darwin.m4: Allow (and ignore) optional
'toc' parameter to PROLOGUE_cpu.
* mpn/powerpc32/elf.m4: Likewise.
diff -r 85e13c6f3293 mpn/powerpc32/darwin.m4
--- a/mpn/powerpc32/darwin.m4 Fri Dec 13 12:23:03 2013 +0100
+++ b/mpn/powerpc32/darwin.m4 Sat Dec 14 08:26:15 2013 -0500
@@ -20,13 +20,15 @@
define(`ASM_START',`')
-dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
+dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,toc])
dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
dnl
define(`PROLOGUE_cpu',
-m4_assert_numargs(1)
-` .text
+m4_assert_numargs_range(1,2)
+`ifelse(`$2',toc,,
+`ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter')')')dnl
+ .text
.globl $1
.align 3
$1:')
diff -r 85e13c6f3293 mpn/powerpc32/elf.m4
--- a/mpn/powerpc32/elf.m4 Fri Dec 13 12:23:03 2013 +0100
+++ b/mpn/powerpc32/elf.m4 Sat Dec 14 08:26:15 2013 -0500
@@ -20,13 +20,14 @@
define(`ASM_START',`')
-dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
+dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,toc])
dnl EPILOGUE_cpu(GSYM_PREFIX`'foo)
dnl
define(`PROLOGUE_cpu',
-m4_assert_numargs(1)
- `
+m4_assert_numargs_range(1,2)
+`ifelse(`$2',toc,,
+`ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter')')')dnl
.section ".text"
.align 3
.globl $1
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand at de.ibm.com
More information about the gmp-devel
mailing list