From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7453 invoked by alias); 1 Feb 2003 02:22:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7446 invoked from network); 1 Feb 2003 02:22:28 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by 172.16.49.205 with SMTP; 1 Feb 2003 02:22:28 -0000 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 18enIZ-0007FJ-00 for gcc@gnu.org; Fri, 31 Jan 2003 21:22:27 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18enIV-0004r9-00 for gcc@gnu.org; Fri, 31 Jan 2003 21:22:24 -0500 Received: from web41505.mail.yahoo.com ([66.218.93.88]) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18enIO-0004Ue-00 for gcc@gnu.org; Fri, 31 Jan 2003 21:22:16 -0500 Message-ID: <20030201022216.86306.qmail@web41505.mail.yahoo.com> Received: from [80.128.230.238] by web41505.mail.yahoo.com via HTTP; Fri, 31 Jan 2003 18:22:16 PST Date: Sat, 01 Feb 2003 02:22:00 -0000 From: James Michael DuPont Subject: HACK : getting dwarf2asm.c to compile in CVS head To: gcc@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, hits=1.6 required=5.0 tests=FROM_ENDS_IN_NUMS,PATCH_UNIFIED_DIFF,SPAM_PHRASE_00_01 version=2.41 X-Spam-Level: * X-SW-Source: 2003-02/txt/msg00007.txt.bz2 Dear all, I have had problems with compiling CVS head. It seems that gengtype does not like dwarfs, or should i say splay_trees. I added this ifdef to trick it to think that it knows about splay trees, +#ifndef IN_GCC +struct splay_tree_node_s; +typedef struct splay_tree_s *splay_tree; +typedef struct splay_tree_node_s *splay_tree_node; +#endif and gutted the functions in this file to get it to compile. So now i can continue to use the cvs head, otherwise, it is broken. anyone else have this problem? mike Index: dwarf2asm.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/dwarf2asm.c,v retrieving revision 1.31 diff -u -r1.31 dwarf2asm.c --- dwarf2asm.c 10 Jan 2003 02:22:00 -0000 1.31 +++ dwarf2asm.c 1 Feb 2003 02:15:29 -0000 @@ -687,7 +687,17 @@ VA_CLOSE (ap); } - + +/* +mdupont for this silly gengtype +*/ + +#ifndef IN_GCC +struct splay_tree_node_s; +typedef struct splay_tree_s *splay_tree; +typedef struct splay_tree_node_s *splay_tree_node; +#endif + static rtx dw2_force_const_mem PARAMS ((rtx)); static int dw2_output_indirect_constant_1 PARAMS ((splay_tree_node, void *)); @@ -710,58 +720,7 @@ dw2_force_const_mem (x) rtx x; { - splay_tree_node node; - const char *str; - tree decl; - - if (! indirect_pool) - indirect_pool = splay_tree_new_ggc (splay_tree_compare_pointers); - - if (GET_CODE (x) != SYMBOL_REF) - abort (); - - str = (* targetm.strip_name_encoding) (XSTR (x, 0)); - node = splay_tree_lookup (indirect_pool, (splay_tree_key) str); - if (node) - decl = (tree) node->value; - else - { - tree id; - - if (USE_LINKONCE_INDIRECT) - { - char *ref_name = alloca (strlen (str) + sizeof "DW.ref."); - - sprintf (ref_name, "DW.ref.%s", str); - id = get_identifier (ref_name); - decl = build_decl (VAR_DECL, id, ptr_type_node); - DECL_ARTIFICIAL (decl) = 1; - TREE_PUBLIC (decl) = 1; - DECL_INITIAL (decl) = decl; - make_decl_one_only (decl); - } - else - { - char label[32]; - - ASM_GENERATE_INTERNAL_LABEL (label, "LDFCM", dw2_const_labelno); - ++dw2_const_labelno; - id = get_identifier (label); - decl = build_decl (VAR_DECL, id, ptr_type_node); - DECL_ARTIFICIAL (decl) = 1; - TREE_STATIC (decl) = 1; - DECL_INITIAL (decl) = decl; - } - - id = maybe_get_identifier (str); - if (id) - TREE_SYMBOL_REFERENCED (id) = 1; - - splay_tree_insert (indirect_pool, (splay_tree_key) str, - (splay_tree_value) decl); - } - return XEXP (DECL_RTL (decl), 0); } /* A helper function for dw2_output_indirect_constants called through @@ -771,17 +730,7 @@ dw2_output_indirect_constant_1 (node, data) splay_tree_node node; void* data ATTRIBUTE_UNUSED; -{ - const char *sym; - rtx sym_ref; - - sym = (const char *) node->key; - sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym); - if (USE_LINKONCE_INDIRECT) - fprintf (asm_out_file, "\t.hidden DW.ref.%s\n", sym); - assemble_variable ((tree) node->value, 1, 1, 1); - assemble_integer (sym_ref, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); - +{ return 0; } @@ -790,8 +739,10 @@ void dw2_output_indirect_constants () { + /* if (indirect_pool) splay_tree_foreach (indirect_pool, dw2_output_indirect_constant_1, NULL); + */ } /* Like dw2_asm_output_addr_rtx, but encode the pointer as directed. */ @@ -801,86 +752,7 @@ rtx addr, const char *comment, ...)) { - int size; - - VA_OPEN (ap, comment); - VA_FIXEDARG (ap, int, encoding); - VA_FIXEDARG (ap, rtx, addr); - VA_FIXEDARG (ap, const char *, comment); - - size = size_of_encoded_value (encoding); - - if (encoding == DW_EH_PE_aligned) - { - assemble_align (POINTER_SIZE); - assemble_integer (addr, size, POINTER_SIZE, 1); - return; - } - - /* NULL is _always_ represented as a plain zero, as is 1 for Ada's - "all others". */ - if (addr == const0_rtx || addr == const1_rtx) - assemble_integer (addr, size, BITS_PER_UNIT, 1); - else - { - restart: - /* Allow the target first crack at emitting this. Some of the - special relocations require special directives instead of - just ".4byte" or whatever. */ -#ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX - ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (asm_out_file, encoding, size, - addr, done); -#endif - - /* Indirection is used to get dynamic relocations out of a - read-only section. */ - if (encoding & DW_EH_PE_indirect) - { - /* It is very tempting to use force_const_mem so that we share data - with the normal constant pool. However, we've already emitted - the constant pool for this function. Moreover, we'd like to - share these constants across the entire unit of translation, - or better, across the entire application (or DSO). */ - addr = dw2_force_const_mem (addr); - encoding &= ~DW_EH_PE_indirect; - goto restart; - } - - switch (encoding & 0xF0) - { - case DW_EH_PE_absptr: - dw2_assemble_integer (size, addr); - break; - - case DW_EH_PE_pcrel: - if (GET_CODE (addr) != SYMBOL_REF) - abort (); -#ifdef ASM_OUTPUT_DWARF_PCREL - ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, XSTR (addr, 0)); -#else - dw2_assemble_integer (size, gen_rtx_MINUS (Pmode, addr, pc_rtx)); -#endif - break; - - default: - /* Other encodings should have been handled by - ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */ - abort (); - } - -#ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX - done:; -#endif - } - - if (flag_debug_asm && comment) - { - fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); - vfprintf (asm_out_file, comment, ap); - } - fputc ('\n', asm_out_file); - VA_CLOSE (ap); } #include "gt-dwarf2asm.h" ################################################### contents of splay-gt.c you need that do implement the calls. void gt_ggc_m_SP9tree_node12splay_tree_s(); void gt_pch_n_SP9tree_node12splay_tree_s(); void gt_ggc_m_SP9tree_node12splay_tree_s() { } void gt_pch_n_SP9tree_node12splay_tree_s() { } ===== James Michael DuPont http://introspector.sourceforge.net/ __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com