From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 3 05:50:28 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05C3E16A4CF for ; Wed, 3 Mar 2004 05:50:28 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1DBF43D31 for ; Wed, 3 Mar 2004 05:50:27 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i23DoRbv060360 for ; Wed, 3 Mar 2004 05:50:27 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i23DoRSi060359; Wed, 3 Mar 2004 05:50:27 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 3 Mar 2004 05:50:27 -0800 (PST) Resent-Message-Id: <200403031350.i23DoRSi060359@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Heybey Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9D9D16A4CE; Wed, 3 Mar 2004 05:46:28 -0800 (PST) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32D1E43D41; Wed, 3 Mar 2004 05:46:28 -0800 (PST) (envelope-from ath@niksun.com) Received: from stiegl.mj.niksun.com (stiegl.mj.niksun.com [10.70.0.231]) i23DiaLv081446; Wed, 3 Mar 2004 08:44:36 -0500 (EST) (envelope-from ath@stiegl.mj.niksun.com) Received: by stiegl.mj.niksun.com (Postfix, from userid 1002) id 88A6C16540; Wed, 3 Mar 2004 08:44:36 -0500 (EST) Message-Id: <20040303134436.88A6C16540@stiegl.mj.niksun.com> Date: Wed, 3 Mar 2004 08:44:36 -0500 (EST) From: Andrew Heybey To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: nobutaka@FreeBSD.org Subject: ports/63695: Patch to make editors/emacs21 work on amd64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 13:50:28 -0000 >Number: 63695 >Category: ports >Synopsis: Patch to make editors/emacs21 work on amd64 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 03 05:50:27 PST 2004 >Closed-Date: >Last-Modified: >Originator: Andrew Heybey >Release: FreeBSD 5.2-CURRENT amd64 >Organization: NIKSUN, Inc. >Environment: System: FreeBSD sledge.lab.niksun.com 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Mar 1 20:02:43 EST 2004 jkim@sledge.lab.niksun.com:/usr/src/sys/amd64/compile/SLEDGE amd64 editors/emacs21 port version 21.3_2 >Description: Make emacs21 port compile and run on amd64. >How-To-Repeat: cd /usr/ports/editors/emacs21; make >Fix: Place attached files in /usr/ports/editors/emacs21/files. These may not be the absolute Right Thing, but they work for me. pathch-src:m:amd64.h is a new file, patch-configure.in has been modified from the current version in the port. I would like to credit the source of this amd64.h, but I can no longer remember which google result it came from... --- patch-src:m:amd64.h begins here --- --- /dev/null Wed Feb 25 21:55:00 2004 +++ src/m/amd64.h Wed Feb 25 21:53:32 2004 @@ -0,0 +1,135 @@ +/* machine description file for AMD x86-64. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +/* The following line tells the configuration script what sort of + operating system this machine is likely to run. + USUAL-OPSYS="linux" */ + +#define BITS_PER_LONG 64 +#define BITS_PER_EMACS_INT 64 +#ifndef _LP64 +#define _LP64 /* Done on Alpha -- not sure if it + should be here. -- fx */ +#endif + +/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word + is the most significant byte. */ + +#undef WORDS_BIG_ENDIAN + +/* Define NO_ARG_ARRAY if you cannot take the address of the first of a + * group of arguments and treat it as an array of the arguments. */ + +#define NO_ARG_ARRAY + +/* Define WORD_MACHINE if addresses and such have + * to be corrected before they can be used as byte counts. */ + +/* #define WORD_MACHINE */ + +/* Now define a symbol for the cpu type, if your compiler + does not define it automatically: + Ones defined so far include vax, m68000, ns16000, pyramid, + orion, tahoe, APOLLO and many others */ +/* __x86_64 defined automatically. */ + +/* Use type int rather than a union, to represent Lisp_Object */ +/* This is desirable for most machines. */ + +#define NO_UNION_TYPE + +/* Define the type to use. */ +#define EMACS_INT long +#define EMACS_UINT unsigned long +#define SPECIAL_EMACS_INT + +/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend + the 24-bit bit field into an int. In other words, if bit fields + are always unsigned. + + If you use NO_UNION_TYPE, this flag does not matter. */ + +#define EXPLICIT_SIGN_EXTEND + +/* Data type of load average, as read out of kmem. */ + +#define LOAD_AVE_TYPE long + +/* Convert that into an integer that is 100 for a load average of 1.0 */ + +#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) + +/* Define CANNOT_DUMP on machines where unexec does not work. + Then the function dump-emacs will not be defined + and temacs will do (load "loadup") automatically unless told otherwise. */ + +/* #define CANNOT_DUMP */ + +/* Define VIRT_ADDR_VARIES if the virtual addresses of + pure and impure space as loaded can vary, and even their + relative order cannot be relied on. + + Otherwise Emacs assumes that text space precedes data space, + numerically. */ + +#define VIRT_ADDR_VARIES /* XXX */ + +/* Define C_ALLOCA if this machine does not support a true alloca + and the one written in C should be used instead. + Define HAVE_ALLOCA to say that the system provides a properly + working alloca function and it should be used. + Define neither one if an assembler-language alloca + in the file alloca.s should be used. */ + +/* #define C_ALLOCA */ /* XXX */ +#define HAVE_ALLOCA + +/* Define NO_REMAP if memory segmentation makes it not work well + to change the boundary between the text section and data section + when Emacs is dumped. If you define this, the preloaded Lisp + code will not be sharable; but that's better than failing completely. */ + +#define NO_REMAP /* XXX */ + +#define PNTR_COMPARISON_TYPE unsigned long + +/* On the 64 bit architecture, we can use 60 bits for addresses */ + +#define VALBITS 60 + +/* This definition of MARKBIT is necessary because of the comparison of + ARRAY_MARK_FLAG and MARKBIT in an #if in lisp.h, which cpp doesn't like. */ + +#define MARKBIT 0x8000000000000000L + +/* Define XINT and XUINT so that they can take arguments of type int */ +#define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS)) +#define XUINT(a) ((long) (a) & VALMASK) + +/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ + +#define XPNTR(a) XUINT (a) + +/* #undef START_FILES */ /* XXX */ +/* #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o */ /* XXX */ + +/* #undef LIB_STANDARD */ /* XXX */ +/* #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o */ /* XXX */ --- patch-src:m:amd64.h ends here --- --- patch-configure.in begins here --- --- configure.in.orig Sun Mar 16 17:06:05 2003 +++ configure.in Wed Feb 25 21:56:37 2004 @@ -179,6 +179,18 @@ machine='' opsys='' unported=no case "${canonical}" in + ## FreeBSD ports + *-*-freebsd* ) + opsys=freebsd + case "${canonical}" in + alpha*-*-freebsd*) machine=alpha ;; + ia64-*-freebsd*) machine=ia64 ;; + i[3456]86-*-freebsd*) machine=intel386 ;; + sparc64-*-freebsd*) machine=sparc ;; + amd64-*-freebsd*) machine=amd64 ;; + esac + ;; + ## NetBSD ports *-*-netbsd* ) opsys=netbsd @@ -1032,7 +1044,6 @@ ;; *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; *-386bsd* ) opsys=386bsd ;; - *-freebsd* ) opsys=freebsd ;; *-nextstep* ) opsys=nextstep ;; ## Otherwise, we'll fall through to the generic opsys code at the bottom. esac @@ -2050,6 +2061,7 @@ # Solaris requires -lintl if you want strerror (which calls dgettext) # to return localized messages. AC_CHECK_LIB(intl, dgettext) +AC_CHECK_LIB(xpg4, _xpg4_setrunelocale) AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(emacs_cv_localtime_cache, --- patch-configure.in ends here --- >Release-Note: >Audit-Trail: >Unformatted: