1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

Fix compile of XFree86-4-Server on -current and add amd64 patches.

Submitted by:	peter (amd64)
This commit is contained in:
Eric Anholt 2003-07-16 21:06:13 +00:00
parent 7ff8996243
commit 085cfa9e04
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=85004
13 changed files with 153 additions and 17 deletions

View File

@ -28,7 +28,10 @@ COMMENT= XFree86-4 X server and related programs
.for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h patch-radeondri \
patch-r128_driver.c patch-mga_driver.c patch-xkbInit.c patch-radeon_dri.c \
patch-mga_dri.c patch-nv_driver.c patch-nv_setup.c patch-int10-generic.c \
patch-radeon_cursor.c patch-radeon_reg.h patch-smi
patch-radeon_cursor.c patch-radeon_reg.h patch-smi \
patch-libc_wrapper.c patch-xf86-common-Imakefile patch-loader-Imakefile \
patch-loader-elfloader.c patch-bsd-Imakefile patch-bsd-bsdResource.c \
patch-bus-Imakefile patch-r200_vtxtmp_x86.S patch-radeon_vtxtmp_x86.S
EXTRA_PATCHES+= ${FILESDIR}/${pf}
.endfor
SCRIPTS_ENV= OSVERSION=${OSVERSION} \

View File

@ -11,3 +11,16 @@
# endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__)
@@ -298,7 +302,11 @@
# endif
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
#elif defined(__x86_64__)
-# define ARCH_PCI_INIT ix86PciInit
+# if defined(__FreeBSD__)
+# define ARCH_PCI_INIT freebsdPciInit
+# else
+# define ARCH_PCI_INIT ix86PciInit
+# endif
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# if defined(linux)

View File

@ -0,0 +1,12 @@
--- programs/Xserver/hw/xfree86/os-support/bsd/Imakefile.orig Tue Jul 15 20:29:18 2003
+++ programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Tue Jul 15 20:29:20 2003
@@ -150,6 +150,9 @@
#elif defined(Sparc64Architecture)
VIDEO_SRC = sparc64_video.c
VIDEO_OBJ = sparc64_video.o
+#elif defined(x86_64Architecture)
+VIDEO_SRC = i386_video.c
+VIDEO_OBJ = i386_video.o
#else
#error Unknown architecture !
#endif

View File

@ -0,0 +1,9 @@
--- programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Wed May 22 14:38:29 2002
+++ programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Wed Jun 4 19:00:15 2003
@@ -19,5 +19,5 @@
#ifdef INCLUDE_XF86_NO_DOMAIN
-#if defined(__alpha__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
resPtr

View File

@ -0,0 +1,9 @@
--- programs/Xserver/hw/xfree86/os-support/bus/Imakefile Sun Feb 23 12:26:49 2003
+++ programs/Xserver/hw/xfree86/os-support/bus/Imakefile Wed Jun 4 19:19:39 2003
@@ -81,5 +81,5 @@
PCIDRVROBJ = ix86Pci.o linuxPci.o
-#elif defined(FreeBSDArchitecture) && defined(AlphaArchitecture)
+#elif defined(FreeBSDArchitecture) && (defined(AlphaArchitecture) || defined(x86_64Architecture))

View File

@ -0,0 +1,9 @@
--- programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c Fri Feb 21 22:00:39 2003
+++ programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c Wed Jun 4 18:55:45 2003
@@ -481,5 +481,5 @@
if (flags & XF86_MAP_SHARED) f |= MAP_SHARED;
if (flags & XF86_MAP_PRIVATE) f |= MAP_PRIVATE;
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(linux)
if (flags & XF86_MAP_32BIT) f |= MAP_32BIT;
#endif

View File

@ -0,0 +1,9 @@
--- programs/Xserver/hw/xfree86/loader/Imakefile Wed Feb 26 15:32:12 2003
+++ programs/Xserver/hw/xfree86/loader/Imakefile Wed Jun 4 19:14:55 2003
@@ -35,5 +35,5 @@
#endif
-#if defined (x86_64Architecture)
+#if defined (x86_64Architecture) && defined(linux)
ARCHDEFINES = -DDoMMAPedMerge -DMmapPageAlign
#endif

View File

@ -0,0 +1,9 @@
--- programs/Xserver/hw/xfree86/loader/elfloader.c Fri Jan 24 09:26:35 2003
+++ programs/Xserver/hw/xfree86/loader/elfloader.c Wed Jun 4 19:12:09 2003
@@ -74,5 +74,5 @@
# error No MAP_ANON?
# endif
-# if !defined (__x86_64__)
+# if !defined (__x86_64__) || !defined(__linux__)
# define MMAP_FLAGS (MAP_PRIVATE | MAP_ANON)
# else

View File

