aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-04-24 12:50:03 -0700
committerGlenn Morris2010-04-24 12:50:03 -0700
commitdfbbda83af47a8d3e39682639cc60f128d15f5d5 (patch)
treea8d76ccfd107a0dc0daf9bf40fb2832f4f35da25
parent1ddac986d7372a78f3dd98ecfd5386be9eaa84e6 (diff)
downloademacs-dfbbda83af47a8d3e39682639cc60f128d15f5d5.tar.gz
emacs-dfbbda83af47a8d3e39682639cc60f128d15f5d5.zip
Minor simplications for src/m/amdx86-64.h.
* m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]: For clarity, revert to using fixed /usr/lib rather than $CRT_DIR. (START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case, since CRT_DIR defaults to /usr/lib. Suggested by Dan Nicolaescu.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/m/amdx86-64.h40
2 files changed, 21 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ee4f8c8de1..2119d642ec0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12010-04-24 Glenn Morris <rgm@gnu.org>
2
3 * m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]:
4 For clarity, revert to using fixed /usr/lib rather than $CRT_DIR.
5 (START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case,
6 since CRT_DIR defaults to /usr/lib. Suggested by Dan Nicolaescu.
7
12010-04-24 Eli Zaretskii <eliz@gnu.org> 82010-04-24 Eli Zaretskii <eliz@gnu.org>
2 9
3 * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and 10 * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 0401b8bf90f..0fe99af4f55 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -72,30 +72,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
72/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ 72/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
73#undef DATA_SEG_BITS 73#undef DATA_SEG_BITS
74 74
75#ifdef __FreeBSD__ 75#ifdef __OpenBSD__
76
77/* The libraries for binaries native to the build host's architecture are
78 installed under /usr/lib in FreeBSD, and the ones that need special paths
79 are 32-bit compatibility libraries (installed under /usr/lib32). To build
80 a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib. */
81 76
82#undef START_FILES 77#undef START_FILES
83#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o 78#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o
84
85/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
86 The reason is that some functions in libgcc.a call functions from libc.a,
87 and some libc.a functions need functions from libgcc.a. Since most
88 versions of ld are one-pass linkers, we need to mention -lgcc twice,
89 or else we risk getting unresolved externals. */
90#undef LIB_STANDARD 79#undef LIB_STANDARD
91#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o 80#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
92
93#elif defined(__OpenBSD__)
94
95#undef START_FILES
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 $(CRT_DIR)/crtend.o
99 81
100#elif defined(__NetBSD__) 82#elif defined(__NetBSD__)
101 83
@@ -110,19 +92,25 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
110 92
111/* LIB_STANDARD and START_FILES set correctly in s/darwin.h */ 93/* LIB_STANDARD and START_FILES set correctly in s/darwin.h */
112 94
113#else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !SOLARIS2 95#else /* !__OpenBSD__ && !__NetBSD__ && !SOLARIS2 && !__APPLE__ */
114 && !__APPLE__ */ 96/* CRT_DIR defaults to /usr/lib. On GNU/Linux, it may be /usr/lib64.
97 On FreeBSD, the libraries for binaries native to the build host's
98 architecture are installed under /usr/lib, and the ones that need
99 special paths are 32-bit compatibility libraries (installed under
100 /usr/lib32). So to build a native binary of Emacs on FreeBSD/amd64
101 we can just point to /usr/lib.
102 */
103#undef START_FILES
104#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
115/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. 105/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
116 The reason is that some functions in libgcc.a call functions from libc.a, 106 The reason is that some functions in libgcc.a call functions from libc.a,
117 and some libc.a functions need functions from libgcc.a. Since most 107 and some libc.a functions need functions from libgcc.a. Since most
118 versions of ld are one-pass linkers, we need to mention -lgcc twice, 108 versions of ld are one-pass linkers, we need to mention -lgcc twice,
119 or else we risk getting unresolved externals. */ 109 or else we risk getting unresolved externals. */
120#undef START_FILES
121#undef LIB_STANDARD 110#undef LIB_STANDARD
122#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
123#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o 111#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
124 112
125#endif /* __FreeBSD__ */ 113#endif /* __OpenBSD__ */
126#endif /* !i386 */ 114#endif /* !i386 */
127 115
128/* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e 116/* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e