Ticket #13137: mpir-2.6.0.p0.diff

File mpir-2.6.0.p0.diff, 18.9 KB (added by jpflori, 9 years ago)

Spkg diff, for review only.

  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    2727   - Perhaps also modify CXXFLAGS (and/or CPPFLAGS).
    2828   - We currently don't use anything of GMP's/MPIR's CC setting, and matching
    2929     with the current compiler (`$CC`) is perhaps suboptimal.
    30  * Make sure the patches still apply; also, putting "-Wl,-z,noexecstack"
    31    into LDFLAGS might not be necessary for later versions.
    32  * Perhaps make sure we still delete the correct files on 32-bit MacOS X
    33    on Intel hardware (x86) to not break PIC there.
     30 * Make sure the patches still apply.
    3431 * Remove some files / directories not needed for Sage from upstream:
    3532     rm -rf src/build.vc*             # Microsoft Visual C build files
    3633     rm -rf src/yasm/Mkfiles/{dj,vc*} # DJGPP, Microsoft Visual C
     
    4946 * configure.patch: add some extra run-time configure tests, remove
    5047   mentions of Fortran. Re-generated configure (using the same versions
    5148   of autoconf, automake and libtool as the original files).
     49 * apple.patch: make sure 32 bits Apple Darwin use the correct asm directories.
    5250
    5351== Changelog ==
    5452
     53=== mpir-2.6.0.p0 (Jean-Pierre Flori, 25 November 2012) ===
     54 * Trac #13137: Update to MPIR 2.6.0.
     55 * Modify spkg-install to rename *,asm files to *.asm files.
     56 * Remove -Wl,-z,noexecstack fix which has been integrated upstream.
     57 * Remove old code about 32 bits Apple Darwin and use upstream fix.
     58
    5559=== mpir-2.5.2.p0 (John Palmieri, 3 October 2012) ===
    5660 * Trac #13137: Update to MPIR 2.5.2.
    5761 * Remove the patch 'patches/yasm__tools__re2c__code.c.patch'.
  • new file patches/apple.patch

    diff --git a/patches/apple.patch b/patches/apple.patch
    new file mode 100644
    - +  
     1diff -dru src.orig/configure src/configure
     2--- src.orig/configure  2012-12-04 10:54:58.329999299 +0100
     3+++ src/configure       2012-12-04 11:08:46.105968510 +0100
     4@@ -4689,12 +4689,10 @@
     5 
     6     # 32bit apple darwin doesn't like our PIC format asm code
     7     case $host in
     8-       core2-apple-darwin* | penryn-apple-darwin*)             path="x86/applenopic/core2 x86/applenopic" ;;
     9-       prescott-apple-darwin* | pentium4-apple-darwin*)        path="x86/applenopic" ;;
     10-       pentium3-apple-darwin* | pentium2-apple-darwin*)        path="x86/applenopic" ;;
     11-       i686-apple-darwin* | pentiumpro-apple-darwin*)          path="x86/applenopic" ;;
     12-       core-apple-darwin*)                                     path="x86/applenopic" ;;
     13-       *)                                                      ;;
     14+       i[34567]86-apple-darwin* | pentium*-apple-darwin* | prescott-apple-darwin* | core-apple-darwin* )       path="x86/applenopic" ;;
     15+       # assume Core2 or later
     16+       *-apple-darwin* )       path="x86/applenopic/core2 x86/applenopic" ;;
     17+       *)                      ;;
     18     esac
     19 
     20     # If the user asked for a fat build, override the path set above
     21diff -dru src.orig/configure.in src/configure.in
     22--- src.orig/configure.in       2012-12-04 10:54:56.681999359 +0100
     23+++ src/configure.in    2012-12-04 11:09:04.321968955 +0100
     24@@ -1122,12 +1122,10 @@
     25 
     26     # 32bit apple darwin doesn't like our PIC format asm code
     27     case $host in
     28-       core2-apple-darwin* | penryn-apple-darwin*)             path="x86/applenopic/core2 x86/applenopic" ;;
     29-       prescott-apple-darwin* | pentium4-apple-darwin*)        path="x86/applenopic" ;;
     30-       pentium3-apple-darwin* | pentium2-apple-darwin*)        path="x86/applenopic" ;;
     31-       i686-apple-darwin* | pentiumpro-apple-darwin*)          path="x86/applenopic" ;;
     32-       core-apple-darwin*)                                     path="x86/applenopic" ;;
     33-       *)                                                      ;;
     34+       i[34567]86-apple-darwin* | pentium*-apple-darwin* | prescott-apple-darwin* | core-apple-darwin* )       path="x86/applenopic" ;;
     35+       # assume Core2 or later
     36+       *-apple-darwin* )       path="x86/applenopic/core2 x86/applenopic" ;;
     37+       *)                      ;;
     38     esac
     39 
     40     # If the user asked for a fat build, override the path set above
  • patches/configure.patch

    diff --git a/patches/configure.patch b/patches/configure.patch
    a b  
    11diff -dru src/acinclude.m4 b/acinclude.m4
    22--- src/acinclude.m4    2011-07-27 00:59:54.000000000 -0700
    33+++ b/acinclude.m4      2012-06-19 12:53:56.000000000 -0700
    4 @@ -508,31 +508,45 @@
     4@@ -519,31 +519,45 @@
    55 int cmov () { return (n >= 0 ? n : 0); }
    66 ])
    77 
     
    6060diff -dru src/configure.in b/configure.in
    6161--- src/configure.in    2012-03-08 23:21:29.000000000 -0800
    6262+++ b/configure.in      2012-06-19 12:53:56.000000000 -0700
    63 @@ -1919,16 +1919,6 @@
     63@@ -1918,16 +1918,6 @@
    6464   fi
    6565 fi
    6666 
     
    156156 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
    157157 # ---------------------------------------------
    158158 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
    159 @@ -5313,11 +5267,13 @@
     159@@ -5311,11 +5265,13 @@
    160160    on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630".  The -mcpu=630
    161161    option causes gcc to incorrectly select the 32-bit libgcc.a, not
    162162    the 64-bit one, and consequently it misses out on the __fixunsdfdi
     
    174174 EOF
    175175   echo "Test compile: double -> ulong conversion" >&5
    176176   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    177 @@ -5361,7 +5317,6 @@
     177@@ -5359,7 +5315,6 @@
    178178 
    179179 
    180180 
     
    182182 if test "$gmp_prog_cc_works" = yes; then
    183183   # remove anything that might look like compiler output to our "||" expression
    184184   rm -f conftest* a.out b.out a.exe a_out.exe
    185 @@ -5369,10 +5324,10 @@
     185@@ -5367,10 +5322,10 @@
    186186 /* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
    187187    the assembler doesn't know hppa 2.0 instructions.  fneg is a 2.0
    188188    instruction, and a negation like this comes out using it.  */
     
    196196 EOF
    197197   echo "Test compile: double negation" >&5
    198198   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    199 @@ -5416,7 +5371,6 @@
     199@@ -5414,7 +5369,6 @@
    200200 
    201201 
    202202 
     
    204204 if test "$gmp_prog_cc_works" = yes; then
    205205   # remove anything that might look like compiler output to our "||" expression
    206206   rm -f conftest* a.out b.out a.exe a_out.exe
    207 @@ -5425,10 +5379,10 @@
     207@@ -5423,10 +5377,10 @@
    208208    (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
    209209    those instructions.  Not sure how much of the gmp code will come out
    210210    wanting sse2, but it's easiest to reject an option we know is bad.  */
     
    218218 EOF
    219219   echo "Test compile: double -> float conversion" >&5
    220220   gmp_compile="$cc $cflags $cppflags conftest.c >&5"
    221 @@ -5472,6 +5426,59 @@
     221@@ -5470,6 +5424,59 @@
    222222 
    223223 
    224224 
     
    278278 
    279279 # __builtin_alloca is not available everywhere, check it exists before
    280280 # seeing that it works
    281 @@ -6574,11 +6581,13 @@
     281@@ -6572,11 +6579,13 @@
    282282    on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630".  The -mcpu=630
    283283    option causes gcc to incorrectly select the 32-bit libgcc.a, not
    284284    the 64-bit one, and consequently it misses out on the __fixunsdfdi
     
    296296 EOF
    297297   echo "Test compile: double -> ulong conversion" >&5
    298298   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    299 @@ -6622,7 +6631,6 @@
     299@@ -6620,7 +6629,6 @@
    300300 
    301301 
    302302 
     
    304304 if test "$gmp_prog_cc_works" = yes; then
    305305   # remove anything that might look like compiler output to our "||" expression
    306306   rm -f conftest* a.out b.out a.exe a_out.exe
    307 @@ -6630,10 +6638,10 @@
     307@@ -6628,10 +6636,10 @@
    308308 /* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
    309309    the assembler doesn't know hppa 2.0 instructions.  fneg is a 2.0
    310310    instruction, and a negation like this comes out using it.  */
     
    318318 EOF
    319319   echo "Test compile: double negation" >&5
    320320   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    321 @@ -6677,7 +6685,6 @@
     321@@ -6675,7 +6683,6 @@
    322322 
    323323 
    324324 
     
    326326 if test "$gmp_prog_cc_works" = yes; then
    327327   # remove anything that might look like compiler output to our "||" expression
    328328   rm -f conftest* a.out b.out a.exe a_out.exe
    329 @@ -6686,10 +6693,10 @@
     329@@ -6684,10 +6691,10 @@
    330330    (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
    331331    those instructions.  Not sure how much of the gmp code will come out
    332332    wanting sse2, but it's easiest to reject an option we know is bad.  */
     
    340340 EOF
    341341   echo "Test compile: double -> float conversion" >&5
    342342   gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
    343 @@ -6733,6 +6740,59 @@
     343@@ -6731,6 +6738,59 @@
    344344 
    345345 
    346346 
     
    400400 
    401401 # __builtin_alloca is not available everywhere, check it exists before
    402402 # seeing that it works
    403 @@ -11691,16 +11751,6 @@
     403@@ -11689,16 +11749,6 @@
    404404   fi
    405405 fi
    406406 
     
    417417 case `pwd` in
    418418   *\ * | *\    *)
    419419     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
    420 @@ -14584,7 +14634,6 @@
     420@@ -14582,7 +14632,6 @@
    421421 
    422422 
    423423 
     
    425425 # Set options
    426426 
    427427 
    428 @@ -21738,2721 +21787,6 @@
     428@@ -21736,2721 +21785,6 @@
    429429 
    430430 
    431431 
     
    31473147 
    31483148 
    31493149 
    3150 @@ -29344,103 +26678,54 @@
     3150@@ -29343,103 +26677,54 @@
    31513151 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    31523152 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    31533153 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
     
    32513251 
    32523252 LTCC='$LTCC'
    32533253 LTCFLAGS='$LTCFLAGS'
    3254 @@ -29528,57 +26813,31 @@
     3254@@ -29527,57 +26812,31 @@
    32553255 postdeps \
    32563256 compiler_lib_search_path \
    32573257 LD_CXX \
     
    33103310     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    33113311     *[\\\\\\\`\\"\\\$]*)
    33123312       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    3313 @@ -29610,27 +26869,16 @@
     3313@@ -29609,27 +26868,16 @@
    33143314 sys_lib_search_path_spec \
    33153315 sys_lib_dlsearch_path_spec \
    33163316 reload_cmds_CXX \
     
    33393339     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    33403340     *[\\\\\\\`\\"\\\$]*)
    33413341       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    3342 @@ -29663,8 +26911,6 @@
     3342@@ -29662,8 +26910,6 @@
    33433343 
    33443344 
    33453345 
     
    33483348 _ACEOF
    33493349 
    33503350 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    3351 @@ -30376,7 +27622,7 @@
     3351@@ -30377,7 +27623,7 @@
    33523352 
    33533353 
    33543354 # The names of the tagged configurations supported by this script.
     
    33573357 
    33583358 # ### BEGIN LIBTOOL CONFIG
    33593359 
    3360 @@ -31130,163 +28376,6 @@
     3360@@ -31131,163 +28377,6 @@
    33613361 # ### END LIBTOOL TAG CONFIG: CXX
    33623362 _LT_EOF
    33633363 
     
    35213521  ;;
    35223522 
    35233523   esac
    3524 @@ -32365,103 +29454,54 @@
     3524@@ -32366,103 +29455,54 @@
    35253525 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    35263526 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    35273527 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
     
    36253625 
    36263626 LTCC='$LTCC'
    36273627 LTCFLAGS='$LTCFLAGS'
    3628 @@ -32549,57 +29589,31 @@
     3628@@ -32550,57 +29590,31 @@
    36293629 postdeps \
    36303630 compiler_lib_search_path \
    36313631 LD_CXX \
     
    36843684     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    36853685     *[\\\\\\\`\\"\\\$]*)
    36863686       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    3687 @@ -32631,27 +29645,16 @@
     3687@@ -32632,27 +29646,16 @@
    36883688 sys_lib_search_path_spec \
    36893689 sys_lib_dlsearch_path_spec \
    36903690 reload_cmds_CXX \
     
    37133713     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    37143714     *[\\\\\\\`\\"\\\$]*)
    37153715       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    3716 @@ -32681,8 +29684,6 @@
     3716@@ -32682,8 +29685,6 @@
    37173717 
    37183718 
    37193719 
     
    37223722 ac_aux_dir='$ac_aux_dir'
    37233723 
    37243724 
    3725 @@ -33399,7 +30400,7 @@
     3725@@ -33402,7 +30403,7 @@
    37263726 
    37273727 
    37283728 # The names of the tagged configurations supported by this script.
     
    37313731 
    37323732 # ### BEGIN LIBTOOL CONFIG
    37333733 
    3734 @@ -34153,163 +31154,6 @@
     3734@@ -34156,163 +31157,6 @@
    37353735 # ### END LIBTOOL TAG CONFIG: CXX
    37363736 _LT_EOF
    37373737 
     
    38953895  ;;
    38963896 
    38973897   esac
    3898 @@ -35392,103 +32236,54 @@
     3898@@ -35395,103 +32239,54 @@
    38993899 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
    39003900 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
    39013901 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
     
    39993999 
    40004000 LTCC='$LTCC'
    40014001 LTCFLAGS='$LTCFLAGS'
    4002 @@ -35576,57 +32371,31 @@
     4002@@ -35579,57 +32374,31 @@
    40034003 postdeps \
    40044004 compiler_lib_search_path \
    40054005 LD_CXX \
     
    40584058     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    40594059     *[\\\\\\\`\\"\\\$]*)
    40604060       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    4061 @@ -35658,27 +32427,16 @@
     4061@@ -35661,27 +32430,16 @@
    40624062 sys_lib_search_path_spec \
    40634063 sys_lib_dlsearch_path_spec \
    40644064 reload_cmds_CXX \
     
    40874087     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    40884088     *[\\\\\\\`\\"\\\$]*)
    40894089       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    4090 @@ -35708,8 +32466,6 @@
     4090@@ -35711,8 +32469,6 @@
    40914091 
    40924092 
    40934093 
     
    40964096 ac_aux_dir='$ac_aux_dir'
    40974097 ac_aux_dir='$ac_aux_dir'
    40984098 
    4099 @@ -36428,7 +33184,7 @@
     4099@@ -36433,7 +33189,7 @@
    41004100 
    41014101 
    41024102 # The names of the tagged configurations supported by this script.
     
    41054105 
    41064106 # ### BEGIN LIBTOOL CONFIG
    41074107 
    4108 @@ -37182,163 +33938,6 @@
     4108@@ -37187,163 +33943,6 @@
    41094109 # ### END LIBTOOL TAG CONFIG: CXX
    41104110 _LT_EOF
    41114111 
  • patches/quote_asm.patch

    diff --git a/patches/quote_asm.patch b/patches/quote_asm.patch
    a b  
    646646 
    647647 ifdef(`OPERATION_popcount',,
    648648 `ifdef(`OPERATION_hamdist',,
     649diff -ru src/mpn/x86/p6/addmul_1.asm src.patched/mpn/x86/p6/addmul_1.asm
     650--- src/mpn/x86/p6/addmul_1.asm 2012-10-03 22:07:16.000000000 +0200
     651+++ src.patched/mpn/x86/p6/addmul_1.asm 2012-11-29 13:27:59.761725414 +0100
     652@@ -46,7 +46,7 @@
     653 
     654 deflit(UNROLL_COUNT, 16)
     655 
     656-define(OPERATION_addmul_1,1)
     657+define(`OPERATION_addmul_1',1)
     658 
     659 ifdef(`OPERATION_addmul_1', `
     660        define(M4_inst,        addl)
     661diff -ru src/mpn/x86/p6/submul_1.asm src.patched/mpn/x86/p6/submul_1.asm
     662--- src/mpn/x86/p6/submul_1.asm 2012-10-03 22:07:16.000000000 +0200
     663+++ src.patched/mpn/x86/p6/submul_1.asm 2012-11-29 13:27:59.681725417 +0100
     664@@ -46,7 +46,7 @@
     665 
     666 deflit(UNROLL_COUNT, 16)
     667 
     668-define(OPERATION_submul_1,1)
     669+define(`OPERATION_submul_1',1)
     670 
     671 ifdef(`OPERATION_addmul_1', `
     672        define(M4_inst,        addl)
    649673diff -ru src/mpn/x86/pentium/add_n.asm src.patched/mpn/x86/pentium/add_n.asm
    650674--- src/mpn/x86/pentium/add_n.asm       2010-12-31 08:32:53.000000000 +0100
    651675+++ src.patched/mpn/x86/pentium/add_n.asm       2012-04-07 14:27:56.318273599 +0200
  • deleted file patches/yasm__tools__re2c__code.c.patch

    diff --git a/patches/yasm__tools__re2c__code.c.patch b/patches/yasm__tools__re2c__code.c.patch
    deleted file mode 100644
    + -  
    1 --- src/yasm/tools/re2c/code.c  2011-03-05 14:47:11.000000000 +0100
    2 +++ src/yasm/tools/re2c/code.c  2012-04-05 12:34:44.958541522 +0200
    3 @@ -1,5 +1,6 @@
    4  #include <stdlib.h>
    5  #include <string.h>
    6 +#include <errno.h>
    7  #include <ctype.h>
    8  #include "tools/re2c/substr.h"
    9  #include "tools/re2c/globals.h"
    10 @@ -10,7 +11,7 @@
    11      while (value >= vUsedLabelAlloc) {
    12         vUsedLabels = realloc(vUsedLabels, vUsedLabelAlloc * 2);
    13         if (!vUsedLabels) {
    14 -           fputs("Out of memory.\n", stderr);
    15 +           fputs("Error: re2c: Out of memory.\n", stderr);
    16             exit(EXIT_FAILURE);
    17         }
    18         memset(vUsedLabels + vUsedLabelAlloc, 0, vUsedLabelAlloc);
    19 @@ -844,14 +845,17 @@
    20      nOrgOline = oline;
    21      maxFillIndexes = vFillIndexes;
    22      orgVFillIndexes = vFillIndexes;
    23 -    tmpo = fopen("re2c.tmp", "wt");
    24 +    if (!(tmpo = tmpfile()))
    25 +    {
    26 +        fprintf(stderr, "Error: re2c: tmpfile(): %s\n", strerror(errno));
    27 +        exit(EXIT_FAILURE);
    28 +    }
    29      for(s = d->head; s; s = s->next){
    30         int readCh = 0;
    31         State_emit(s, tmpo, &readCh);
    32         Go_genGoto(&s->go, tmpo, s, s->next, &readCh);
    33      }
    34      fclose(tmpo);
    35 -    remove("re2c.tmp");
    36      maxFillIndexes = vFillIndexes;
    37      vFillIndexes = orgVFillIndexes;
    38      oline = nOrgOline;
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    1414# Apply patches (if any):
    1515###############################################################################
    1616
     17# Before applying patches, we manually move two wrongly named files,
     18# rather than doing this with diff/patch which lacks the ability of properly
     19# detecting filename changes. See Trac #13137.
     20# This fix can (and will have to) be removed once integrated upstream.
     21echo "Renaming *,asm files to *.asm..."
     22mv mpn/x86/p6/addmul_1,asm mpn/x86/p6/addmul_1.asm
     23mv mpn/x86/p6/submul_1,asm mpn/x86/p6/submul_1.asm
     24if [ $? -ne 0 ]; then
     25    echo >&2 "Error: moving *,asm files failed."
     26    exit 1
     27fi
     28
    1729echo "Applying patches to upstream sources..."
    1830for patch in ../patches/*.patch; do
    1931    patch -p1 <"$patch"
     
    2941###############################################################################
    3042
    3143###############################################################################
    32 # Helper functions:
    33 ###############################################################################
    34 
    35 remove_32_bit_assembly_code() # MacOS X 10.4 and 10.5 on Intel (x86) only.
    36 {
    37     # We could actually do this by using 'patch', at the expense of
    38     # a larger Mercurial repository, and the need to rebase the patches
    39     # whenever these files change, so better just delete them with 'rm'.
    40     echo "Deleting assembly files which depend on PIC assembly" \
    41         "working on 32-bit MacOS X on Intel hardware..."
    42     saved=`pwd`
    43     cd "$CUR/src/"
    44     rm mpn/x86/dive_1.asm
    45     rm mpn/x86/diveby3.asm
    46     rm mpn/x86/pentium4/sse2/dive_1.asm
    47     rm mpn/x86/pentium4/sse2/mode1o.asm
    48     rm mpn/x86/pentium4/sse2/diveby3.asm
    49     rm mpn/x86/pentium4/mmx/popham.asm
    50     rm mpn/x86/pentium4/mmx/rshift.asm
    51     rm mpn/x86/p6/mode1o.asm
    52     rm mpn/x86/p6/dive_1.asm
    53     rm mpn/x86/pentium/hamdist.asm
    54     rm mpn/x86/pentium/mod_1.asm
    55     rm mpn/x86/pentium/popcount.asm
    56     rm mpn/x86/pentium/mode1o.asm
    57     rm mpn/x86/pentium/dive_1.asm
    58     cd "$saved"
    59 }
    60 
    61 ###############################################################################
    6244# Set up environment variables:
    6345###############################################################################
    6446
     
    133115                echo "Building a 32-bit version of MPIR, which is the only supported option."
    134116                ABI=32
    135117                case "`uname -m`" in
    136                     i[3456]86)
    137                         # Remove x86 assembly code that breaks PIC on MacOS X:
    138                         remove_32_bit_assembly_code
    139                         ;;
    140118                    ppc|ppc64|[Pp]ower*) # Apple's 'uname' returns strange strings
    141119                        # The Darwin assembler rejects code using an
    142120                        # extended instruction set by default (cf. #8664):
     
    151129        fi
    152130        ;; # Darwin
    153131    Linux)
    154         # Work around (erroneously) set "executable stack" attributes,
    155         # causing runtime errors on Fedora 14 and other SELinux-enabled
    156         # systems:
    157         required_ldflags="$required_ldflags -Wl,-z,noexecstack"
    158 
    159132        # MPIR fails to build on 32-bit operating systems running on
    160133        # 64-bit CPUs if CFLAGS happen to contain '-m32' and ABI is
    161134        # *not* set, so we set it here if necessary: