1999-08-05 Donn Terry <donn@interix.com>
authorIan Lance Taylor <ian@airs.com>
Thu, 5 Aug 1999 16:03:56 +0000 (16:03 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 5 Aug 1999 16:03:56 +0000 (16:03 +0000)
* emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
INITIAL_SYMBOL_CHAQR.
* emulparams/i386pe_posix.sh: New file.
* Makefile.am (YACC): If bison is not in the source tree, use
@YACC@ rather than bison -y.
(LEX): If flex is not in the source tree, use @LEX@ rather than
flex.
(ALL_EMULATIONS): Add ei386pe_posix.o.
(ei386pe_posix.c): New target.
* configure.tgt (i[3456]86-*-interix*): New target.
* configure.host (i[3456]86-pc-interix*): New host.
* Makefile.in: Rebuild.

ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.host
ld/configure.tgt
ld/emulparams/i386pe.sh
ld/emulparams/i386pe_posix.sh [new file with mode: 0644]

index b71e2319bc81dd8543025d5d9cfddc237e888edb..2f0154f09ccfdc16d3346fbca95f9089eff768c5 100644 (file)
@@ -1,3 +1,18 @@
+1999-08-05  Donn Terry  <donn@interix.com>
+
+       * emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
+       INITIAL_SYMBOL_CHAQR.
+       * emulparams/i386pe_posix.sh: New file.
+       * Makefile.am (YACC): If bison is not in the source tree, use
+       @YACC@ rather than bison -y.
+       (LEX): If flex is not in the source tree, use @LEX@ rather than
+       flex.
+       (ALL_EMULATIONS): Add ei386pe_posix.o.
+       (ei386pe_posix.c): New target.
+       * configure.tgt (i[3456]86-*-interix*): New target.
+       * configure.host (i[3456]86-pc-interix*): New host.
+       * Makefile.in: Rebuild.
+
 1999-08-03  Ian Lance Taylor  <ian@zembu.com>
 
        * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000.
index 788e9ec902a7f616237b71397b8bf52cde154d86..3e7f23b58e37ba06a032f83650ea6181747bb53e 100644 (file)
@@ -9,9 +9,9 @@ SUBDIRS = po
 
 tooldir = $(exec_prefix)/$(target_alias)
 
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L$(srcdir)/../bison/ ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
 YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -158,6 +158,7 @@ ALL_EMULATIONS = \
        ei386nbsd.o \
        ei386nw.o \
        ei386pe.o \
+       ei386pe_posix.o \
        elnk960.o \
        em68k4knbsd.o \
        em68kaout.o \
@@ -469,6 +470,9 @@ ei386nw.c:  $(srcdir)/emulparams/i386nw.sh \
 ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
   $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
+  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
 elnk960.c: $(srcdir)/emulparams/lnk960.sh \
   $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
index 9f87088e1d7f391f6d0a6b6bdf47176cd0cb6d0e..b59641fdd70cd528f5a0b0ad1cc98e3d1b0abd1f 100644 (file)
@@ -109,9 +109,9 @@ SUBDIRS = po
 
 tooldir = $(exec_prefix)/$(target_alias)
 
-YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L$(srcdir)/../bison/ ; else echo bison -y ; fi`
+YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
 YFLAGS = -d
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -262,6 +262,7 @@ ALL_EMULATIONS = \
        ei386nbsd.o \
        ei386nw.o \
        ei386pe.o \
+       ei386pe_posix.o \
        elnk960.o \
        em68k4knbsd.o \
        em68kaout.o \
@@ -1169,6 +1170,9 @@ ei386nw.c:        $(srcdir)/emulparams/i386nw.sh \
 ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
   $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} i386pe "$(tdir_i386pe)"
+ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
+  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
 elnk960.c: $(srcdir)/emulparams/lnk960.sh \
   $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
index 701d46c667a402f36530d2c448f54ef0dbb52846..f99c811504391766c35f1f1800f4aa3e26f49e01 100644 (file)
@@ -100,6 +100,12 @@ i[3456]86-*-lynxos*)
   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
   ;;
 
+i[3456]86-pc-interix*)
+  HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
+  NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/'
+  HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
+  ;;
+
 mips*-dec-bsd*)
   HOSTING_CRT0=/usr/lib/crt0.o
   ;;
index 4a7f6e6a78cdb8f29e0ca58d8d6fc939f6bda431..ddf2445c831c6cd3fac5bf30683cc365390abc32 100644 (file)
@@ -115,6 +115,8 @@ i[3456]86-*-cygwin*)        targ_emul=i386pe ;
                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
 i[3456]86-*-mingw32*)  targ_emul=i386pe ;
                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+i[3456]86-*-interix*)  targ_emul=i386pe_posix;
+                       targ_extra_ofiles="deffilep.o pe-dll.o" ;;
 i[3456]86-*-beospe*)    targ_emul=i386beos ;;
 i[3456]86-*-beos*)     targ_emul=elf_i386_be ;;
 i[3456]86-*-vxworks*)  targ_emul=i386aout ;;
index 188a8addf0f30385d2d0a7b95aa989ada479742c..e5df29f26ede909c913b78ac7b2fd22dbcce25a2 100644 (file)
@@ -3,3 +3,6 @@ SCRIPT_NAME=pe
 OUTPUT_FORMAT="pei-i386"
 RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
 TEMPLATE_NAME=pe
+ENTRY="___mainCRTStartup"
+SUBSYSTEM=3
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/ld/emulparams/i386pe_posix.sh b/ld/emulparams/i386pe_posix.sh
new file mode 100644 (file)
index 0000000..37f51b5
--- /dev/null
@@ -0,0 +1,9 @@
+ARCH=i386
+SCRIPT_NAME=pe
+OUTPUT_FORMAT="pei-i386"
+RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
+TEMPLATE_NAME=pe
+ENTRY="___PosixProcessStartup"
+SUBSYSTEM=7
+EXECUTABLE_NAME=a.out
+INITIAL_SYMBOL_CHAR=\"_\"