📄 sco5.h
字号:
((TARGET_ELF) ? 0 : \ (current_function_calls_setjmp || current_function_calls_longjmp))#undef JUMP_TABLES_IN_TEXT_SECTION#define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ELF && flag_pic)#undef LOCAL_LABEL_PREFIX#define LOCAL_LABEL_PREFIX \ ((TARGET_ELF) ? "" : ".")#undef MD_EXEC_PREFIX#undef MD_STARTFILE_PREFIX#define MD_EXEC_PREFIX "/usr/ccs/bin/"#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"#undef NON_SAVING_SETJMP#define NON_SAVING_SETJMP \ ((TARGET_ELF) ? 0 : \ (current_function_calls_setjmp && current_function_calls_longjmp))#undef NO_IMPLICIT_EXTERN_C#define NO_IMPLICIT_EXTERN_C 1/* JKJ FIXME - examine the ramifications of RETURN_IN_MEMORY and RETURN_POPS_ARGS */#undef RETURN_POPS_ARGS#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_ELF) ? \ (i386_return_pops_args (FUNDECL, FUNTYPE, SIZE)) : \ (((FUNDECL) && (TREE_CODE (FUNDECL) == IDENTIFIER_NODE)) ? 0 \ : (TARGET_RTD \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) ? (SIZE) \ : 0))#undef SELECT_SECTION#define SELECT_SECTION(DECL,RELOC) \{ \ if (TARGET_ELF && flag_pic && RELOC) \ data_section (); \ else if (TREE_CODE (DECL) == STRING_CST) \ { \ if (! flag_writable_strings) \ const_section (); \ else \ data_section (); \ } \ else if (TREE_CODE (DECL) == VAR_DECL) \ { \ if (! DECL_READONLY_SECTION (DECL, RELOC)) \ data_section (); \ else \ const_section (); \ } \ else \ const_section (); \}#undef SWITCH_TAKES_ARG#define SWITCH_TAKES_ARG(CHAR) \ (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ || (CHAR) == 'h' \ || (CHAR) == 'R' \ || (CHAR) == 'Y' \ || (CHAR) == 'z')#undef WORD_SWITCH_TAKES_ARG#define WORD_SWITCH_TAKES_ARG(STR) \ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \ && strcmp (STR, "Tbss"))#undef TARGET_DEFAULT#define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)#undef HANDLE_SYSV_PRAGMA#define HANDLE_SYSV_PRAGMA 1/* Though OpenServer support .weak in COFF, g++ doesn't play nice with it * so we'll punt on it for now */#define SUPPORTS_WEAK (TARGET_ELF)#define ASM_WEAKEN_LABEL(FILE,NAME) \ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ fputc ('\n', FILE); } while (0)#undef SCCS_DIRECTIVE#define SCCS_DIRECTIVE 1/* * Define sizes and types */#undef SIZE_TYPE#undef PTRDIFF_TYPE#undef WCHAR_TYPE#undef WCHAR_TYPE_SIZE#undef LONG_DOUBLE_TYPE_SIZE#define LONG_DOUBLE_TYPE_SIZE 96#define SIZE_TYPE "unsigned int"#define PTRDIFF_TYPE "int"#define WCHAR_TYPE "long int"#define WCHAR_TYPE_SIZE BITS_PER_WORD/* * New for multilib support. Set the default switches for multilib, * which is -melf. */#define MULTILIB_DEFAULTS { "melf" }/* Please note that these specs may look messy but they are required in order to emulate the SCO Development system as closely as possible. With SCO Open Server 5.0, you now get the linker and assembler free, so that is what these specs are targeted for. These utilities are very argument sensitive: a space in the wrong place breaks everything. So RMS, please forgive this mess. It works. Parameters which can be passed to gcc, and their SCO equivalents: GCC Parameter SCO Equivalent -ansi -a ansi -posix -a posix -Xpg4 -a xpg4 -Xpg4plus -a xpg4plus -Xods30 -a ods30 As with SCO, the default is XPG4 plus mode. SCO also allows you to specify a C dialect with -Xt, -Xa, -Xc, -Xk and -Xm. These are passed on to the assembler and linker in the same way that the SCO compiler does. SCO also allows you to compile, link and generate either ELF or COFF binaries. With gcc, unlike the SCO compiler, the default is ELF. Specify -mcoff to gcc to produce COFF binaries. -fpic will get the assembler and linker to produce PIC code.*//* Set up assembler flags for PIC and ELF compilations */#undef ASM_SPEC#if USE_GAS /* Leave ASM_SPEC undefined so we pick up the master copy from gcc.c * Undef MD_EXEC_PREFIX becuase we don't know where GAS is, but it's not * likely in /usr/ccs/bin/ */#undef MD_EXEC_PREFIX #else#define ASM_SPEC \ "-b %{!mcoff:elf}%{mcoff:coff \ %{static:%e-static not valid with -mcoff} \ %{shared:%e-shared not valid with -mcoff} \ %{symbolic:%e-symbolic not valid with -mcoff}} \ %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{!mcoff:-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF %{Qn:} %{!Qy:-Qn}}"#endif/* Use crt1.o as a startup file and crtn.o as a closing file. */#undef STARTFILE_SPEC#define STARTFILE_SPEC \ "%{shared: %{!mcoff: crti.o%s}} \ %{!shared:\ %{!symbolic: \ %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \ %{ansi:values-Xc.o%s} \ %{!ansi: \ %{traditional:values-Xt.o%s} \ %{!traditional: \ %{Xa:values-Xa.o%s} \ %{!Xa:%{Xc:values-Xc.o%s} \ %{!Xc:%{Xk:values-Xk.o%s} \ %{!Xk:%{Xt:values-Xt.o%s} \ %{!Xt:values-Xa.o%s}}}}}} \ %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"#undef ENDFILE_SPEC#define ENDFILE_SPEC \ "%{!mcoff:crtend.o%s} \ %{mcoff:crtendS.o%s} \ %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"#undef CPP_PREDEFINES#define CPP_PREDEFINES \ "-Asystem(svr3)"/* You are in a maze of GCC specs ... all alike */#undef CPP_SPEC#define CPP_SPEC "%(cpp_cpu) \ %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \ %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \ -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \ %{!Xods30:-D_STRICT_NAMES} \ %{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \ %{ansi:-isystem include/ansi%s -isystem /usr/include/ansi -D_STRICT_ANSI} \ %{!ansi: \ %{posix:-isystem include/posix%s -isystem /usr/include/posix \ -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=1} \ %{!posix:%{Xpg4:-isystem include/xpg4%s -isystem /usr/include/xpg4 \ -D_XOPEN_SOURCE=1} \ %{!Xpg4:-D_M_I86 -D_M_I86SM -D_M_INTERNAT -D_M_SDATA -D_M_STEXT \ -D_M_BITFIELDS -D_M_SYS5 -D_M_SYSV -D_M_SYSIII \ -D_M_WORDSWAP -Dunix -DM_I386 -DM_UNIX -DM_XENIX \ %{Xods30:-isystem include/ods_30_compat%s \ -isystem /usr/include/ods_30_compat \ -D_SCO_ODS_30 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT \ -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \ -DM_WORDSWAP}}}} \ %{scointl:-DM_INTERNAT -D_M_INTERNAT} \ %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE} \ %{!mcoff:-D_SCO_ELF} \ %{mcoff:-D_M_COFF -D_SCO_COFF} \ %{!mcoff:%{fpic:-D__PIC__ -D__pic__} \ %{fPIC:%{!fpic:-D__PIC__ -D__pic__}}} \ %{Xa:-D_SCO_C_DIALECT=1} \ %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \ %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \ %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \ %{!Xt:-D_SCO_C_DIALECT=1}}}} \ %{traditional:-traditional -D_KR -D_NO_PROTOTYPE}"#undef LINK_SPEC#define LINK_SPEC \ "-b %{!mcoff:elf}%{mcoff:coff \ %{static:%e-static not valid with -mcoff} \ %{shared:%e-shared not valid with -mcoff} \ %{symbolic:%e-symbolic not valid with -mcoff} \ %{fpic:%e-fpic not valid with -mcoff} \ %{fPIC:%e-fPIC not valid with -mcoff}} \ -R%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},%{mcoff:COFF}%{!mcoff:ELF} \ %{Wl,*%*} %{YP,*} %{YL,*} %{YU,*} \ %{!YP,*:%{p:-YP,/usr/ccs/libp:/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib} \ %{!p:-YP,/usr/ccs/lib:/lib:/usr/lib}} \ %{h*} %{static:-dn -Bstatic} %{shared:-G -dy %{!z*:-z text}} \ %{symbolic:-Bsymbolic -G -dy %{!z*:-z text}} %{z*} %{R*} %{Y*} \ %{G:-G} %{!mcoff:%{Qn:} %{!Qy:-Qn}}"/* The SCO COFF linker gets confused on the difference between "-ofoo" and "-o foo". So we just always force a single space. */#define SWITCHES_NEED_SPACES "o"/* Library spec. If we are not building a shared library, provide the standard libraries, as per the SCO compiler. */#undef LIB_SPEC#define LIB_SPEC \ "%{shared:pic/libgcc.a%s}%{!shared:%{!symbolic:-lcrypt -lgen -lc}}"#undef LIBGCC_SPEC#define LIBGCC_SPEC \ "%{!shared:-lgcc}"#define MASK_COFF 010000000000 /* Mask for elf generation */#define TARGET_COFF (target_flags & MASK_COFF)#define TARGET_ELF (!(target_flags & MASK_COFF))#undef SUBTARGET_SWITCHES#define SUBTARGET_SWITCHES \ { "coff", MASK_COFF, "Generate COFF output" }, \ { "elf", -MASK_COFF, "Generate ELF output" },#define NO_DOLLAR_IN_LABEL/* Implicit library calls should use memcpy, not bcopy, etc. They are faster on OpenServer libraries. */#define TARGET_MEM_FUNCTIONS/* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */#define MAX_OFILE_ALIGNMENT (32768*8)/*Here comes some major hackery to get the crt stuff to compile properly.Since we can (and do) compile for both COFF and ELF environments, weset things up accordingly, based on the pre-processor defines for ELFand COFF. This is insane, but then I guess having one compiler with asingle back-end supporting two vastly different file format types isa little insane too. But it is not impossible and we get a usefulcompiler at the end of the day. Onward we go ...*/#if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)# undef OBJECT_FORMAT_ELF# undef HAVE_ATEXIT# undef INIT_SECTION_ASM_OP# undef FINI_SECTION_ASM_OP# undef CTORS_SECTION_ASM_OP# undef DTORS_SECTION_ASM_OP# undef EH_FRAME_SECTION_ASM_OP# undef CTOR_LIST_BEGIN# undef CTOR_LIST_END# undef DO_GLOBAL_CTORS_BODY# if defined (_SCO_ELF)# define OBJECT_FORMAT_ELF# define HAVE_ATEXIT 1# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_ELF# define EH_FRAME_SECTION_ASM_OP EH_FRAME_SECTION_ASM_OP_ELF# else /* ! _SCO_ELF */# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_COFF# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF# define EH_FRAME_SECTION_ASM_OP ""# define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")# define CTOR_LIST_END CTOR_LIST_BEGIN# define DO_GLOBAL_CTORS_BODY \do { \ func_ptr *p, *beg = alloca(0); \ for (p = beg; *p;) \ (*p++) (); \} while (0)# endif /* ! _SCO_ELF */#endif /* CRT_BEGIN !! CRT_END */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -