Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2003 22:00:14 -0700 (PDT)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30908 for review
Message-ID:  <200305100500.h4A50ENp030152@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30908

Change 30908 by jmallett@jmallett_dalek on 2003/05/09 21:59:58

	Update to a newer, better configuration:
		o) Trust elf64.h to give us better section stuff,
		   which makes optimisation work.
		o) Turn off OBJECT_FORMAT_ COFF, "it confuses collect2"
		   other configs say.
		o) Default to a GVALUE of 0 so we don't have problems
		   relocating bigger pieces of data relative to the gp.
		o) Prefer DWARF2 (at least for now?) as that doesn't
		   ICE with -gdwarf-2, unlike old -g, so better to
		   default to it, though XXX: the elf64.h inclusion
		   may dtrt now, so removing this needs investigated,
		   but I am sick of 45-minute GCC builds.
		o) Put the CPU target defaults in the right define,
		   and fill in MASK_GAS too.

Affected files ...

.. //depot/projects/mips/contrib/gcc/config/mips/freebsd.h#8 edit

Differences ...

==== //depot/projects/mips/contrib/gcc/config/mips/freebsd.h#8 (text+ko) ====

@@ -65,40 +65,13 @@
 
 /* Define the target in terms of a bitmask (see mips.h for MASK_ defns).  */
 #undef	TARGET_ENDIAN_DEFAULT
-#define TARGET_ENDIAN_DEFAULT (MASK_BIG_ENDIAN | MASK_LONG64 | MASK_64BIT)
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN
 
-/* Define the strings to put out for each section in the object file.  */
-#define SBSS_SECTION_ASM_OP	"\t.section .sbss"
-#define TEXT_SECTION_ASM_OP	"\t.text"	/* instructions */
-#define DATA_SECTION_ASM_OP	"\t.data"	/* large data */
-#define SDATA_SECTION_ASM_OP	"\t.sdata"	/* small data */
-#define RDATA_SECTION_ASM_OP	"\t.rdata"	/* read-only data */
+#undef	TARGET_CPU_DEFAULT
+#define	TARGET_CPU_DEFAULT (MASK_LONG64 | MASK_64BIT | MASK_GAS)
 
-/* A list of other sections which the compiler might be "in" at any
-   given time.  */
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata
 
-#undef READONLY_DATA_SECTION
-#define SMALL_DATA_SECTION	sdata_section
-#define READONLY_DATA_SECTION	const_section
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS                                         \
-  SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
-  SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
-  SECTION_FUNCTION_TEMPLATE(const_section, in_rdata, RDATA_SECTION_ASM_OP)
-
-#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP)			\
-void FN ()							\
-{								\
-  if (in_section != ENUM)					\
-    {								\
-      fprintf (asm_out_file, "%s\n", OP);			\
-      in_section = ENUM;					\
-    }								\
-}
-
+/* No mips-tfile. */
 #undef ASM_FINAL_SPEC
 
 /*
@@ -108,3 +81,22 @@
  */
 #undef LOCAL_LABEL_PREFIX
 #define	LOCAL_LABEL_PREFIX	"."
+
+/*
+ * Use Dwarf2 for FreeBSD/MIPS.
+ */
+#define DWARF2_DEBUGGING_INFO
+#define MIPS_DEBUGGING_INFO
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+/*
+ * Be explicit about the object format we don't want.
+ */
+#undef OBJECT_FORMAT_COFF
+
+/* -G is incompatible with -KPIC which is the default, so only allow objects
+   in the small data section if the user explicitly asks for it.  */
+
+#undef MIPS_DEFAULT_GVALUE 
+#define MIPS_DEFAULT_GVALUE 0 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305100500.h4A50ENp030152>