summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac35
-rw-r--r--hw/xfree86/Makefile.am11
-rw-r--r--hw/xfree86/os-support/solaris/Makefile.am44
3 files changed, 57 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index 921c0b61d..81e24f17a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -671,15 +671,44 @@ test x$XORG = xyes && case $host_os in
if test "${OS_MINOR}" -ge 8 ; then
AC_DEFINE(__SOL8__,1,[Solaris 8 or later])
fi
+ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+ if test "x$SUNCC" = "xyes"; then
+ solaris_asm_inline="yes"
+ fi
+ AC_MSG_CHECKING([whether building 32-bit or 64-bit])
+ AC_EGREP_CPP(IAM64, [
+#ifdef __LP64
+IAM64
+#endif
+ ], [SOLARIS_64="yes" ; AC_MSG_RESULT([64-bit])],
+ [SOLARIS_64="no" ; AC_MSG_RESULT([32-bit])])
+
case $host_cpu in
- sparc*) XORG_OS_PCI="sparc" ;;
- i*86) XORG_OS_PCI="ix86" ;;
+ sparc*)
+ XORG_OS_PCI="sparc"
+ SOLARIS_INOUT_ARCH="sparcv8plus"
+ ;;
+ i*86)
+ XORG_OS_PCI="ix86"
+ if test x$SOLARIS_64 = xyes ; then
+ SOLARIS_INOUT_ARCH="amd64"
+ else
+ SOLARIS_INOUT_ARCH="ia32"
+ fi
+ if test "${OS_MINOR}" -lt 8 ; then
+ solaris_usl_console="yes"
+ fi
+ ;;
*)
AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \
are supported on Solaris in this release. If you are \
interested in porting Xorg to your platform, please email \
xorg@lists.freedesktop.org.]) ;;
esac
+ AC_SUBST([SOLARIS_INOUT_ARCH])
+ if test x$solaris_asm_inline = xyes ; then
+ XORG_CFLAGS="${XORG_CFLAGS} "'$(top_srcdir)/hw/xfree86/os-support/solaris/solaris-${SOLARIS_INOUT_ARCH}.il'
+ fi
;;
*)
XORG_OS="unknown"
@@ -707,6 +736,8 @@ AC_SUBST([XORG_OS_PCI])
AM_CONDITIONAL([XORG_BUS_IX86PCI], [test "x$xorg_bus_ix86pci" = xyes])
AM_CONDITIONAL([XORG_BUS_SBUS], [test "x$xorg_bus_sbus" = xyes])
AM_CONDITIONAL([LINUX_IA64], [test "x$linux_ia64" = xyes])
+AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes])
+AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
XKBDIR="$datadir/X11/xkb"
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index a5d2f3b69..730051196 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -49,3 +49,14 @@ Xorg_LDADD = $(XORG_LIBS) \
-ldl
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+
+
+if SOLARIS_ASM_INLINE
+# Needs to be built before any files are compiled when using Sun compilers
+# so in*/out* inline definitions are properly processed.
+
+BUILT_SOURCES = os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il
+
+os-support/solaris/solaris-$(SOLARIS_INOUT_ARCH).il:
+ cd os-support/solaris ; make solaris-$(SOLARIS_INOUT_ARCH).il
+endif
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index 7f40b03df..d78f1b711 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,13 +1,12 @@
-# TODO: Fix VT support for pre-Solaris 8
-#if defined(i386Architecture) && (OSMinorVersion < 8)
-#IO_SRC = $(srcdir)/../sysv/sysv_io.c
-#KBD_SRCS = $(srcdir)/../sysv/sysv_kbd.c $(srcdir)/../shared/std_kbdEv.c
-#VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c
-#else
+if SOLARIS_USL_CONSOLE
+IO_SRC = $(srcdir)/../sysv/sysv_io.c
+KBD_SRCS = $(srcdir)/../sysv/sysv_kbd.c $(srcdir)/../shared/std_kbdEv.c
+VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c
+else
IO_SRC = sun_io.c
KBD_SRCS = sun_kbd.c sun_kbdEv.c
VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
-#endif
+endif
# TODO: Don't build agpgart on SPARC
#if defined(i386Architecture) || defined(AMD64Architecture)
@@ -16,28 +15,11 @@ AGP_SRC = sun_agp.c
#AGP_SRC = $(srcdir)/../shared/agp_noop.c
#endif
-# TODO: Support AMD64 & SPARC, and generate inline assembly .il files
-# if defined(AMD64Architecture)
-#PROWORKS_ASM_ARCH = amd64
-#PROWORKS_ASM_FLAGS = -xarch=amd64
-# elif defined(i386Architecture)
-PROWORKS_ASM_ARCH = ia32
-PROWORKS_ASM_FLAGS =
-# elif defined(SparcArchitecture) && !defined(Sparc64Architecture)
-#PROWORKS_ASM_ARCH = sparcv8plus
-#PROWORKS_ASM_FLAGS = -xarch=v8plus
-# else
-# error "Unsupported Architecture for building with Sun Compilers"
-# endif
-PROWORKS_INOUT_SRC = solaris-$(PROWORKS_ASM_ARCH).S
-
-#all:: $(PROWORKS_ASM_ARCH).il
-#includes:: $(PROWORKS_ASM_ARCH).il
-
-#CppFileTarget($(PROWORKS_ASM_ARCH).il,solaris-$(PROWORKS_ASM_ARCH).S,-DINLINE_ASM,NullParameter)
-
-$(PROWORKS_INOUT_OBJ): $(PROWORKS_INOUT_SRC)
- $(AS) -P -o $@ $(PROWORKS_ASM_FLAGS) $(PROWORKS_INOUT_SRC)
+SOLARIS_INOUT_SRC = solaris-$(SOLARIS_INOUT_ARCH).S
+DISTCLEANFILES = solaris-$(SOLARIS_INOUT_ARCH).il
+
+solaris-$(SOLARIS_INOUT_ARCH).il: solaris-${SOLARIS_INOUT_ARCH}.S
+ $(CPP) -P -DINLINE_ASM solaris-${SOLARIS_INOUT_ARCH}.S > $@
noinst_LTLIBRARIES = libsolaris.la
libsolaris_la_SOURCES = sun_bios.c sun_init.c $(IO_SRC) $(KBD_SRCS) \
@@ -46,9 +28,9 @@ libsolaris_la_SOURCES = sun_bios.c sun_init.c $(IO_SRC) $(KBD_SRCS) \
$(srcdir)/../shared/kmod_noop.c $(srcdir)/../shared/pm_noop.c \
$(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \
$(srcdir)/../shared/stdPci.c $(srcdir)/../shared/stdResource.c \
- $(VTSW_SRC) $(PROWORKS_INOUT_SRC)
+ $(VTSW_SRC) $(SOLARIS_INOUT_SRC)
-sdk_HEADERS = agpgart.h
+sdk_HEADERS = agpgart.h solaris-$(SOLARIS_INOUT_ARCH).il
AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)