This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

new support for SCO Universal Development Kit target


There's no real rocket science here, but this new target does allow
an interesting hybrid of code generation.  It fills a need in the
SCO developer community. It allows you to use EGCS to generate SCO
"universal" binaries that run unchanged on OpenServer, Unixware 2, and
Unixware 7.  (Hint: they also almost always run on Linux with ibcs
modules installed, too.)

The test results I submitted earlier are from a toolchain built with the
commands in the added doc, so the quality of the port is already pretty
good.  There are some issues to work through and I'll be tackling these
in upcoming weeks.

"UDK" is SCO parlance, but if you strongly object to the 'i686-pc-udk'
triplet we could negotiate on that.

Please review and let me know when these are commit-worthy.

RJL

Index: config.sub
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/config.sub,v
retrieving revision 1.15
diff -u -p -r1.15 config.sub
--- config.sub	1998/09/20 00:13:42	1.15
+++ config.sub	1998/09/24 02:57:17
@@ -131,6 +131,9 @@ case $os in
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-isc)
 		os=-isc2.2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -916,7 +919,7 @@ case $os in
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-            | -mingw32* | -linux-gnu* | -uxpv* | -mpeix*)
+	      | -mingw32* | -linux-gnu* | -uxpv* | -mpeix* | -udk* )
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	# CYGNUS LOCAL
Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/configure.in,v
retrieving revision 1.24
diff -u -p -r1.24 configure.in
--- configure.in	1998/09/19 21:26:17	1.24
+++ configure.in	1998/09/24 02:57:20
@@ -164,6 +164,9 @@ case "${host}" in
   i[3456]86-*-sco*)
     host_makefile_frag="${host_makefile_frag} config/mh-sco"
     ;;
+  i[3456]86-*-udk*)
+    host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
+    ;;
   i[3456]86-*-isc*)
     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
     ;;
Index: gcc/config.sub
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config.sub,v
retrieving revision 1.17
diff -u -p -r1.17 config.sub
--- config.sub	1998/09/09 02:43:21	1.17
+++ config.sub	1998/09/24 02:57:22
@@ -117,6 +117,9 @@ case $os in
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -732,7 +735,7 @@ case $os in
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -win32* | -mingw32* | -linux-gnu* | -uxpv* | -beos* )
+	      | -win32* | -mingw32* | -linux-gnu* | -uxpv* | -beos*  | -udk* )
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-linux*)
Index: gcc/configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.161
diff -u -p -r1.161 configure.in
--- configure.in	1998/09/21 21:49:58	1.161
+++ configure.in	1998/09/24 02:57:25
@@ -1296,6 +1296,17 @@ changequote([,])dnl
 		extra_parts="crtbegin.o crtend.o"
 		;;
 changequote(,)dnl
+	i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
+changequote([,])dnl
+		xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
+		xm_defines="USG POSIX"
+		tm_file=i386/udk.h
+		tmake_file="i386/t-crtpic i386/t-udk"
+		xmake_file=x-svr4
+		extra_parts="crtbegin.o crtend.o"
+		fixincludes="fixinc.svr4"
+		;;
+changequote(,)dnl
 	i[34567]86-*-osf1*)		# Intel 80386's running OSF/1 1.3+
 changequote([,])dnl
 		cpu_type=i386
Index: gcc/config/i386/t-udk
===================================================================
RCS file: t-udk
diff -N t-udk
--- /dev/null	Mon Dec 31 20:00:00 1979
+++ t-udk	Wed Sep 23 19:57:25 1998
@@ -0,0 +1,2 @@
+# Tell fixincludes to work on this set of headers
+SYSTEM_HEADER_DIR = /udk/usr/include
Index: gcc/config/i386/udk.h
===================================================================
RCS file: udk.h
diff -N udk.h
--- /dev/null	Mon Dec 31 20:00:00 1979
+++ udk.h	Wed Sep 23 19:57:25 1998
@@ -0,0 +1,35 @@
+/* Configuration for i386 interfacing with SCO's Universal Development Kit
+   probably running on OpenServer 5, Unixware 2, or Unixware 5
+ */
+
+
+/* We're very much the SVR4 target with "/udk" prepended to everything that's
+   interesting */
+
+#include "i386/sysv4.h"
+
+#undef MD_EXEC_PREFIX
+#define MD_EXEC_PREFIX 		"/udk/usr/ccs/bin/" 
+
+#undef MD_STARTFILE_PREFIX
+#define MD_STARTFILE_PREFIX 	"/udk/usr/ccs/lib/" 
+
+#if 0 /* Later. */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 
+#endif
+
+#define STANDARD_INCLUDE_DIR	"/udk/usr/include"
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+	%{b} %{Wl,*:%*} \
+	%{static:-dn -Bstatic} \
+	%{shared:-G -dy -z text} \
+	%{symbolic:-Bsymbolic -G -dy -z text} \
+	%{G:-G} \
+	%{YP,*} \
+	%{!YP,*:%{p:-Y P,/udk/usr/ccs/lib/libp:/udk/usr/lib/libp:/udk/usr/ccs/lib:/udk/usr/lib} \
+	%{!p:-Y P,/udk/usr/ccs/lib:/usr/lib}} \
+	%{Qy:} %{!Qn:-Qy}"
+
Index: wwwdocs/htdocs/install/specific.html
===================================================================
RCS file: /egcs/carton/cvsfiles/wwwdocs/htdocs/install/specific.html,v
retrieving revision 1.14
diff -u -p -r1.14 specific.html
--- specific.html	1998/09/04 23:59:05	1.14
+++ specific.html	1998/09/24 02:58:35
@@ -33,6 +33,36 @@ OpenServer-specific flags.
 tell you what you're running) require TLS597 from ftp.sco.com/TLS for
 C++ constructors and destructors to work right.
 
+<p><b>i?86-*-udk</b><br> 
+
+This target emulates the SCO Universal Development Kit and requires that
+package be installed.  It's very much like the i?86-*-unixware7 target
+but is meant to be used when hosting on a system where UDK isn't the
+default compiler such as OpenServer 5 or Unixware 2.  This target will
+generate binaries that will run on OpenServer, Unixware 2, or Unixware 7, 
+with the same warnings and caveats as the SCO UDK.
+
+<p>You can stage1 with either your native compiler or with UDK.   If you
+don't do a full bootstrap when initially building with your native compiler
+you will have an utterly unusable pile of bits as your reward.
+
+<p>This target is a little tricky to build because we have to distinguish
+it from the native tools (so it gets headers, startups, and libraries
+from the right place) while making the tools not think we're actually 
+building a cross compiler.   The easiest way to do this is with a configure
+command like this:
+
+<p>
+<code>
+	CC=/udk/usr/ccs/bin/cc CFLAGS=-O /play/egcs/configure --host=i686-pc-udk --target=i686-pc-udk --exec-prefix=udk-
+</code>
+
+<p> You should follow this with a 'make bootstrap'.  After you do a
+'make install' you can then access the UDK-targeted EGCS tools via
+'udk-gcc'.  They will coexist peacefully with any native-target EGCS
+tools you may have installed.
+
 <p><b>i?86-pc-solaris*</b><br>
 For versions of egcs before 1.0.1 you'll need a special
 <a href="http://egcs.cygnus.com/faq.html#x86solaris">x86 solaris patch</a>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]