Changeset 9


Ignore:
Timestamp:
Apr 16, 2003, 4:03:38 PM (22 years ago)
Author:
bird
Message:

Applied initial diff from Platon.

Location:
trunk/src/gcc
Files:
24 added
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gcc/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    245245  *-*-sysv*)
    246246    host_makefile_frag="${host_makefile_frag} config/mh-sysv"
     247    ;;
     248  i[3456]86-*-os2*)
     249    host_makefile_frag="${host_makefile_frag} config/mh-emx"
    247250    ;;
    248251esac
  • trunk/src/gcc/gcc/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    590590# of HOST_CFLAGS in build-make to match.
    591591ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \
    592   $(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
     592  $(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) $(CLH_CFLAGS) @DEFS@
    593593
    594594# Likewise.
     
    620620HOST_PRINT = $(HOST_PREFIX)print-rtl.o
    621621HOST_ERRORS = $(HOST_PREFIX)errors.o
     622
     623# This gets linked into gcc if command-line help was enabled
     624CLH_LIBS = @gcc_clh_libs@
     625# These definitions enables --help for gcc
     626CLH_CFLAGS = @gcc_clh_cflags@
     627CLH_GCC = @gcc_clh_gcc@
     628CLH_CPP = @gcc_clh_cpp@
     629CLH_G77 = @gcc_clh_g77@
     630CLH_GCJ = @gcc_clh_gcj@
    622631
    623632# Specify the directories to be searched for header files.
     
    944953# and CC is `gcc'.  It is renamed to `gcc' when it is installed.
    945954xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \
    946    version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
     955   version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CLH_GCC)
    947956        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \
    948           prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
     957          prefix.o version.o $(EXTRA_GCC_OBJS) $(CLH_GCC) $(LIBS)
    949958
    950959# cpp is to cpp0 as gcc is to cc1.
     
    952961# instead of gccspec.o.
    953962cpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \
    954    version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
     963   version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CLH_CPP)
    955964        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \
    956           prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
     965          prefix.o version.o $(EXTRA_GCC_OBJS) $(CLH_CPP) $(LIBS)
    957966
    958967# Dump a specs file to make -B./ read these specs over installed ones.
     
    16231632halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) $(SYSTEM_H) halfpic.h
    16241633
     1634clh.o: clh.c $(CONFIG_H)
     1635        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
     1636              -c `echo $(srcdir)/clh.c | sed 's,^\./,,'`
     1637
     1638clh_gcc.c: doc/invoke.texi mkoptdesc.sh
     1639        ./mkoptdesc.sh doc/invoke.texi gcc > clh_gcc.c
     1640
     1641clh_cpp.c: doc/invoke.texi mkoptdesc.sh
     1642        ./mkoptdesc.sh doc/invoke.texi cpp > clh_cpp.c
     1643
    16251644#
    16261645
     
    27412760          RANLIB_FOR_TARGET="$$r_f_t" \
    27422761          DESTDIR="$(DESTDIR)" \
     2762          DESTDIR="$(DESTDIR)" \
    27432763          libsubdir="$(libsubdir)" \
    27442764          slibdir="$(slibdir)" \
     
    27672787          INSTALL_DATA="$(INSTALL_DATA)" \
    27682788          RANLIB_FOR_TARGET="$$r_f_t" \
    2769           DESTDIR="$(DESTDIR)" \
    27702789          libsubdir="$(libsubdir)" \
    27712790          slibdir="$(slibdir)" \
  • trunk/src/gcc/gcc/config.gcc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    15781578        fi
    15791579        ;;
     1580i*86-pc-*emx)           # i?86 running OS/2
     1581        xm_file=i386/xm-emx.h
     1582        tm_file=i386/emx.h
     1583        extra_objs=emx.o
     1584        xm_defines="USG BSTRING NO_SYS_SIGLIST"
     1585        exeext=.exe
     1586        tmake_file=i386/t-emx
     1587        fixincludes=Makefile.in
     1588        target_alias=${host}
     1589        CFLAGS="-Zstack 1024 -Zcrtdll"
     1590        if test x$enable_threads = xyes; then
     1591                thread_file=os2
     1592        fi
     1593        gas=yes
     1594        gnu_ld=yes
     1595        ;;
    15801596i[34567]86-*-interix*)
    15811597        tm_file="i386/i386-interix.h interix.h"
  • trunk/src/gcc/gcc/config/i386/i386.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    629629const char *ix86_align_jumps_string;
    630630
     631/* Power of two alignment for constant strings in bytes.  */
     632const char *ix86_align_constr_string;
     633
    631634/* Power of two alignment for stack boundary in bytes.  */
    632635const char *ix86_preferred_stack_boundary_string;
     
    641644/* Power of two alignment for functions.  */
    642645const char *ix86_align_funcs_string;
     646
     647/* Power of two alignment for constant strings.  */
     648int ix86_align_constr;
    643649
    644650/* Prefix built by ASM_GENERATE_INTERNAL_LABEL.  */
     
    852858      const int align_jump_max_skip;
    853859      const int align_func;
     860      const int align_constr;
    854861      const int branch_cost;
    855862    }
    856863  const processor_target_table[PROCESSOR_max] =
    857864    {
    858       {&i386_cost, 0, 0, 4, 3, 4, 3, 4, 1},
    859       {&i486_cost, 0, 0, 16, 15, 16, 15, 16, 1},
    860       {&pentium_cost, 0, 0, 16, 7, 16, 7, 16, 1},
    861       {&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16, 1},
    862       {&k6_cost, 0, 0, 32, 7, 32, 7, 32, 1},
    863       {&athlon_cost, 0, 0, 16, 7, 64, 7, 16, 1},
    864       {&pentium4_cost, 0, 0, 0, 0, 0, 0, 0, 1}
     865      {&i386_cost, 0, 0, 4, 3, 4, 3, 4, 2, 1},
     866      {&i486_cost, 0, 0, 16, 15, 16, 15, 16, 2, 1},
     867      {&pentium_cost, 0, 0, 16, 7, 16, 7, 16, 5, 1},
     868      {&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16, 5, 1},
     869      {&k6_cost, 0, 0, 32, 7, 32, 7, 32, 5, 1},
     870      {&athlon_cost, 0, 0, 16, 7, 64, 7, 16, 5, 1},
     871      {&pentium4_cost, 0, 0, 0, 0, 0, 0, 0, 0, 1}
    865872    };
    866873
     
    11231130    }
    11241131
     1132  /* Validate -malign-strings= value, or provide default.  */
     1133  ix86_align_constr = processor_target_table[ix86_cpu].align_constr;
     1134  if (ix86_align_constr_string)
     1135    {
     1136      i = atoi (ix86_align_constr_string);
     1137      if (i < 0 || i > MAX_CODE_ALIGN)
     1138        error ("-malign-strings=%d is not between 0 and %d", i, MAX_CODE_ALIGN);
     1139      else
     1140        ix86_align_constr = i;
     1141    }
     1142
    11251143  /* Validate -mbranch-cost= value, or provide default.  */
    11261144  ix86_branch_cost = processor_target_table[ix86_cpu].branch_cost;
     
    12671285  { "shared",    0, 0, true,  false, false, ix86_handle_shared_attribute },
    12681286#endif
     1287#ifdef EMX
     1288  { "system",    0, 0, false, true,  true,  ix86_handle_cdecl_attribute },
     1289  { "optlink",   0, 0, false, true,  true,  ix86_handle_optlink_attribute },
     1290#endif
    12691291  { NULL,        0, 0, false, false, false, NULL }
    12701292};
     
    15831605      if (attr)
    15841606        cum->nregs = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr)));
     1607#ifdef EMX
     1608      if (lookup_attribute ("optlink", TYPE_ATTRIBUTES (fntype)))
     1609        {
     1610          cum->nregs = 3; cum->optlink = 1;
     1611        }
     1612#endif /* EMX */
    15851613    }
    15861614  cum->maybe_vaarg = false;
     
    21762204        {
    21772205          cum->words += words;
     2206#ifdef EMX
     2207          if (cum->optlink && mode == BLKmode)
     2208            return;                     /* Skip aggregates */
     2209#endif /* EMX */
    21782210          cum->nregs -= words;
    21792211          cum->regno += words;
     
    22402272
    22412273      case BLKmode:
     2274#ifdef EMX
     2275        if (cum->optlink)
     2276          break;
     2277        /* fall through */
     2278#endif /* EMX */
    22422279      case DImode:
    22432280      case SImode:
     
    22452282      case QImode:
    22462283        if (words <= cum->nregs)
     2284#ifdef EMX
     2285          if (cum->optlink)
     2286            {
     2287              ret = gen_rtx (PARALLEL, mode, rtvec_alloc (2));
     2288              XVECEXP (ret, 0, 0) = gen_rtx (EXPR_LIST, VOIDmode,
     2289                                             NULL_RTX, const0_rtx);
     2290              XVECEXP (ret, 0, 1) = gen_rtx (EXPR_LIST, VOIDmode,
     2291                                             gen_rtx (REG, mode, cum->regno),
     2292                                             const0_rtx);
     2293            }
     2294          else
     2295#endif /* EMX */
    22472296          ret = gen_rtx_REG (mode, cum->regno);
    22482297        break;
     
    22592308               words, cum->words, cum->nregs, GET_MODE_NAME (mode), named);
    22602309
     2310#ifdef EMX
     2311      if (ret && GET_CODE (ret) == PARALLEL)
     2312        fprintf (stderr, ", stack/reg=%%e%s",
     2313                 reg_names[ REGNO(XEXP (XVECEXP (ret, 0, 1), 0))]);
     2314      else
     2315#endif /* EMX */
    22612316      if (ret)
    22622317        fprintf (stderr, ", reg=%%e%s", reg_names[ REGNO (ret) ]);
     
    36733728  struct ix86_frame frame;
    36743729
     3730#ifdef EMX
     3731  if (TARGET_EPILOGUE)
     3732    return 0;
     3733#endif /* EMX */
    36753734#ifdef NON_SAVING_SETJMP
    36763735  if (NON_SAVING_SETJMP && current_function_calls_setjmp)
     
    1076410823    }
    1076510824  else if (TREE_CODE (exp) == STRING_CST && TREE_STRING_LENGTH (exp) >= 31
    10766            && align < 256)
    10767     return 256;
     10825           && !optimize_size && align < (8 << ix86_align_constr))
     10826    return 8 << ix86_align_constr;
    1076810827
    1076910828  return align;
  • trunk/src/gcc/gcc/config/i386/i386.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    439439  { "align-functions=", &ix86_align_funcs_string,               \
    440440    N_("Function starts are aligned to this power of 2") },     \
     441  { "align-strings=",   &ix86_align_constr_string,              \
     442    N_("Constant strings are aligned to this power of 2") },    \
    441443  { "preferred-stack-boundary=",                                \
    442444    &ix86_preferred_stack_boundary_string,                      \
     
    16891691  int sse_regno;                /* next available sse register number */
    16901692  int maybe_vaarg;              /* true for calls to possibly vardic fncts.  */
     1693#ifdef EMX
     1694  int optlink;                  /* nonzero if optlink (vs. regparm) */
     1695#endif /* EMX */
    16911696} CUMULATIVE_ARGS;
    16921697
     
    31603165extern const char *ix86_align_jumps_string;     /* power of two alignment for non-loop jumps */
    31613166extern const char *ix86_align_funcs_string;     /* power of two alignment for functions */
     3167extern const char *ix86_align_constr_string;    /* power of two alignment for constant strings */
    31623168extern const char *ix86_preferred_stack_boundary_string;/* power of two alignment for stack boundary */
    31633169extern const char *ix86_branch_cost_string;     /* values 1-5: see jump.c */
  • trunk/src/gcc/gcc/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    343343], [enable_shared=yes])
    344344AC_SUBST(enable_shared)
     345
     346# Enable command-line help
     347AC_ARG_ENABLE(clh,
     348[  --enable-clh            enable GCC command-line help (+~90K executable!)])
    345349
    346350# Determine the host, build, and target systems
     
    21132117        .4byte  0
    21142118EOF
    2115       if ($gcc_cv_as -o conftest.o conftest.s; exit $?) 1>&AC_FD_CC 2>&1; then
    2116         if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&AC_FD_CC 2>&1; then
    2117 changequote(,)dnl
    2118           if $gcc_cv_objdump -h conftest.so 2>&AC_FD_CC \
    2119              | grep 'eh_frame_hdr[      ]*0*[01][048cC][        ]' 1>&AC_FD_CC 2>&1; then
    2120             gcc_cv_ld_eh_frame_hdr_works=yes; break
    2121           else
    2122             $gcc_cv_objdump -h conftest.so 2>/dev/null | grep eh_frame_hdr 1>&AC_FD_CC 2>&1
    2123           fi
    2124 changequote([,])dnl
     2119dnl      if ($gcc_cv_as -o conftest.o conftest.s; exit $?) 1>&AC_FD_CC 2>&1; then
     2120dnl        if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&AC_FD_CC 2>&1; then
     2121dnl changequote(,)dnl
     2122dnl       if $gcc_cv_objdump -h conftest.so 2>&AC_FD_CC \
     2123dnl          | grep 'eh_frame_hdr[      ]*0*[01][048cC][        ]' 1>&AC_FD_CC 2>&1; then
     2124dnl         gcc_cv_ld_eh_frame_hdr_works=yes; break
     2125dnl       else
     2126dnl         $gcc_cv_objdump -h conftest.so 2>/dev/null | grep eh_frame_hdr 1>&AC_FD_CC 2>&1
     2127dnl       fi
     2128dnl changequote([,])dnl
    21252129        fi
    21262130      fi
     
    24912495AC_SUBST(objdir)
    24922496
     2497# Test if command-line help was enabled
     2498if [[ "x${enable_clh}" = xyes ]]; then
     2499        echo "Including GCC Command-Line Help"
     2500        host_extra_gcc_objs="$host_extra_gcc_objs clh${objext}"
     2501        gcc_clh_libs=-ltermcap
     2502        gcc_clh_cflags=-DCLH
     2503        gcc_clh_gcc="clh_gcc"${objext}
     2504        gcc_clh_cpp="clh_cpp"${objext}
     2505        gcc_clh_g77="clh_g77"${objext}
     2506        gcc_clh_gcj="clh_gcj"${objext}
     2507fi
     2508
    24932509# Process the language and host/target makefile fragments.
    24942510${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
     
    25242540AC_SUBST(gcc_version_full)
    25252541AC_SUBST(gcc_version_trigger)
     2542AC_SUBST(gcc_clh_libs)
     2543AC_SUBST(gcc_clh_cflags)
     2544AC_SUBST(gcc_clh_gcc)
     2545AC_SUBST(gcc_clh_cpp)
     2546AC_SUBST(gcc_clh_g77)
     2547AC_SUBST(gcc_clh_gcj)
    25262548AC_SUBST(host_exeext)
    25272549AC_SUBST(host_extra_gcc_objs)
  • trunk/src/gcc/gcc/cp/Make-lang.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    7373
    7474# Create the compiler driver for g++.
    75 GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o 
    76 g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
     75GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o
     76g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(CLH_GCC) $(LIBDEPS)
    7777        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
    78           $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
     78          $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(CLH_GCC) $(LIBS)
    7979
    8080# Create a version of the g++ driver which calls the cross-compiler.
  • trunk/src/gcc/gcc/cppinit.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    4444# define INO_T_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof (SRC))
    4545#else
    46 # if (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__
     46# if (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__ || defined __EMX__
    4747#  define INO_T_EQ(A, B) 0
    4848# else
     
    655655  return result;
    656656}
    657 
    658657
    659658/* This structure defines one built-in identifier.  A node will be
  • trunk/src/gcc/gcc/cppmain.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    7575     char **argv;
    7676{
     77#ifdef COMPILER_HOST_INITIALIZATION
     78  /* Perform host dependant initialization when needed.  */
     79  COMPILER_HOST_INITIALIZATION;
     80#endif
     81
    7782  general_init (argv[0]);
    7883
  • trunk/src/gcc/gcc/doc/invoke.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    23622362@item -W
    23632363@opindex W
    2364 Print extra warning messages for these events:
     2364Print extra warning messages. The following events will produce warnings:
    23652365
    23662366@itemize @bullet
     
    38043804@opindex fbranch-probabilities
    38053805After running a program compiled with @option{-fprofile-arcs}
    3806 (@pxref{Debugging Options,, Options for Debugging Your Program or
    3807 @command{gcc}}), you can compile it a second time using
     3806(@pxref{Debugging Options,, Options for Debugging Your Program or @command{gcc}}),
     3807you can compile it a second time using
    38083808@option{-fbranch-probabilities}, to improve optimizations based on
    38093809the number of times each branch was taken.  When the program
     
    1019910199compiler will use mblen and mbtowc as defined by the default locale to
    1020010200recognize and translate multibyte characters.
     10201
     10202@item CLH_TERM
     10203@item TERM
     10204@findex CLH_TERM
     10205@findex TERM
     10206If @code{CLH_TERM} is set, or as a fallback @code{TERM} is set, @i{GCC}
     10207built-in command-line help will use it as a index into @code{TERMCAP} file
     10208to highlight the text of command-line help.
     10209
     10210These variables affects only the appearance of @i{GCC} built-in command-line
     10211help, and only if @i{GCC} was configured using @i{--enable-clh}.
     10212@code{CLH_TERM} is preferred over @code{TERM}, and can additionaly have a
     10213value of "-" which indicates to display command-line help with no highlighting.
    1020110214@end table
    1020210215
  • trunk/src/gcc/gcc/dwarf2out.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    20352035    }
    20362036
    2037 #ifndef EH_FRAME_SECTION_NAME
     2037#if !defined (EH_FRAME_SECTION_NAME) || defined (DWARF2_FRAMEINFO_NULL_TERMINATED)
    20382038  if (for_eh)
    20392039    dw2_asm_output_data (4, 0, "End of Table");
  • trunk/src/gcc/gcc/f/Make-lang.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    6868  f77.stage1 f77.stage2 f77.stage3 f77.stage4
    6969
     70clh_g77.c: f/invoke.texi mkoptdesc.sh
     71        ./mkoptdesc.sh f/invoke.texi g77 > clh_g77.c
     72
    7073g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h $(SYSTEM_H) $(GCC_H) \
    7174        $(CONFIG_H)
     
    8184# Create the compiler driver for g77.
    8285g77$(exeext): gcc.o g77spec.o g77version.o version.o prefix.o intl.o \
    83   $(LIBDEPS) $(EXTRA_GCC_OBJS)
     86  $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CLH_G77)
    8487        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o g77version.o \
    85            version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS)
     88           version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(CLH_G77) $(LIBS)
    8689
    8790# Create a version of the g77 driver which calls the cross-compiler.
  • trunk/src/gcc/gcc/fix-header.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    10791079  long int inf_size;
    10801080  struct symbol_list *cur_symbols;
     1081
     1082#if defined (__EMX__)
     1083  return 0;     // fix-header does only harm to emx` includes
     1084#endif
    10811085
    10821086  if (argv[0] && argv[0][0])
  • trunk/src/gcc/gcc/fixinc/mkfixinc.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    2828                MAKE="${MAKE} TARGETS=oneprocess"
    2929                ;;
    30 
     30        *-*-os2* )
     31                fixincludes=
     32                ;;
    3133        * )
    3234                MAKE="${MAKE} TARGETS=oneprocess"
  • trunk/src/gcc/gcc/fixinc/procopen.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    4646 * If you do not wish that, delete this exception notice.
    4747 */
    48 #include "auto-host.h"
    49 #include "ansidecl.h"
    50 #include "system.h"
    51 
     48
     49#include "fixlib.h"
    5250#include "server.h"
    53 #include "fixlib.h"
    5451
    5552STATIC const char* def_args[] =
  • trunk/src/gcc/gcc/fixinc/server.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    4646 * If you do not wish that, delete this exception notice.
    4747 */
    48 #include "auto-host.h"
    49 
    50 #include "ansidecl.h"
    51 #include "system.h"
     48
     49#include "fixlib.h"
     50#include "server.h"
    5251#include <signal.h>
    53 
    54 #include "server.h"
    5552
    5653#if !defined(volatile) && !defined(HAVE_VOLATILE)
  • trunk/src/gcc/gcc/function.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    64976497  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL,
    64986498                     VOIDmode, 0);
     6499#ifdef NAME__EH_INIT
     6500  if (flag_exceptions)
     6501    emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__EH_INIT), LCT_NORMAL,
     6502                     VOIDmode, 0);
     6503#endif
    64996504#endif
    65006505}
  • trunk/src/gcc/gcc/gcc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    333333                                                 const char *));
    334334#endif
    335 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
     335#if (defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)) && !defined (NO_FORCE_EXEOBJ_SUFFIX)
    336336static const char *convert_filename     PARAMS ((const char *, int, int));
    337337#endif
     
    10041004   {"--write-dependencies", "-MD", 0},
    10051005   {"--write-user-dependencies", "-MMD", 0},
     1006#ifdef CLH
     1007   {"--help", "-h", "oj"},
     1008#endif
    10061009   {"--", "-f", "*j"}
    10071010 };
     
    11901193          i++;
    11911194        }
    1192 
    11931195      /* Handle old-fashioned options--just copy them through,
    11941196         with their arguments.  */
     
    17091711/* Name with which this program was invoked.  */
    17101712
    1711 static const char *programname;
     1713const char *programname;
    17121714
    17131715
     
    30233025
    30243026
    3025 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
     3027#if (defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)) && !defined (NO_FORCE_EXEOBJ_SUFFIX)
    30263028
    30273029/* Convert NAME to a new name if it is the standard suffix.  DO_EXE
     
    33433345    }
    33443346
     3347#ifndef __EMX__
    33453348  /* Use LPATH like LIBRARY_PATH (for the CMU build program).  */
     3349  /* Under OS/2 (__EMX__) LPATH is used in LANManager client & server */
    33463350  GET_ENV_PATH_LIST (temp, "LPATH");
    33473351  if (temp && *cross_compile == '0')
     
    33753379        }
    33763380    }
     3381#endif /* not __EMX__ */
    33773382
    33783383  /* Convert new-style -- options to old-style.  */
     
    35773582          verbose_flag++;
    35783583        }
     3584#ifdef CLH
     3585      else if (! strncmp (argv[i], "-h", 2))
     3586        {
     3587          extern int clh_display (const char *text, const char *selector);
     3588          extern char *gcc_clh_text;
     3589          exit (clh_display (gcc_clh_text, &argv[i][2]));
     3590        }
     3591#endif /* CLH */
    35793592      else if (argv[i][0] == '-' && argv[i][1] != 0)
    35803593        {
     
    37233736            case 'o':
    37243737              have_o = 1;
     3738#ifndef NO_FORCE_EXEOBJ_SUFFIX
    37253739#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
    37263740              if (! have_c)
     
    37583772                argv[i] = convert_filename (argv[i], ! have_c, 0);
    37593773#endif
     3774#endif
    37603775              goto normal_switch;
    37613776
     
    38263841  /* Use 2 as fourth arg meaning try just the machine as a suffix,
    38273842     as well as trying the machine and the version.  */
    3828 #ifndef OS2
    38293843  add_prefix (&exec_prefixes, standard_exec_prefix, "GCC",
    38303844              PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0);
     
    38333847  add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
    38343848              PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0);
    3835 #endif
    38363849
    38373850  add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
     
    40784091      else
    40794092        {
    4080 #ifdef HAVE_TARGET_OBJECT_SUFFIX
     4093#if defined (HAVE_TARGET_OBJECT_SUFFIX) && !defined (NO_FORCE_EXEOBJ_SUFFIX)
    40814094          argv[i] = convert_filename (argv[i], 0, access (argv[i], F_OK));
    40824095#endif
     
    61626175
    61636176  if (n_infiles == added_libraries)
     6177#ifdef CLH
     6178    fatal ("no input files, try \"%s --help\"", programname);
     6179#else
    61646180    fatal ("no input files");
     6181#endif
    61656182
    61666183  /* Make a place to record the compiler output file names
  • trunk/src/gcc/gcc/genattrtab.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    61156115  int i;
    61166116
     6117#ifdef EMX
     6118  /* Otherwise we can't use more than 32Mb memory and genattrtab uses a lot */
     6119  _uflags (_UF_SBRK_MODEL, _UF_SBRK_ARBITRARY);
     6120#endif
     6121
    61176122  progname = "genattrtab";
    61186123
  • trunk/src/gcc/gcc/genmultilib

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    4141# argument is empty, the option names will be used as the directory
    4242# names.
     43# If number of elements in second argument is bigger than number of options
     44# in the first argument, the n+1'th element is used as default directory
     45# name (i.e. when no one of options specified in argument 1 was used)
    4346
    4447# The optional third argument is a list of options which are
     
    237240fi
    238241
     242# See if default directory was specified
     243if [ -n "$1" ]; then
     244  defaultdir="$1"
     245else
     246  defaultdir="."
     247fi
    239248# We need another recursive shell script to correctly handle positive
    240249# matches.  If we are invoked as
     
    276285done
    277286optout=`echo ${optout} | sed -e 's/^ //'`
    278 echo "\". ${optout};\","
     287echo "\"${defaultdir} ${optout};\","
    279288
    280289# Work over the list of combinations.  We have to translate each one
  • trunk/src/gcc/gcc/gthr.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    7979     DCE threads with -D_DCE_THREADS
    8080     Solaris/UI threads with -D_SOLARIS_THREADS
     81     OS/2 threads with -D_OS2_THREADS
    8182*/
    8283
     
    8889#elif _SOLARIS_THREADS
    8990#include "gthr-solaris.h"
     91#elif _OS2_THREADS
     92#include "gthr-os2.h"
    9093
    9194/* Include GTHREAD_FILE if one is defined.  */
  • trunk/src/gcc/gcc/java/Make-lang.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    6969# Create the compiler driver for $(GCJ).
    7070$(GCJ)$(exeext): gcc.o jvspec.o version.o \
    71            prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
     71           prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS) $(CLH_GCJ)
    7272        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o jvspec.o prefix.o intl.o \
    73           version.o $(EXTRA_GCC_OBJS) $(LIBS)
     73          version.o $(EXTRA_GCC_OBJS) $(CLH_GCJ) $(LIBS)
    7474
    7575# Create a version of the $(GCJ) driver which calls the cross-compiler.
     
    9797        exit 1; } ; \
    9898        mv -f k$$$$.h keyword.h)
     99
     100clh_gcj.c: java/gcj.texi mkoptdesc.sh
     101        ./mkoptdesc.sh java/gcj.texi gcj > clh_gcj.c
    99102
    100103# Executables built by this Makefile:
  • trunk/src/gcc/gcc/libgcc2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    19161916    }
    19171917#endif
    1918 #if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION)
     1918#if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION) && !defined (DONT_AUTOREGISTER_FRAME_INFO)
    19191919  {
    19201920    static int completed = 0;
     
    19351935__do_global_ctors (void)
    19361936{
    1937 #ifdef EH_FRAME_SECTION_NAME
     1937#if defined (EH_FRAME_SECTION_NAME) && !defined (DONT_AUTOREGISTER_FRAME_INFO)
    19381938  {
    19391939    static struct object object;
  • trunk/src/gcc/gcc/mklibgcc.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    1717# LIB2ADDEH
    1818# LIB2ADDEHDEP
     19# LIB2FUNCS_OMIT
    1920# FPBIT
    2021# FPBIT_FUNCS
  • trunk/src/gcc/gcc/prefix.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    274274#ifdef UPDATE_PATH_HOST_CANONICALIZE
    275275  /* Perform host dependent canonicalization when needed.  */
    276   UPDATE_PATH_HOST_CANONICALIZE (path);
     276  UPDATE_PATH_HOST_CANONICALIZE (result);
    277277#endif
    278278
     
    297297  int len;
    298298{
     299#ifndef __EMX__
    299300  std_prefix = save_string (prefix, len);
    300 }
     301#endif
     302}
  • trunk/src/gcc/gcc/target-def.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    5858#define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
    5959#define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
     60#ifndef TARGET_ASM_FUNCTION_BEGIN_EPILOGUE
    6061#define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
     62#endif
    6163
    6264#if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
  • trunk/src/gcc/gcc/toplev.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    46564656  int i;
    46574657
     4658#ifdef COMPILER_HOST_INITIALIZATION
     4659  /* Perform host dependant initialization when needed.  */
     4660  COMPILER_HOST_INITIALIZATION;
     4661#endif
     4662
    46584663  /* Save in case md file wants to emit args as a comment.  */
    46594664  save_argc = argc;
  • trunk/src/gcc/gcc/tradcpp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    524524  pending_dir *pend = (pending_dir *) xcalloc (argc, sizeof (pending_dir));
    525525  int no_standard_includes = 0;
     526
     527#ifdef COMPILER_HOST_INITIALIZATION
     528  /* Perform host dependant initialization when needed.  */
     529  COMPILER_HOST_INITIALIZATION;
     530#endif
    526531
    527532  hex_init ();
  • trunk/src/gcc/libiberty/basename.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    2222
    2323#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
    24   defined (__OS2__)
     24  defined (__OS2__) || defined (__EMX__)
    2525#define HAVE_DOS_BASED_FILE_SYSTEM
    2626#ifndef DIR_SEPARATOR_2
  • trunk/src/gcc/libiberty/config.table

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    77  i370-*-opened*)       frag=mh-openedition ;;
    88  i[345]86-*-windows*)  frag=mh-windows ;;
     9  *-*-*emx)             frag=mh-emx ;;
    910esac
    1011
  • trunk/src/gcc/libiberty/getpwd.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    5757#endif
    5858
    59 #if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)))
     59#if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__EMX__))
    6060
    6161/* Get the working directory.  Use the PWD environment variable if it's
  • trunk/src/gcc/libiberty/pexecute.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    8282(??? It's not clear that GCC passes this flag correctly).  (@code{@var{flags} &
    8383PEXECUTE_FIRST}) is nonzero for the first process in chain.
    84 (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the last process
     84(@code{@var{flags} & PEXECUTE_LAST}) is nonzero for the last process
    8585in chain.  The first/last flags could be simplified to only mark the
    8686last of a chain of processes but that requires the caller to always
     
    484484#ifdef OS2
    485485
    486 /* ??? Does OS2 have process.h? */
     486/* This is for non-EMX OS/2 port (is it floating around anyway?) */
    487487extern int spawnv ();
    488488extern int spawnvp ();
     
    663663/* include for Unix-like environments but not for Dos-like environments */
    664664#if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
    665     && ! (defined (_WIN32) && ! defined (_UWIN))
     665    && ! (defined (_WIN32) && ! defined (_UWIN)) && ! defined (__EMX__)
    666666
    667667extern int execv ();
     
    790790}
    791791
    792 #endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) */
     792#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! _UWIN) && ! && ! __EMX__ */
     793
     794#ifdef __EMX__
     795
     796#undef abort
     797#include <process.h>
     798#include <stdlib.h>
     799#define INCL_DOSPROCESS
     800#include <os2.h>
     801
     802int
     803pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
     804     const char *program;
     805     char * const *argv;
     806     const char *this_pname;
     807     const char *temp_base;
     808     char **errmsg_fmt, **errmsg_arg;
     809     int flags;
     810{
     811  static int last_pipe_input = STDIN_FILE_NO;
     812  int pid;
     813  int pdes[2], org_stdin, org_stdout;
     814  int input_desc = last_pipe_input;
     815  int output_desc = STDOUT_FILE_NO;
     816  int pipes_supported = _osmode != DOS_MODE || (_emx_env & 0x1000);
     817
     818  /* Since the function can reside in a DLL, we should take care
     819     environ to not be NULL. Unfortunately this involves os2.h :-( - A.Z. */
     820  if (!environ)
     821    {
     822      PTIB tib;
     823      PPIB pib;
     824      if (!DosGetInfoBlocks (&tib, &pib))
     825      {
     826        int count = 1;
     827        char *env = pib->pib_pchenv;
     828        char **cur;
     829        while (*env++)
     830          if (!*env)
     831            count++, env++;
     832        cur = environ = malloc (sizeof (char *) * count);
     833        env = pib->pib_pchenv;
     834        *cur++ = env;
     835        while (*env++)
     836          if (!*env)
     837            env++, *cur++ = env;
     838        cur [-1] = NULL;
     839      }
     840    }
     841
     842  if (!pipes_supported && (flags & PEXECUTE_ONE) != PEXECUTE_ONE)
     843    {
     844      static char *errtpl = "%s: exec %s (pipes not supported)";
     845      *errmsg_fmt = (char *) xmalloc (strlen(errtpl) + \
     846                     strlen(this_pname) + strlen(program));
     847      sprintf (*errmsg_fmt, errtpl, this_pname, program);
     848      *errmsg_arg = NULL;
     849      return -1;
     850    }
     851  /* If this isn't the last process, make a pipe for its output,
     852     and record it as waiting to be the input to the next process.  */
     853  if (!(flags & PEXECUTE_LAST))
     854    {
     855      if (pipe (pdes) < 0)
     856        {
     857          static char *errtpl = "%s: pipe to/from %s";
     858          *errmsg_fmt = (char *) xmalloc (strlen(errtpl) + \
     859                         strlen(this_pname) + strlen(program));
     860          sprintf (*errmsg_fmt, errtpl, this_pname, program);
     861          *errmsg_arg = NULL;
     862          return -1;
     863        }
     864      output_desc = pdes[WRITE_PORT];
     865      last_pipe_input = pdes[READ_PORT];
     866    }
     867  else
     868    last_pipe_input = STDIN_FILE_NO;
     869  if (pipes_supported && input_desc != STDIN_FILE_NO)
     870    {
     871      org_stdin = dup (STDIN_FILE_NO);
     872      dup2 (input_desc, STDIN_FILE_NO);
     873      close (input_desc);
     874    }
     875  if (pipes_supported && output_desc != STDOUT_FILE_NO)
     876    {
     877      org_stdout = dup (STDOUT_FILE_NO);
     878      dup2 (output_desc, STDOUT_FILE_NO);
     879      close (output_desc);
     880    }
     881  pid = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_NOWAIT, program, argv);
     882  if (pipes_supported && input_desc != STDIN_FILE_NO)
     883    {
     884      dup2 (org_stdin, STDIN_FILE_NO);
     885      close (org_stdin);
     886    }
     887  if (pipes_supported && output_desc != STDOUT_FILE_NO)
     888    {
     889      dup2 (org_stdout, STDOUT_FILE_NO);
     890      close (org_stdout);
     891    }
     892  if (pid == -1)
     893    {
     894      static char *errtpl = "%s: error executing %s";
     895      *errmsg_fmt = (char *) xmalloc (strlen(errtpl) + \
     896                     strlen(this_pname) + strlen(program));
     897      sprintf (*errmsg_fmt, errtpl, this_pname, program);
     898      *errmsg_arg = NULL;
     899    }
     900  return pid;
     901}
     902
     903int
     904pwait (pid, status, flags)
     905     int pid;
     906     int *status;
     907     int flags;
     908{
     909  int rc;
     910  do
     911   rc = waitpid (pid, status, flags);
     912  while (rc < 0 && errno == EINTR);
     913  return rc;
     914}
     915
     916#endif /* __EMX__ */
  • trunk/src/gcc/libiberty/strerror.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    2121#include <errno.h>
    2222
    23 #ifdef HAVE_SYS_ERRLIST
    24 #undef sys_nerr
    25 #undef sys_errlist
    26 #endif
    27 
    2823/*  Routines imported from standard C runtime libraries. */
    2924
     
    3833#else
    3934extern PTR memset ();
     35#endif
     36
     37#ifdef HAVE_SYS_ERRLIST
     38#undef sys_nerr
     39#undef sys_errlist
    4040#endif
    4141
  • trunk/src/gcc/libobjc/thr-os2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    4343#undef BOOL
    4444
     45#define __MT__
    4546#include <stdlib.h>
    4647
     
    179180__objc_mutex_allocate(objc_mutex_t mutex)
    180181{
    181   if (DosCreateMutexSem (NULL, (HMTX)(&(mutex->backend)),0L,0) > 0)
     182  if (DosCreateMutexSem (NULL, (PHMTX)(&(mutex->backend)),0L,0) > 0)
    182183    return -1;
    183184  else
  • trunk/src/gcc/libstdc++-v3/configure.target

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r8 r9  
    122122    c_model=c
    123123    ;;
     124  *emx)
     125    os_include_dir="config/os/os2emx"
     126    ;;
    124127  *)
    125128    os_include_dir="config/os/generic"
Note: See TracChangeset for help on using the changeset viewer.