along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+#include "halfpic.h"
#include "i386gas.h"
#define OSF_OS
#define abort fancy_abort
#endif
+#define MASK_HALF_PIC 0x00000100 /* Mask for half-pic code */
+#define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC)
+
+#ifdef SUBTARGET_SWITCHES
+#undef SUBTARGET_SWITCHES
+#endif
+#define SUBTARGET_SWITCHES \
+ { "half-pic", MASK_HALF_PIC}, \
+ { "no-half-pic", -MASK_HALF_PIC},
+
/* Prefix that appears before all global/static identifiers, except for
temporary labels. */
#ifdef CC1_SPEC
#undef CC1_SPEC
#endif
-#define CC1_SPEC ""
+#define CC1_SPEC \
+ "%{pic-none: -mno-half-pic} \
+ %{pic-lib: -mhalf-pic} \
+ %{pic-extern: -mhalf-pic} \
+ %{pic-calls: -mhalf-pic}"
#ifdef ASM_SPEC
#undef ASM_SPEC
#undef LINK_SPEC
#endif
#define LINK_SPEC "%{v*: -v} \
- %{pic-none: -noshrlib} %{noshrlib} \
- %{!pic-none: -warn_nopic} \
- %{nostdlib} %{glue}"
+ %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
+ %{nostdlib} %{noshrlib} %{glue}"
#ifdef LIB_SPEC
#undef LIB_SPEC
#endif
-/* For now, force static libraries instead of shared, but do so that
- does not use -noshrlib, since the old linker does not provide it. */
-
-#define LIB_SPEC "%{!pic-none: %{!pic-lib: -L/usr/ccs/lib }} -lc"
+#define LIB_SPEC "-lc"
#ifdef LIBG_SPEC
#undef LIBG_SPEC
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
+/* Some machines may desire to change what optimizations are
+ performed for various optimization levels. This macro, if
+ defined, is executed once just after the optimization level is
+ determined and before the remainder of the command options have
+ been parsed. Values set in this macro are used as the default
+ values for the other command line options.
+
+ LEVEL is the optimization level specified; 2 if -O2 is
+ specified, 1 if -O is specified, and 0 if neither is specified. */
+
+#define OPTIMIZATION_OPTIONS(LEVEL) \
+{ \
+ flag_gnu_linker = FALSE; \
+ \
+ if (LEVEL) \
+ { \
+ flag_omit_frame_pointer = TRUE; \
+ flag_thread_jumps = TRUE; \
+ } \
+ \
+ if (LEVEL >= 2) \
+ { \
+ flag_strength_reduce = TRUE; \
+ flag_cse_follow_jumps = TRUE; \
+ flag_expensive_optimizations = TRUE; \
+ flag_rerun_cse_after_loop = TRUE; \
+ } \
+ \
+ if (LEVEL >= 3) \
+ { \
+ flag_inline_functions = TRUE; \
+ } \
+}
+
+/* A C expression that is 1 if the RTX X is a constant which is a
+ valid address. On most machines, this can be defined as
+ `CONSTANT_P (X)', but a few machines are more restrictive in
+ which constant addresses are supported.
+
+ `CONSTANT_P' accepts integer-values expressions whose values are
+ not explicitly known, such as `symbol_ref', `label_ref', and
+ `high' expressions and `const' arithmetic expressions, in
+ addition to `const_int' and `const_double' expressions. */
+
+#ifdef CONSTANT_ADDRESS_P
+#undef CONSTANT_ADDRESS_P
+#endif
+#define CONSTANT_ADDRESS_P(X) \
+ (CONSTANT_P (X) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
+
+/* Define this macro if references to a symbol must be treated
+ differently depending on something about the variable or
+ function named by the symbol (such as what section it is in).
+
+ The macro definition, if any, is executed immediately after the
+ rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
+ The value of the rtl will be a `mem' whose address is a
+ `symbol_ref'.
+
+ The usual thing for this macro to do is to a flag in the
+ `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
+ name string in the `symbol_ref' (if one bit is not enough
+ information).
+
+ The best way to modify the name string is by adding text to the
+ beginning, with suitable punctuation to prevent any ambiguity.
+ Allocate the new name in `saveable_obstack'. You will have to
+ modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
+ and output the name accordingly.
+
+ You can also check the information stored in the `symbol_ref' in
+ the definition of `GO_IF_LEGITIMATE_ADDRESS' or
+ `PRINT_OPERAND_ADDRESS'. */
+
+#ifdef ENCODE_SECTION_INFO
+#undef ENCODE_SECTION_INFO
+#endif
+#define ENCODE_SECTION_INFO(DECL) \
+do \
+ { \
+ if (HALF_PIC_P ()) \
+ HALF_PIC_ENCODE (DECL); \
+ } \
+while (0)
+
+
+/* A C statement (sans semicolon) to output to the stdio stream
+ STREAM any text necessary for declaring the name NAME of an
+ initialized variable which is being defined. This macro must
+ output the label definition (perhaps using `ASM_OUTPUT_LABEL').
+ The argument DECL is the `VAR_DECL' tree node representing the
+ variable.
+
+ If this macro is not defined, then the variable name is defined
+ in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
+
+#ifdef ASM_DECLARE_OBJECT_NAME
+#undef ASM_DECLARE_OBJECT_NAME
+#endif
+#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
+do \
+ { \
+ ASM_OUTPUT_LABEL(STREAM,NAME); \
+ HALF_PIC_DECLARE (NAME); \
+ } \
+while (0)
+
+/* This is how to declare a function name. */
+
+#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
+do \
+ { \
+ ASM_OUTPUT_LABEL(STREAM,NAME); \
+ HALF_PIC_DECLARE (NAME); \
+ } \
+while (0)
+
/* Tell collect that the object format is OSF/rose. */
#define OBJECT_FORMAT_ROSE
to do the search */
#define LINK_LIBGCC_SPECIAL
+/* A C statement to output assembler commands which will identify the object
+ file as having been compile with GNU CC. We don't need or want this for
+ OSF1. GDB doesn't need it and kdb doesn't like it */
+#define ASM_IDENTIFY_GCC(FILE)
+
/* This is how to output an assembler line defining a `double' constant.
Use "word" pseudos to avoid printing NaNs, infinity, etc. */
fprintf (STREAM, "\t.long\t0x%08lx\t\t# %.12g\n", u2.l, u2.f); \
}
-/* Generate calls to memcpy, etc., not bcopy, etc. */
+/* Generate calls to memcpy, etc., not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
-/* A C statement to output assembler commands which will identify
- the object file as having been compiled with GNU CC (or another
- GNU compiler).
-
- If you don't define this macro, the string `gcc2_compiled.:' is
- output. This string is calculated to define a symbol which, on
- BSD systems, will never be defined for any other reason. GDB
- checks for the presence of this symbol when reading the symbol
- table of an executable.
-
- On non-BSD systems, you must arrange communication with GDB in
- some other fashion. If GDB is not used on your system, you can
- define this macro with an empty body.
-
- On OSF/1, gcc2_compiled. confuses the kernel debugger, so don't
- put it out. */
-
-#define ASM_IDENTIFY_GCC(STREAM)
\f
/* Defines to be able to build libgcc.a with GCC. */