aboutsummaryrefslogtreecommitdiffstats
path: root/testing/racket/0001-Ensure-that-the-GMP-ARM-extra-file-has-the-correct-e.patch
blob: 873e4faf46de652dcaf75702ca43686b0d11b463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
From 8ff7b4cc86dcd0addcead1b36febae82fa9d4b40 Mon Sep 17 00:00:00 2001
From: Paulo Matos <pmatos@linki.tools>
Date: Tue, 12 May 2020 21:04:59 +0200
Subject: [PATCH] Ensure that the GMP ARM extra file has the correct extension
 (#3178)

* Ensure that the GMP ARM extra file has the correct extension

We hardcoded in some places the extension of the GMP ARM extra file
with .o, however the Makefile rule to build the file will use .lo is
--enable-shared is enabled. This commit fixes the discrepancy by not
hardcoding the extension anywhere.

Fixes #3176

* Avoid gnu make extension

* Replace spaces to conform with other lines

* Ensure we only add extension if file is needed

* Move the LTO definition to the configure.ac

* Carry the LTO variable into the Makefile

* Fix variable reference

* Add variable definition to gc2 Makefile

* annotate assignment
---
 racket/src/cfg-racket             | 6 +++---
 racket/src/racket/configure.ac    | 6 +++---
 racket/src/racket/gc2/Makefile.in | 1 +
 racket/src/racket/src/Makefile.in | 4 +++-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/racket/src/cfg-racket b/racket/src/cfg-racket
index fb875a897a..321479a48f 100755
--- a/racket/src/cfg-racket
+++ b/racket/src/cfg-racket
@@ -4887,7 +4887,7 @@ case "$host_os" in
       ppc|powerpc)
        ;;
       alpha)
-       EXTRA_GMP_OBJ="gmp_alpha_gcc.o"
+       EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
        EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
        ;;
       i386|i486|i586|i686)
@@ -4895,7 +4895,7 @@ case "$host_os" in
        check_for_unwind=REG_ESP
        ;;
       arm*)
-       EXTRA_GMP_OBJ="gmp_arm_gcc.o"
+       EXTRA_GMP_OBJ='gmp_arm_gcc.$(LTO)'
        EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
        ;;
       *)
@@ -4907,7 +4907,7 @@ case "$host_os" in
     if test "$CC" = "cc" ; then
       COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects"
     elif test "$CC" = "gcc" ; then
-      EXTRA_GMP_OBJ="gmp_alpha_gcc.o"
+      EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
       EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
     fi
     ;;
diff --git a/racket/src/racket/configure.ac b/racket/src/racket/configure.ac
index 6d24ce52dc..a2f43a9a87 100644
--- a/racket/src/racket/configure.ac
+++ b/racket/src/racket/configure.ac
@@ -612,7 +612,7 @@ case "$host_os" in
       ppc|powerpc)
        ;;
       alpha)
-       EXTRA_GMP_OBJ="gmp_alpha_gcc.o"
+       EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
        EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
        ;;
       i386|i486|i586|i686)
@@ -620,7 +620,7 @@ case "$host_os" in
        check_for_unwind=REG_ESP
        ;;
       arm*)
-       EXTRA_GMP_OBJ="gmp_arm_gcc.o"
+       EXTRA_GMP_OBJ='gmp_arm_gcc.$(LTO)'
        EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
        ;;
       *)
@@ -632,7 +632,7 @@ case "$host_os" in
     if test "$CC" = "cc" ; then 
       COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects"
     elif test "$CC" = "gcc" ; then 
-      EXTRA_GMP_OBJ="gmp_alpha_gcc.o"
+      EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
       EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
     fi
     ;;
diff --git a/racket/src/racket/gc2/Makefile.in b/racket/src/racket/gc2/Makefile.in
index ef33c5881e..a89e933cb6 100644
--- a/racket/src/racket/gc2/Makefile.in
+++ b/racket/src/racket/gc2/Makefile.in
@@ -581,6 +581,7 @@ LIBRKTIO_FOR_DLL = $(LIBRKTIO_FOR_DLL_@LIBSFX@)
 LIBRKTIO_FOR_LIB = $(LIBRKTIO_FOR_LIB_@LIBSFX@)
 LIBRKTIO_UP_FOR_LIB = $(LIBRKTIO_UP_FOR_LIB_@LIBSFX@)
 
+LTO=@LTO@ # Need for replacement of EXTRA_GMP_OBJ which carries the variable
 EXTRA_GMP_DEP_FILE = $(SRCDIR)/@EXTRA_GMP_OBJ@
 EXTRA_GMP = @EXTRA_GMP_DEP@
 
diff --git a/racket/src/racket/src/Makefile.in b/racket/src/racket/src/Makefile.in
index 0602f92ec5..60b81ed297 100644
--- a/racket/src/racket/src/Makefile.in
+++ b/racket/src/racket/src/Makefile.in
@@ -13,6 +13,7 @@ CFLAGS = @CFLAGS@ @COMPFLAGS@ @PROFFLAGS@
 CPPFLAGS = @PREFLAGS@
 RKTIO_INC = -I$(srcdir)/../../rktio -I../../rktio
 ALL_CFLAGS = $(CFLAGS) -I$(builddir)/.. -I$(srcdir)/../include  $(RKTIO_INC) $(CPPFLAGS) @OPTIONS@ @MZOPTIONS@
+LTO=@LTO@ # Need for replacement of EXTRA_GMP_OBJ which carries the variable
 
 OBJS =  salloc.@LTO@ \
 	bignum.@LTO@ \
@@ -71,7 +72,8 @@ OBJS =  salloc.@LTO@ \
 	type.@LTO@ \
         unwind.@LTO@ \
         validate.@LTO@ \
-	vector.@LTO@  @EXTRA_GMP_OBJ@
+	vector.@LTO@ \
+	@EXTRA_GMP_OBJ@
 
 SRCS =  $(srcdir)/salloc.c \
 	$(srcdir)/bignum.c \