From owner-p4-projects@FreeBSD.ORG Fri May 9 22:00:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D99BE37B404; Fri, 9 May 2003 22:00:16 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62E3B37B401 for ; Fri, 9 May 2003 22:00:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBEC843F3F for ; Fri, 9 May 2003 22:00:14 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4A50E0U030155 for ; Fri, 9 May 2003 22:00:14 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4A50ENp030152 for perforce@freebsd.org; Fri, 9 May 2003 22:00:14 -0700 (PDT) Date: Fri, 9 May 2003 22:00:14 -0700 (PDT) Message-Id: <200305100500.h4A50ENp030152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 30908 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2003 05:00:17 -0000 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