aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Elbrecht <snowball3@usa.net>1999-01-05 19:25:57 -0700
committerJeff Law <law@gcc.gnu.org>1999-01-05 19:25:57 -0700
commit2f197d2fea50781416712f02b730cfae2d3c4bbd (patch)
tree1b051f16c7e6c0269a3cc9bbfcbf45a8d3747b41
parent18cd4dedd4a40d06a28b4358e9a6087930274c2d (diff)
downloadgcc-2f197d2fea50781416712f02b730cfae2d3c4bbd.zip
gcc-2f197d2fea50781416712f02b730cfae2d3c4bbd.tar.gz
gcc-2f197d2fea50781416712f02b730cfae2d3c4bbd.tar.bz2
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
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/go32.h31
-rw-r--r--gcc/config/i386/x-go3224
-rw-r--r--gcc/config/i386/xm-go32.h3
-rw-r--r--gcc/configure.in1
5 files changed, 69 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b587bb6..4f38848 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
+
+ * 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.
+
Wed Jan 6 02:23:36 1999 "Charles M. Hannum" <root@ihack.net>
* 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 ec585df..1bca1b2 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 0000000..89f31ff
--- /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 c44e73ea..f171a75 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 7dc6b29..508af5e 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