[Gmp-commit] /var/hg/gmp: Set PRETEND_PIC for GNU/Linux.

mercurial at gmplib.org mercurial at gmplib.org
Tue Nov 22 17:49:06 UTC 2016


details:   /var/hg/gmp/rev/7fbdda08f4ec
changeset: 17130:7fbdda08f4ec
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue Nov 22 18:49:03 2016 +0100
description:
Set PRETEND_PIC for GNU/Linux.

diffstat:

 ChangeLog                    |   5 +++++
 configure.ac                 |   2 ++
 mpn/x86_64/fat/fat_entry.asm |  20 ++++++--------------
 3 files changed, 13 insertions(+), 14 deletions(-)

diffs (78 lines):

diff -r afda1bbf3ee3 -r 7fbdda08f4ec ChangeLog
--- a/ChangeLog	Tue Nov 22 09:15:19 2016 +0100
+++ b/ChangeLog	Tue Nov 22 18:49:03 2016 +0100
@@ -1,3 +1,8 @@
+2016-11-22  Torbjörn Granlund  <tg at gmplib.org>
+
+	* configure.ac (x86): Define LINUX for GNU/Linux systems.
+	* mpn/x86_64/fat/fat_entry.asm: Set PRETEND_PIC for GNU/Linux.
+
 2016-11-21  Torbjörn Granlund  <tg at gmplib.org>
 
 	* configure.ac (powerpc): Never use -O3.
diff -r afda1bbf3ee3 -r 7fbdda08f4ec configure.ac
--- a/configure.ac	Tue Nov 22 09:15:19 2016 +0100
+++ b/configure.ac	Tue Nov 22 18:49:03 2016 +0100
@@ -3702,6 +3702,8 @@
 	      GMP_INCLUDE_MPN(x86_64/dos64.m4) ;;
 	    *-openbsd*)
 	      GMP_DEFINE_RAW(["define(<OPENBSD>,1)"]) ;;
+	    *-linux*)
+	      GMP_DEFINE_RAW(["define(<LINUX>,1)"]) ;;
 	  esac
           ;;
       esac
diff -r afda1bbf3ee3 -r 7fbdda08f4ec mpn/x86_64/fat/fat_entry.asm
--- a/mpn/x86_64/fat/fat_entry.asm	Tue Nov 22 09:15:19 2016 +0100
+++ b/mpn/x86_64/fat/fat_entry.asm	Tue Nov 22 18:49:03 2016 +0100
@@ -3,7 +3,7 @@
 dnl  Contributed to the GNU project by Kevin Ryde (original x86_32 code) and
 dnl  Torbjorn Granlund (port to x86_64)
 
-dnl  Copyright 2003, 2009, 2011-2014 Free Software Foundation, Inc.
+dnl  Copyright 2003, 2009, 2011-2014, 2016 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -45,13 +45,16 @@
 
 
 dnl  We define PRETEND_PIC as a helper symbol, the use it for suppressing
-dnl  normal, fast call code, since that triggers problems on Darwin and
-dnl  OpenBSD.
+dnl  normal, fast call code, since that triggers problems on Darwin, OpenBSD
+dnl  and some versions of GNU/Linux.  This will go away when symbol hiding is
+dnl  finished.
 
 ifdef(`DARWIN',
 `define(`PRETEND_PIC')')
 ifdef(`OPENBSD',
 `define(`PRETEND_PIC')')
+ifdef(`LINUX',
+`define(`PRETEND_PIC')')
 ifdef(`PIC',
 `define(`PRETEND_PIC')')
 
@@ -85,22 +88,11 @@
 
 define(FAT_ENTRY,
 m4_assert_numargs(2)
-`ifdef(`HOST_DOS64',
 `	ALIGN(8)
 `'PROLOGUE($1)
 	jmp	*$2+GSYM_PREFIX`'__gmpn_cpuvec(%rip)
 EPILOGUE()
-',
-`	ALIGN(ifdef(`PIC',16,8))
-`'PROLOGUE($1)
-ifdef(`PRETEND_PIC',
-`	LEA(	GSYM_PREFIX`'__gmpn_cpuvec, %rax)
-	jmp	*$2(%rax)
-',`dnl non-PIC
-	jmp	*GSYM_PREFIX`'__gmpn_cpuvec+$2
 ')
-EPILOGUE()
-')')
 
 
 dnl  FAT_ENTRY for each CPUVEC_FUNCS_LIST


More information about the gmp-commit mailing list