Subject: Re: xsrc/29882
To: None <xsrc-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Matthias Scheler <tron@NetBSD.org>
List: netbsd-bugs
Date: 04/08/2005 21:12:02
The following reply was made to PR xsrc/29882; it has been noted by GNATS.

From: Matthias Scheler <tron@NetBSD.org>
To: NetBSD GNATS <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: xsrc/29882
Date: Fri, 8 Apr 2005 22:11:15 +0100

 	Hello,
 
 with the attached patch "src/x11" will build a XFree86 server and modules
 for it. Unfortunately this breaks "XalphaNetBSD":
 
 : undefined reference to `VidModeGetViewPort'
 /export/home/tron/obj/x11/Xserver/Xext/ext/libext.a(xf86vmode.o)(.text+0x3f44): In function `XFree86VidModeExtensionInit':
 : undefined reference to `VidModeGetViewPort'
 /export/home/tron/obj/x11/Xserver/Xext/ext/libext.a(xf86vmode.o)(.text+0x40e0): In function `XFree86VidModeExtensionInit':
 : undefined reference to `VidModeSetViewPort'
 /export/home/tron/obj/x11/Xserver/Xext/ext/libext.a(xf86vmode.o)(.text+0x40e4): In function `XFree86VidModeExtensionInit':
 : undefined reference to `VidModeSetViewPort'
 /export/home/tron/obj/x11/Xserver/Xext/ext/libext.a(xf86vmode.o)(.text+0x417c):In function `XFree86VidModeExtensionInit':
 
 I have no idea why this happens. The native build (which I cannot use
 due to lack of a NetBSD-alpha system) uses a single "libext.a" but doesn't
 run into this problem.
 
 	Kind regards
 
 -- 
 Matthias Scheler                                  http://scheler.de/~matthias/
 
 Index: share/mk/bsd.x11.mk
 ===================================================================
 RCS file: /cvsroot/src/share/mk/bsd.x11.mk,v
 retrieving revision 1.49
 diff -u -r1.49 bsd.x11.mk
 --- share/mk/bsd.x11.mk	6 Apr 2005 08:32:11 -0000	1.49
 +++ share/mk/bsd.x11.mk	8 Apr 2005 21:05:56 -0000
 @@ -48,7 +48,6 @@
  			-DDDXOSVERRORF -DDDXTIME
  
  .if !(${MACHINE} == "acorn32"	|| \
 -    ${MACHINE} == "alpha"	|| \
      ${MACHINE} == "amiga"	|| \
      ${MACHINE} == "pmax"	|| \
      ${MACHINE} == "sparc"	|| \
 @@ -69,7 +68,8 @@
  X11FLAGS.EXTENSION+=	-D__GLX_ALIGN64
  .endif
  
 -.if ${MACHINE} == "amd64"	|| \
 +.if ${MACHINE} == "alpha"	|| \
 +    ${MACHINE} == "amd64"	|| \
      ${MACHINE} == "cats"	|| \
      ${MACHINE} == "i386"	|| \
      ${MACHINE} == "macppc"	|| \
 Index: x11/Xserver/Makefile.common
 ===================================================================
 RCS file: /cvsroot/src/x11/Xserver/Makefile.common,v
 retrieving revision 1.27
 diff -u -r1.27 Makefile.common
 --- x11/Xserver/Makefile.common	5 Apr 2005 14:04:55 -0000	1.27
 +++ x11/Xserver/Makefile.common	8 Apr 2005 21:06:02 -0000
 @@ -43,7 +43,8 @@
  # XFree86 servers all need XFONT as well.
  .if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \
      ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \
 -    ${MACHINE} == "sgimips" || ${MACHINE} == "sparc64"
 +    ${MACHINE} == "sgimips" || ${MACHINE} == "sparc64" || \
 +    ${MACHINE} == "alpha"
  XSERVER_NEEDS_XFONT=	yes
  XSERVER_NEEDS_MIEXT=	yes
  XSERVER_XFREE86=	yes
 Index: x11/Xserver/Xserver/XFree86/Makefile
 ===================================================================
 RCS file: /cvsroot/src/x11/Xserver/Xserver/XFree86/Makefile,v
 retrieving revision 1.12
 diff -u -r1.12 Makefile
 --- x11/Xserver/Xserver/XFree86/Makefile	15 Apr 2004 14:53:40 -0000	1.12
 +++ x11/Xserver/Xserver/XFree86/Makefile	8 Apr 2005 21:06:02 -0000
 @@ -40,6 +40,9 @@
  .elif ${MACHINE} == "i386"
  LDADD+=	-li386
  DPADD+=	${LIBI386}
 +.elif ${MACHINE} == "alpha"
 +LDADD+=	-lalpha
 +DPADD+=	${LIBALPHA}
  .endif
  
  SYMLINKS=	${X11BINDIR}/XFree86 ${X11BINDIR}/X
 Index: x11/Xserver/hw/xfree86/bin/pcitweak/Makefile
 ===================================================================
 RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/bin/pcitweak/Makefile,v
 retrieving revision 1.2
 diff -u -r1.2 Makefile
 --- x11/Xserver/hw/xfree86/bin/pcitweak/Makefile	23 Jan 2004 08:45:02 -0000	1.2
 +++ x11/Xserver/hw/xfree86/bin/pcitweak/Makefile	8 Apr 2005 21:06:03 -0000
 @@ -28,6 +28,9 @@
  .if ${MACHINE} == "i386"
  LDADD+=	-li386
  DPADD+=	${LIBI386}
 +.elif ${MACHINE} == "alpha"
 +LDADD+=	-lalpha
 +DPADD+=	${LIBALPHA}
  .endif
  
  .if ${MACHINE_ARCH} == "x86_64"
 Index: x11/Xserver/hw/xfree86/bin/scanpci/Makefile
 ===================================================================
 RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/bin/scanpci/Makefile,v
 retrieving revision 1.4
 diff -u -r1.4 Makefile
 --- x11/Xserver/hw/xfree86/bin/scanpci/Makefile	19 Mar 2005 21:41:58 -0000	1.4
 +++ x11/Xserver/hw/xfree86/bin/scanpci/Makefile	8 Apr 2005 21:06:03 -0000
 @@ -39,5 +39,10 @@
  .endif
  .endif
  
 +.if ${MACHINE} == "alpha"
 +LDADD+= -lalpha
 +DPADD+= ${LIBALPHA}
 +.endif
 +
  .include <bsd.x11.mk>
  .include <bsd.prog.mk>
 Index: x11/Xserver/hw/xfree86/xf86_os/Makefile
 ===================================================================
 RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/xf86_os/Makefile,v
 retrieving revision 1.10
 diff -u -r1.10 Makefile
 --- x11/Xserver/hw/xfree86/xf86_os/Makefile	24 Mar 2005 05:24:20 -0000	1.10
 +++ x11/Xserver/hw/xfree86/xf86_os/Makefile	8 Apr 2005 21:06:03 -0000
 @@ -55,7 +55,15 @@
  .if ${MACHINE} == "cats"
  SRCS.bsd+=      arm_video.c bsdResource.c pm_noop.c agp_noop.c ioperm_noop.c
  .for _FN in ${SRCS.bsd}
 -CPPFLAGS.${_FN}=        -DPCVT_SUPPORT -DWSCONS_SUPPORT -DUSESTDRES -DHAVE_SYSV_IPC
 +CPPFLAGS.${_FN}=	-DPCVT_SUPPORT -DWSCONS_SUPPORT -DUSESTDRES \
 +			-DHAVE_SYSV_IPC
 +.endfor
 +.endif
 +
 +.if ${MACHINE} == "alpha"
 +SRCS.bsd+=      	alpha_video.c bsd_ev56.c
 +.for _FN in ${SRCS.bsd}
 +CPPFLAGS.${_FN}=	-DWSCONS_SUPPORT
  .endfor
  .endif
  
 @@ -67,7 +75,8 @@
  .endif
  
  .if ${MACHINE} == "macppc" || ${MACHINE} == "cats" || \
 -    ${MACHINE} == "sgimips" || ${MACHINE} == "sparc64"
 +    ${MACHINE} == "sgimips" || ${MACHINE} == "sparc64" || \
 +    ${MACHINE} == "alpha"
  SRCS.bus+=	netbsdPci.c
  .endif