From 2f197d2fea50781416712f02b730cfae2d3c4bbd Mon Sep 17 00:00:00 2001 From: Mark Elbrecht Date: Tue, 5 Jan 1999 19:25:57 -0700 Subject: [PATCH] configure.in (pc-msdosdjgpp): Set x_make to x-go32. * configure.in (pc-msdosdjgpp): Set x_make to x-go32. * configure: Rebuilt. * i386/xm-go32.h: Define LIBSTDCXX. * i386/x-go32: New. * i386/go32.h (MD_EXEC_PREFIX): Define. (FILE_NAME_ABSOLUTE_P): Define. (LINK_COMMAND_SPEC): Define. From-SVN: r24510 --- gcc/ChangeLog | 10 ++++++++++ gcc/config/i386/go32.h | 31 +++++++++++++++++++++++++++++++ gcc/config/i386/x-go32 | 24 ++++++++++++++++++++++++ gcc/config/i386/xm-go32.h | 3 +++ gcc/configure.in | 1 + 5 files changed, 69 insertions(+) create mode 100644 gcc/config/i386/x-go32 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b587bb6633c6..4f38848c0da2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Wed Jan 6 03:18:53 1999 Mark Elbrecht * expr.c (store_expr): If the lhs is a memory location pointed diff --git a/gcc/config/i386/go32.h b/gcc/config/i386/go32.h index ec585df722da..1bca1b255f9c 100644 --- a/gcc/config/i386/go32.h +++ b/gcc/config/i386/go32.h @@ -14,12 +14,43 @@ #include "i386/gas.h" +/* Search for as.exe and ld.exe in DJGPP's binary directory. */ +#define MD_EXEC_PREFIX "$DJDIR/bin/" + +/* Correctly handle absolute filename detection in cp/xref.c */ +#define FILE_NAME_ABSOLUTE_P(NAME) \ + (((NAME)[0] == '/') || ((NAME)[0] == '\\') || \ + (((NAME)[0] >= 'A') && ((NAME)[0] <= 'z') && ((NAME)[1] == ':'))) + #ifdef CPP_PREDEFINES #undef CPP_PREDEFINES #endif #define CPP_PREDEFINES "-Dunix -Di386 -DGO32 -DMSDOS \ -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386)" +/* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl. + This cannot be done in LINK_SPECS as that LINK_SPECS is processed + before library search directories are known by the linker. + This avoids problems when specs file is not available. An alternate way, + suggested by Robert Hoehne, is to use SUBTARGET_EXTRA_SPECS instead. +*/ + +#undef LINK_COMMAND_SPEC +#define LINK_COMMAND_SPEC \ +"%{!fsyntax-only: \ +%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ +\t%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ +\t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ +\t%{static:} %{L*} %D %o\ +\t%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ +\t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\ +\t-Tdjgpp.djl %{T*}}}}}}}\n\ +%{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}" + +/* Make sure that gcc will not look for .h files in /usr/local/include + unless user explicitly requests it. */ +#undef LOCAL_INCLUDE_DIR + #undef EXTRA_SECTIONS #define EXTRA_SECTIONS in_ctor, in_dtor diff --git a/gcc/config/i386/x-go32 b/gcc/config/i386/x-go32 new file mode 100644 index 000000000000..89f31ff50082 --- /dev/null +++ b/gcc/config/i386/x-go32 @@ -0,0 +1,24 @@ +# translate the version string, so it can be used on DJGPP, where only +# one dot in filename is allowed + +# to avoid recursion when redefining $(version) +_version:=$(version) +__version=$(subst ., ,$(_version)) +version=$(word 1,$(__version))$(word 2,$(__version)).$(word 3,$(__version)) + +SYSTEM_HEADER_DIR=$(DJDIR)/include +X_CPPFLAGS=-DSTANDARD_INCLUDE_DIR=\"\$$DJDIR/include\" \ + -DSTANDARD_INCLUDE_COMPONENT=\"\" + +# when building a native compiler for DJGPP, make the target_alias +# a shorter name, since otherwise it will produce some problems, when +# using the same gcc once with long filenames and once with short (8+3) +# filenames +ifeq ($(findstring -pc-msdosdjgpp,$(target_alias)),-pc-msdosdjgpp) +target_alias=djgpp +endif + +# on DJGPP the 'ln -s' does not work correctly +LN = cp -p +LN_S = cp -p + diff --git a/gcc/config/i386/xm-go32.h b/gcc/config/i386/xm-go32.h index c44e73ea4211..f171a757821c 100644 --- a/gcc/config/i386/xm-go32.h +++ b/gcc/config/i386/xm-go32.h @@ -31,3 +31,6 @@ Boston, MA 02111-1307, USA. */ #define DIR_SEPARATOR '\\' #define NO_SYS_SIGLIST 1 + +#define LIBSTDCXX "-lstdcxx" + diff --git a/gcc/configure.in b/gcc/configure.in index 7dc6b29d876e..508af5e7aeaf 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -1208,6 +1208,7 @@ changequote([,])dnl xm_file=i386/xm-go32.h tm_file=i386/go32.h tmake_file=i386/t-go32 + xmake_file=i386/x-go32 gnu_ld=yes gas=yes exeext=.exe