OSDN Git Service

* configure.in (pc-msdosdjgpp): Set x_make to x-go32.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Jan 1999 02:25:57 +0000 (02:25 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Jan 1999 02:25:57 +0000 (02:25 +0000)
        * 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24510 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/go32.h
gcc/config/i386/x-go32 [new file with mode: 0644]
gcc/config/i386/xm-go32.h
gcc/configure.in

index b587bb6..4f38848 100644 (file)
@@ -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
index ec585df..1bca1b2 100644 (file)
 
 #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 (file)
index 0000000..89f31ff
--- /dev/null
@@ -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
+
index c44e73e..f171a75 100644 (file)
@@ -31,3 +31,6 @@ Boston, MA 02111-1307, USA.  */
 #define DIR_SEPARATOR '\\'
 
 #define NO_SYS_SIGLIST 1
+
+#define LIBSTDCXX "-lstdcxx"
+
index 7dc6b29..508af5e 100644 (file)
@@ -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