unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: ich@frank-schmitt.net, emacs-devel@gnu.org
Subject: Re: RFC: Support for FreeBSD/amd64
Date: Sat, 29 Oct 2005 17:47:25 +0300	[thread overview]
Message-ID: <20051029144724.GA1080@flame.pc> (raw)
In-Reply-To: <E1EVj1T-00008I-07@fencepost.gnu.org>

On 2005-10-29 01:12, "Richard M. Stallman" <rms@gnu.org> wrote:
>     Something like this perhaps?
>
>     http://people.freebsd.org/~keramida/emacs/22/freebsd-amd64+libgcc.patch
>
> I don't know what is in that page, so I am not sure what text you're
> suggesting.  Would you please show your suggestion here
> rather than just giving a URL?

Sure.  I thought it would be ok to put it online instead of mailing the
diff to all list members.  The diff was:

%%%
Index: configure.in
===================================================================
RCS file: /cvsroot/emacs/emacs/configure.in,v
retrieving revision 1.399
diff -u -r1.399 configure.in
--- configure.in	25 Oct 2005 01:09:39 -0000	1.399
+++ configure.in	28 Oct 2005 21:54:46 -0000
@@ -238,6 +238,7 @@
     case "${canonical}" in
       alpha*-*-freebsd*)	machine=alpha ;;
       i[3456]86-*-freebsd*)	machine=intel386 ;;
+      amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
     esac
   ;;
 
Index: src/m/amdx86-64.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/m/amdx86-64.h,v
retrieving revision 1.8
diff -u -r1.8 amdx86-64.h
--- src/m/amdx86-64.h	7 Aug 2005 09:52:27 -0000	1.8
+++ src/m/amdx86-64.h	28 Oct 2005 21:54:46 -0000
@@ -100,11 +100,38 @@
 /* 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) */
%%%

  reply	other threads:[~2005-10-29 14:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26 23:52 RFC: Support for FreeBSD/amd64 Giorgos Keramidas
2005-10-27  3:58 ` Richard M. Stallman
2005-10-27  6:50 ` Frank Schmitt
2005-10-27 11:50   ` Giorgos Keramidas
2005-10-27 19:08   ` Eli Zaretskii
2005-10-27 20:13     ` Giorgos Keramidas
2005-10-27 20:56     ` Frank Schmitt
2005-10-28 18:09       ` Richard M. Stallman
2005-10-28 22:01         ` Giorgos Keramidas
2005-10-29  5:12           ` Richard M. Stallman
2005-10-29 14:47             ` Giorgos Keramidas [this message]
2005-10-30  3:36               ` Richard M. Stallman
2005-10-29 10:07         ` Eli Zaretskii
2005-10-29 18:35           ` Giorgos Keramidas
2005-10-29 20:33           ` Richard M. Stallman
2005-10-27 12:27 ` Dryice Liu
2005-10-27 14:57   ` Giorgos Keramidas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051029144724.GA1080@flame.pc \
    --to=keramida@ceid.upatras.gr \
    --cc=emacs-devel@gnu.org \
    --cc=ich@frank-schmitt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).