This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] RDOS support for GCC
- From: Leif Ekblad <leif at rdos dot net>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jan 2006 17:55:26 +0100
- Subject: [PATCH] RDOS support for GCC
- Reply-to: leif at rdos dot net
I enclose request for patches and changelog for RDOS
support in GCC.
Regards,
Leif Ekblad
www.rdos.net/rdos
2006-01-16 Leif Ekblad <leif@rdos.net>
* config.guess: Synchronise with gnu-config
* config.sub: Synchronise with gnu-config
* config.build: Added support for RDOS build
* config.gcc: Added support for RDOS
* config.host: Added support for RDOS host
* config/i386/rdos.h: Added RDOS configuration file
Index .: config.guess
===============================================================================
diff -r -pu org/gcc-4.2-20060114/config.guess new/gcc-4.2-20060114/config.guess
--- org/gcc-4.2-20060114/config.guess 2005-11-22 21:41:02.000000000 +0100
+++ new/gcc-4.2-20060114/config.guess 2006-01-16 11:47:26.000000000 +0100
Import from config-project! (diffs not shown)
Index .: config.sub
===============================================================================
diff -r -pu org/gcc-4.2-20060114/config.sub new/gcc-4.2-20060114/config.sub
--- org/gcc-4.2-20060114/config.sub 2005-12-12 11:54:49.000000000 +0100
+++ new/gcc-4.2-20060114/config.sub 2006-01-16 11:47:23.000000000 +0100
Import from config-project! (diffs not shown)
Index gcc: config.build
===============================================================================
diff -r -pu org/gcc-4.2-20060114/gcc/config.build new/gcc-4.2-20060114/gcc/config.build
--- org/gcc-4.2-20060114/gcc/config.build 2005-12-16 10:46:22.000000000 +0100
+++ new/gcc-4.2-20060114/gcc/config.build 2006-01-16 11:49:50.000000000 +0100
@@ -85,6 +85,9 @@ case $build in
build_xm_file=i386/xm-djgpp.h
build_exeext=.exe
;;
+ i[34567]86-*-rdos*)
+ build_exeext=.exe
+ ;;
i[34567]86-*-sco3.2v5*)
# 80386 running SCO Open Server 5
build_install_headers_dir=install-headers-cpio
Index gcc: config.gcc
===============================================================================
diff -r -pu org/gcc-4.2-20060114/gcc/config.gcc new/gcc-4.2-20060114/gcc/config.gcc
--- org/gcc-4.2-20060114/gcc/config.gcc 2005-12-28 23:37:42.000000000 +0100
+++ new/gcc-4.2-20060114/gcc/config.gcc 2006-01-16 11:51:24.000000000 +0100
@@ -1262,6 +1262,10 @@ i[34567]86-*-kaos*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
tmake_file="i386/t-i386elf t-svr4"
;;
+i[34567]86-*-rdos*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rdos.h"
+ tmake_file="i386/t-i386elf t-svr4"
+ ;;
ia64*-*-elf*)
tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
tmake_file="ia64/t-ia64"
Index gcc: config.host
===============================================================================
diff -r -pu org/gcc-4.2-20060114/gcc/config.host new/gcc-4.2-20060114/gcc/config.host
--- org/gcc-4.2-20060114/gcc/config.host 2005-12-16 10:46:22.000000000 +0100
+++ new/gcc-4.2-20060114/gcc/config.host 2006-01-16 11:52:34.000000000 +0100
@@ -170,6 +170,9 @@ case ${host} in
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
host_xmake_file="${host_xmake_file} i386/x-darwin"
;;
+ i[34567]86-*-rdos*)
+ host_exeext=.exe
+ ;;
powerpc-*-beos*)
host_can_use_collect2=no
;;
Index gcc/config/i386: rdos.h
===============================================================================
/*#######################################################################
# RDOS operating system
# Copyright (C) 1988-2005, Leif Ekblad
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# The author of this program may be contacted at leif@rdos.net
#
# rdos.h
# Definitions for Intel x86 running RDOS
#
##########################################################################*/
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 RDOS)");
/* RDOS uses .exe suffix */
#undef TARGET_EXECUTABLE_SUFFIX
#define TARGET_EXECUTABLE_SUFFIX ".exe"
/* The SVR4 ABI for the i386 says that records and unions are returned
in memory. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1
/* We arrange for the whole %gs segment to map the tls area. */
#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
#undef MCOUNT_NAME
#define MCOUNT_NAME "mcount"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "short unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
#define TARGET_DECLSPEC 1
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__RDOS__"); \
builtin_define ("__INTEL__"); \
builtin_define ("_X86_"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_assert ("system=rdos"); \
} \
while (0)
#undef CPP_SPEC
#define CPP_SPEC "-D_REENTRANT"
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
/* Provide a LINK_SPEC appropriate for RDOS. */
#undef LINK_SPEC
#define LINK_SPEC "-m elf_i386"
/* Provide start and end file specs appropriate to glibc. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s"
/* A C statement to output to the stdio stream FILE an assembler
command to advance the location counter to a multiple of 1<<LOG
bytes if it is within MAX_SKIP bytes.
This is used to align code labels according to Intel recommendations. */
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
if ((LOG)!=0) \
if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
#endif
/* RDOS headers are C++-aware (and often use C++). */
#define NO_IMPLICIT_EXTERN_C