@ -0,0 +1,11 @@
--- lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S.orig Wed Jul 16 13:48:41 2003
+++ lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S Wed Jul 16 13:48:56 2003
@@ -28,7 +28,7 @@
#define GLOBL( x ) \
.globl x; \
-x##:
+x:
.data
.align 4

View File

@ -0,0 +1,11 @@
--- lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S.orig Wed Jul 16 13:47:09 2003
+++ lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S Wed Jul 16 13:47:10 2003
@@ -28,7 +28,7 @@
#define GLOBL( x ) \
.globl x; \
-x##:
+x:
.data
.align 4

View File

@ -0,0 +1,12 @@
--- programs/Xserver/hw/xfree86/common/Imakefile.orig Mon Feb 17 09:06:41 2003
+++ programs/Xserver/hw/xfree86/common/Imakefile Tue Jul 15 17:29:14 2003
@@ -18,7 +18,8 @@
#endif /* GNUMachArchitecture */
#else
# if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture) \
- || defined(OpenBSDArchitecture) || defined(NetBSDArchitecture)
+ || defined(OpenBSDArchitecture) || defined(NetBSDArchitecture) \
+ || defined(FreeBSDArchitecture)
KBD = xf86KbdBSD
# else
# ifdef LinuxArchitecture

View File

@ -1,5 +1,5 @@
--- config/cf/FreeBSD.cf.orig Tue Jan 14 18:52:12 2003
+++ config/cf/FreeBSD.cf Tue Mar 4 16:36:20 2003
+++ config/cf/FreeBSD.cf Tue Jul 15 19:57:04 2003
@@ -162,11 +162,11 @@
* ld: warning: libXThrStub.so.6, needed by libX11.so, not found
*/
@ -25,36 +25,60 @@
#endif
#endif
#ifndef ExtraLibraries
@@ -228,13 +228,17 @@
@@ -209,6 +209,10 @@
#endif
/* 3.3(?) and later has support for setting MTRRs */
+#ifdef x86_64Architecture
+#define HasMTRRSupport NO /* not yet */
+#endif
+
#ifndef HasMTRRSupport
#if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 3)
#define HasMTRRSupport YES
@@ -228,21 +232,25 @@
#endif
/*
- * 4.1/i386 and 5.0/i386 have the AGP driver.
+ * 4.1/i386 and 5.0/i386,alpha,ia64 have the AGP driver.
+ * 4.1/i386 and 5.0/i386,alpha,ia64,amd64 have the AGP driver.
*/
#ifndef HasAgpGart
#if defined(i386Architecture) && \
(OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 1))
#define HasAgpGart YES
#endif
+#if (defined(AlphaArchitecture) || defined(ia64Architecture)) && \
+ (OSMajorVersion >= 5)
+#if (defined(AlphaArchitecture) || defined(ia64Architecture) || \
+ defined(x86_64Architecture)) && (OSMajorVersion >= 5)
+#define HasAgpGart YES
+#endif
#endif
/*
@@ -461,6 +465,9 @@
#ifdef Sparc64Architecture
* SSE and 3DNow will be autodetected, so binutils is the only
* requirement for enabling this. By 4.2 they were all supported.
*/
-#if defined(i386Architecture) && \
- (OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 2))
+#if defined(x86_64Architecture) || (defined(i386Architecture) && \
+ (OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 2)))
# define HasX86Support YES
# define HasMMXSupport YES
# define Has3DNowSupport YES
@@ -455,10 +463,8 @@
#ifdef i386Architecture
#define ServerExtraDefines GccGasOption XFree86ServerDefines
#endif
-#ifdef AlphaArchitecture
-#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
-#endif
-#ifdef Sparc64Architecture
+#if defined(AlphaArchitecture) || defined(Sparc64Architecture) || \
+ defined(ia64Architecture) || defined(x86_64Architecture)
#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
#endif
+#ifdef ia64Architecture
+#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
+#endif
#define StandardDefines -DCSRG_BASED
@@ -482,18 +489,8 @@
@@ -482,18 +488,8 @@
#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#endif

View File

@ -1,12 +1,17 @@
--- config/cf/Imake.cf.orig Tue Mar 4 16:38:16 2003
+++ config/cf/Imake.cf Tue Mar 4 16:38:18 2003
@@ -232,6 +232,10 @@
--- config/cf/Imake.cf.orig Tue Feb 18 08:51:45 2003
+++ config/cf/Imake.cf Tue Jul 15 20:02:05 2003
@@ -232,6 +232,15 @@
# define Sparc64Architecture
# undef __sparc64__
# endif
+# ifdef __ia64__
+# define ia64Architecture
+# undef __ia64__
+# endif
+# ifdef __amd64__
+# define x86_64Architecture
+# undef __amd64__
+# undef __x86_64__
+# endif
#endif /* __FreeBSD__ */