Enable "loadable module" dlopen() scheme. Necessary to crossbuild the XFree86

server on platforms that are not supported by the Metrolink module loader
(i.e., MIPS).

Enabled for sgimips in bsd.x11.mk.
This commit is contained in:
sekiya 2004-07-13 09:29:45 +00:00
parent 2909021c43
commit 0a541ba0ea
5 changed files with 35 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.x11.mk,v 1.40 2004/04/29 00:48:04 lukem Exp $
# $NetBSD: bsd.x11.mk,v 1.41 2004/07/13 09:29:45 sekiya Exp $
.include <bsd.init.mk>
@ -70,7 +70,8 @@ X11FLAGS.EXTENSION+= -D__GLX_ALIGN64
.if ${MACHINE} == "amd64" || \
${MACHINE} == "cats" || \
${MACHINE} == "i386" || \
${MACHINE} == "macppc"
${MACHINE} == "macppc" || \
${MACHINE} == "sgimips"
# LOADABLE
X11FLAGS.LOADABLE= -DXFree86LOADER -DIN_MODULE -DXFree86Module
.endif

View File

@ -1,9 +1,14 @@
# $NetBSD: Makefile.serverlib,v 1.5 2004/02/07 06:52:04 lukem Exp $
# $NetBSD: Makefile.serverlib,v 1.6 2004/07/13 09:29:45 sekiya Exp $
NOLINT= 1
NOPIC= 1
NOPROFILE= 1
.if ${MACHINE_ARCH} != "mipseb" && ${MACHINE_ARCH} != "mipsel"
.if !defined(XMODULEDIR)
NOPIC= 1
.endif
.endif
.include <bsd.own.mk> # for NETBSDSRCDIR
.include <bsd.endian.mk>
@ -26,6 +31,16 @@ XSERVERINCDIR!= cd ${NETBSDSRCDIR}/x11/Xserver/include && ${PRINTOBJDIR}
.MAKEOVERRIDES+=XSERVERINCDIR
.endif
# Architectures that can't use the XFree86 loader (such as MIPS) can use
# dlopen() to load modules.
.if defined(XMODULEDIR)
CPPFLAGS+= ${X11FLAGS.LOADABLE}
.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
SHLIB_MAJOR= 0
SHLIB_MINOR= 0
MKPICLIB= yes
MKSTATICLIB= no
.endif
.else
.endif

View File

@ -1,7 +1,11 @@
# $NetBSD: Makefile.drivermod,v 1.3 2004/03/06 03:31:06 rtr Exp $
# $NetBSD: Makefile.drivermod,v 1.4 2004/07/13 09:29:45 sekiya Exp $
LIB=${MODULE}
# XXX this is a really bad hack to install an archive as a .o
LIB=${MODULE}
# This hack is not required for targets that use the dlopen() module scheme.
.if ${MACHINE} != "sgimips"
__archivebuild: .USE
${_MKTARGET_BUILD}
@ -13,4 +17,6 @@ __archiveinstall: .USE
${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${SYSPKGTAG} ${.ALLSRC} ${DESTDIR}${LIBDIR}/${MODULE}.o
.endif
.include <bsd.lib.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.7 2004/03/14 17:01:10 matt Exp $
# $NetBSD: Makefile,v 1.8 2004/07/13 09:29:45 sekiya Exp $
SUBDIR= ati atimisc chips fbdev glint imstt mga nv r128 radeon \
s3 s3virge savage sis tdfx trident vga
@ -13,7 +13,7 @@ SUBDIR+= apm ark cirrus cyrix dummy i128 nsc \
.endif
.if ${MACHINE} == "sgimips"
SUBDIR+= newport
SUBDIR= newport
.endif
.include <bsd.subdir.mk>

View File

@ -1,7 +1,11 @@
# $NetBSD: Makefile,v 1.2 2003/12/27 03:14:56 rtr Exp $
# $NetBSD: Makefile,v 1.3 2004/07/13 09:29:45 sekiya Exp $
SUBDIR= mouse calcomp citron digitaledge dmc dynapro elographics fpit \
hyperpen js_x kbd magellan microtouch mutouch palmax penmount \
spaceorb summa tek4957 void wacom
.if ${MACHINE} == "sgimips"
SUBDIR= mouse kbd void
.endif
.include <bsd.subdir.mk>