]> code.delx.au - gnu-emacs/commitdiff
FreeBSD and m/amdx86-64.h
authorKarl Berry <karl@gnu.org>
Sun, 25 Dec 2005 19:29:28 +0000 (19:29 +0000)
committerKarl Berry <karl@gnu.org>
Sun, 25 Dec 2005 19:29:28 +0000 (19:29 +0000)
ChangeLog
configure.in
src/ChangeLog
src/m/amdx86-64.h

index 9aea9f5ab2bab3becc03a7ce28583d021a666fbd..84f25e0011766b9002dd88d10ab17123603140c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-12-25  Giorgos Keramidas  <keramida@ceid.upatras.gr> (tiny change)
+
+       * configure.in: use amdx86-64 for freebsd on x86_64.
+
 2005-11-22  Romain Francoise  <romain@orebokech.com>
 
        * make-dist: Add etc/images/icons.
index b39a7e85678de3aceb346695cf0fa66a88055528..b9d2b469f5929c7078ede54260d1620b83f35a82 100644 (file)
@@ -238,6 +238,7 @@ case "${canonical}" in
     case "${canonical}" in
       alpha*-*-freebsd*)       machine=alpha ;;
       i[3456]86-*-freebsd*)    machine=intel386 ;;
+      amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
     esac
   ;;
 
index a32ed4158f64aafdd08a0886cd2a2719899ceec0..f14f216f1d33fdc5393a32ab513db00b0b37cd34 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-25  Giorgos Keramidas  <keramida@ceid.upatras.gr>
+
+       * m/amdx86-64.h [__FreeBSD__] (START_FILES, LIB_STANDARD):
+       define for FreeBSD on this platform.
+
 2005-12-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * macterm.h (TYPE_FILE_NAME): New define.
index 2d7d86ce7c3f354bfc9765f35a86c353afeb9fdf..14ddd16406e17d50618daf7ac1bbb2368a32a554 100644 (file)
@@ -100,11 +100,38 @@ Boston, MA 02110-1301, USA.  */
 /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
 #undef DATA_SEG_BITS
 
+#ifdef __FreeBSD__
+
+/* The libraries for binaries native to the build host's architecture are
+   installed under /usr/lib in FreeBSD, and the ones that need special paths
+   are 32-bit compatibility libraries (installed under /usr/lib32).  To build
+   a native binary of Emacs on FreeBSD/amd64 we can just point to /usr/lib.  */
+
+#undef START_FILES
+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+
+/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
+   The reason is that some functions in libgcc.a call functions from libc.a,
+   and some libc.a functions need functions from libgcc.a.  Since most
+   versions of ld are one-pass linkers, we need to mention -lgcc twice,
+   or else we risk getting unresolved externals.  */
+#undef LIB_STANDARD
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+
+#else /* !__FreeBSD__ */
+
 #undef START_FILES
 #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
 
+/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
+   The reason is that some functions in libgcc.a call functions from libc.a,
+   and some libc.a functions need functions from libgcc.a.  Since most
+   versions of ld are one-pass linkers, we need to mention -lgcc twice,
+   or else we risk getting unresolved externals.  */
 #undef LIB_STANDARD
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
 
+#endif /* __FreeBSD__ */
+
 /* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e
    (do not change this comment) */