Changeset 461


Ignore:
Timestamp:
Jul 28, 2003, 12:57:13 AM (22 years ago)
Author:
bird
Message:

#564: Added an optional spec for -Zomf defaults. -Zcrtdll is now default. -Zaout is accepted by both specs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gcc/gcc/config/i386/emx.h

    • Property cvs2svn:cvs-rev changed from 1.10 to 1.11
    r460 r461  
    245245
    246246/******************************************************************************
    247  *                             - S - P - E - C - S -
     247 *
     248 *
     249 *                            - S - P - E - C - S -
     250 *                            - S - P - E - C - S -
     251 *                            - S - P - E - C - S -
     252 *
     253 *
    248254 ******************************************************************************/
    249255#if 1
    250 /*
    251  * Current default specs.
    252  */
     256/*------------------------------------------------------------------------------
     257*   Current default specs which uses aout by default.
     258*-----------------------------------------------------------------------------*/
    253259
    254260/* Predefine symbols. */
     
    288294  "%{!o*:-o %b%{Zdll:.dll}%{!Zdll:%{!Zexe:.exe}}} "                            \
    289295  "%{static:%{Zcrtdll*:%e-static and -Zcrtdll are incompatible}}"              \
     296  "%{Zomf:%{Zaout:%e-Zomf and -Zaout are incompatible}}"                       \
    290297  "%{Zdll:%{Zexe:%e-Zdll and -Zexe are incompatible}}"                         \
    291298  "%{Zsmall-conv:%{Zcrtdll*:%e-Zsmall-conv and -Zcrtdll are incompatible}}"
     
    295302  "%{static|static-libgcc:%{shared-libgcc:%e-static-libgcc and -shared-libgcc are incompatible}}"\
    296303  "%{shared-libgcc:-lgcc%v1%v2%v3}"                                            \
    297   "%{!shared-libgcc:%{!static-libgcc:%{Zcrtdll*:-lgcc%v1%v2%v3}}}"             \
    298   "%{!shared-libgcc:%{static-libgcc|!Zcrtdll*:-lgcc_eh -lgcc}}"
     304  "%{!shared-libgcc:%{!static-libgcc:%{!static*:-lgcc%v1%v2%v3}}}"             \
     305  "%{!shared-libgcc:%{static-libgcc|static:-lgcc_eh -lgcc}}"
    299306
    300307/* We have a shared libgcc, but don't need this extra handling. */
     
    304311#define LIB_SPEC                                                               \
    305312  "-lc_alias "                                                                 \
    306   "%{Zcrtdll*:-lc_dll}"                                                        \
    307   "%{!Zcrtdll*:-lc%{p|pg:_p} %{!Zdll:-lc_app%{pg:_p}}} -los2%{p|pg:_p}"        \
     313  "%{!static:-lc_dll}"                                                         \
     314  "%{static*:-lc%{p|pg:_p} %{!Zdll:-lc_app%{pg:_p}}} -los2%{p|pg:_p}"          \
    308315
    309316/* Override the default crt0 files.  */
     
    322329
    323330/* Override the default linker program (collect2).  */
    324 #define LINKER_SPEC "%{Zomf:emxomf}ld.exe"
     331#define LINKER_NAME "%{Zomf:emxomf}ld.exe"
    325332
    326333
    327334
    328335#else
    329 /* ////////////////////////////////////////////////////////////////////////////
    330  * Specs which doesn't define __EMX__ (to be removed?)
    331  * ////////////////////////////////////////////////////////////////////////// */
     336#if 1 /* disabled by above #if */
     337/*------------------------------------------------------------------------------
     338*   As the above specs but defaults to OMF.
     339*-----------------------------------------------------------------------------*/
     340
     341/* Predefine symbols. */
     342#undef CPP_PREDEFINES
     343#define CPP_PREDEFINES "-D__32BIT__ -D__EMX__ -D__OS2__ -D__i386__ -D__i386 "  \
     344  "-Dunix -D__MT__ -Asystem=unix -Asystem=posix -Asystem=emx"
     345
     346/* Provide extra args to the C preprocessor and extra switch-translations.  */
     347#undef CPP_SPEC
     348#define CPP_SPEC                                                               \
     349  "%(cpp_cpu) "                                                                \
     350  "%{posix:-D_POSIX_SOURCE} "                                                  \
     351  "%{Zmt*:} "                                                                  \
     352  "%{pg:-D__GPROF__} "                                                         \
     353  "%{mepilogue:-D__EPILOGUE__} "                                               \
     354  "%{mprobe|mstack-arg-probe:-D__STACK_PROBE__} "                              \
     355  "-D__cdecl=__attribute__((__cdecl__)) "                                      \
     356  "-D__stdcall=__attribute__((__stdcall__)) "                                  \
     357  "-D_Optlink=__attribute__((__optlink__)) "                                   \
     358  "-D_System=__attribute__((__system__))"                                      \
     359  "%{!ansi: "                                                                  \
     360    "-D_cdecl=__attribute__((__cdecl__)) "                                     \
     361    "-D_stdcall=__attribute__((__stdcall__)) "                                 \
     362    "-D_Cdecl=__attribute__((__cdecl__)) }"
     363
     364/* -s to -Zstrip and -Zomf must be passed down. */
     365#define ASM_SPEC "--traditional-format %{!Zaout:-Zomf} %{s:-Zstrip}"
     366
     367#define ASM_DEBUG_SPEC "%{g*:--gstabs}"
     368
     369
     370/* Here is the spec for running the linker, after compiling all files.  */
     371
     372/* Provide extra args to the linker and extra switch-translations.  */
     373#define LINK_SPEC                                                              \
     374  "%{Zexe} %{Zstack*} %{Zmap*} %{!Zaout:%{Zdll}} "                             \
     375  "%{!o*:-o %b%{Zdll:.dll}%{!Zdll:%{!Zexe:.exe}}} "                            \
     376  "%{static:%{Zcrtdll*:%e-static and -Zcrtdll are incompatible}}"              \
     377  "%{Zomf:%{Zaout:%e-Zomf and -Zaout are incompatible}}"                       \
     378  "%{Zdll:%{Zexe:%e-Zdll and -Zexe are incompatible}}"                         \
     379  "%{Zsmall-conv:%{Zcrtdll*:%e-Zsmall-conv and -Zcrtdll are incompatible}}"
     380
     381/* Override how and when libgcc.a is included (%G).  */
     382#define LIBGCC_SPEC                                                            \
     383  "%{static|static-libgcc:%{shared-libgcc:%e-static-libgcc and -shared-libgcc are incompatible}}"\
     384  "%{shared-libgcc:-lgcc%v1%v2%v3}"                                            \
     385  "%{!shared-libgcc:%{!static-libgcc:%{!static:-lgcc%v1%v2%v3}}}"              \
     386  "%{!shared-libgcc:%{static-libgcc|static:-lgcc_eh -lgcc}}"
     387
     388/* We have a shared libgcc, but don't need this extra handling. */
     389#undef ENABLE_SHARED_LIBGCC
     390
     391/* Override the default libraries (%L).  */
     392#define LIB_SPEC                                                               \
     393  "-lc_alias "                                                                 \
     394  "%{!static:-lc_dll}"                                                         \
     395  "%{static:-lc%{p|pg:_p} %{!Zdll:-lc_app%{pg:_p}}} -los2%{p|pg:_p}"           \
     396
     397/* Override the default crt0 files.  */
     398#define STARTFILE_SPEC                                                         \
     399  "%{Zdll:dll0%O%{!Zaout:bj}%s}"                                               \
     400  "%{!Zdll:%{pg:gcrt0%O%{!Zaout:bj}%s}"                                        \
     401          "%{!pg:%{pn:gcrt0%O%{!Zaout:bj}%s}%{!pn:%{p:mcrt0%O%{!Zaout:bj}%s}%{!p:crt0%O%{!Zaout:bj}%s}}}"\
     402         " %{Zbin-files:binmode%O%{!Zaout:bj}%s} %{Zsmall-conv:smallcnv%O%{!Zaout:bj}%s}}"
     403
     404/* Set -lgcc and -lc order so all symbols are resolved correctly with
     405   the GNU linker. The IBM and M$ linkers doesn't need things repeated
     406   to catch the go of it.  */
     407#define LINK_GCC_C_SEQUENCE_SPEC "%G %L %{Zaout:%G %L %G}"
     408
     409#define ENDFILE_SPEC "%{!Zaout:-lend}"
     410
     411/* Override the default linker program (collect2).  */
     412#define LINKER_NAME "%{!Zaout:emxomf}ld.exe"
     413
     414
     415
     416
     417#else
     418/*------------------------------------------------------------------------------
     419*   Older proprosal which doesn't define __EMX__ (to be removed?)
     420*-----------------------------------------------------------------------------*/
    332421
    333422/* Predefine symbols `__32BIT__', `__EMX__', `i386' and __MT__ (not -Zmt). */
     
    359448  "%{Zexe} %{Zstack*} %{Zmap*} %{Zomf:%{Zdll}} "                               \
    360449  "%{!o*:-o %b%{Zdll:.dll}%{!Zdll:%{!Zexe:.exe}}} "                            \
     450  "%{Zomf:%{Zaout:%e-Zomf and -Zaout are incompatible}}"                       \
    361451  "%{static:%{Zcrtdll*:%e-static and -Zcrtdll are incompatible}}"              \
    362452  "%{Zdll:%{Zexe:%e-Zdll and -Zexe are incompatible}}"                         \
     
    407497                        "}}}}}}"
    408498#endif
     499#endif
    409500
    410501
Note: See TracChangeset for help on using the changeset viewer.