1 |
ulm 10/05/08 06:53:17 |
2 |
|
3 |
Added: 01_all_crt-dir.patch |
4 |
Log: |
5 |
Initial patchset for Emacs 23.2. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 src/patchsets/emacs/23.2/01_all_crt-dir.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/emacs/23.2/01_all_crt-dir.patch?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/emacs/23.2/01_all_crt-dir.patch?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: 01_all_crt-dir.patch |
14 |
=================================================================== |
15 |
http://bugs.gentoo.org/306831 |
16 |
http://debbugs.gnu.org/5655 |
17 |
Patch backported from upstream bzr repo, changesets 100020 and 100022. |
18 |
|
19 |
--- emacs-23.2-orig/configure.in |
20 |
+++ emacs-23.2/configure.in |
21 |
@@ -169,6 +169,12 @@ |
22 |
fi |
23 |
fi |
24 |
|
25 |
+CRT_DIR= |
26 |
+AC_ARG_WITH([crt-dir],dnl |
27 |
+[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc. |
28 |
+This option is only used on x86-64 and s390x GNU/Linux architectures.])]) |
29 |
+CRT_DIR="${with_crt_dir}" |
30 |
+ |
31 |
AC_ARG_WITH([gnustep-conf],dnl |
32 |
[AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) |
33 |
test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ |
34 |
@@ -997,17 +1003,31 @@ |
35 |
AC_SYS_LARGEFILE |
36 |
|
37 |
|
38 |
-### The standard library on x86-64 and s390x GNU/Linux distributions can |
39 |
-### be located in either /usr/lib64 or /usr/lib. |
40 |
-### In some rare cases, /usr/lib64 exists but does not contain the |
41 |
-### relevant files (bug#1287). Hence test for crtn.o. |
42 |
+## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x. |
43 |
+## Other machine types hard-code the location in src/[ms]/*.h. |
44 |
case "${canonical}" in |
45 |
x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) |
46 |
- if test -e /usr/lib64/crtn.o; then |
47 |
- AC_DEFINE(HAVE_LIB64_DIR, 1, |
48 |
- [Define to 1 if the directory /usr/lib64 exists.]) |
49 |
-fi |
50 |
+ |
51 |
+ ## On x86-64 and s390x GNU/Linux distributions, the standard library |
52 |
+ ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. |
53 |
+ ## For anything else (eg /usr/lib32), it is up the user to specify |
54 |
+ ## the location (bug#5655). |
55 |
+ ## Test for crtn.o, not just the directory, because sometimes the |
56 |
+ ## directory exists but does not have the relevant files (bug#1287). |
57 |
+ ## If user specified a crt-dir, use that unconditionally. |
58 |
+ if test "X$CRT_DIR" = "X"; then |
59 |
+ CRT_DIR=/usr/lib |
60 |
+ test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 |
61 |
+ fi |
62 |
+ |
63 |
+ test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ |
64 |
+ AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.]) |
65 |
+ ;; |
66 |
+ |
67 |
esac |
68 |
+test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib |
69 |
+AC_SUBST(CRT_DIR) |
70 |
+ |
71 |
|
72 |
dnl This function defintion taken from Gnome 2.0 |
73 |
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
74 |
--- emacs-23.2-orig/src/m/amdx86-64.h |
75 |
+++ emacs-23.2/src/m/amdx86-64.h |
76 |
@@ -80,7 +80,7 @@ |
77 |
a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib. */ |
78 |
|
79 |
#undef START_FILES |
80 |
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o |
81 |
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o |
82 |
|
83 |
/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. |
84 |
The reason is that some functions in libgcc.a call functions from libc.a, |
85 |
@@ -88,14 +88,14 @@ |
86 |
versions of ld are one-pass linkers, we need to mention -lgcc twice, |
87 |
or else we risk getting unresolved externals. */ |
88 |
#undef LIB_STANDARD |
89 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o |
90 |
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o |
91 |
|
92 |
#elif defined(__OpenBSD__) |
93 |
|
94 |
#undef START_FILES |
95 |
-#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o |
96 |
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o |
97 |
#undef LIB_STANDARD |
98 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o |
99 |
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o |
100 |
|
101 |
#elif defined(__NetBSD__) |
102 |
|
103 |
@@ -119,13 +119,8 @@ |
104 |
or else we risk getting unresolved externals. */ |
105 |
#undef START_FILES |
106 |
#undef LIB_STANDARD |
107 |
-#ifdef HAVE_LIB64_DIR |
108 |
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o |
109 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o |
110 |
-#else |
111 |
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o |
112 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o |
113 |
-#endif |
114 |
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o |
115 |
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o |
116 |
|
117 |
#endif /* __FreeBSD__ */ |
118 |
#endif /* !i386 */ |
119 |
--- emacs-23.2-orig/src/m/ibms390x.h |
120 |
+++ emacs-23.2/src/m/ibms390x.h |
121 |
@@ -91,18 +91,10 @@ |
122 |
#define XPNTR(a) XUINT (a) |
123 |
|
124 |
#undef START_FILES |
125 |
-#ifdef HAVE_LIB64_DIR |
126 |
-#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o |
127 |
-#else |
128 |
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o |
129 |
-#endif |
130 |
+#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o |
131 |
|
132 |
#undef LIB_STANDARD |
133 |
-#ifdef HAVE_LIB64_DIR |
134 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o |
135 |
-#else |
136 |
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o |
137 |
-#endif |
138 |
+#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o |
139 |
|
140 |
/* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 |
141 |
(do not change this comment) */ |
142 |
--- emacs-23.2-orig/src/Makefile.in |
143 |
+++ emacs-23.2/src/Makefile.in |
144 |
@@ -67,6 +67,9 @@ |
145 |
|
146 |
OTHER_FILES = @OTHER_FILES@ |
147 |
|
148 |
+## Only used by amdx86-64 and ibms390x GNU/Linux. |
149 |
+CRT_DIR=@CRT_DIR@ |
150 |
+ |
151 |
# ========================== start of cpp stuff ======================= |
152 |
/* From here on, comments must be done in C syntax. */ |