This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: ctice at apple dot com
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Apr 2004 21:50:03 -0400 (EDT)
- Subject: Problems on mips-sgi-irix6.5 from hot/cold basic blocks patch
Hi Caroline,
I'm having a number of bootstrap problems on mips-sgi-irix6.5 related
to your recent checkin for hot/cold basic blocks.
1. Attempting to bootstrap C-only yields the following in stage1 when
building libgcc.a:
> as0: Error: libgcc2.c, line 1:undefined assembler operation: .section
> .section .text
> as0: Error: libgcc2.c, line 1:Conflicting definition of symbol __muldi3
> make[3]: *** [libgcc/mabi-32/_muldi3.o] Error 1
It dies building the o32 libgcc.a.
Note irix6 has three multilibs for various ABIs, o32, n32 and n64.
The o32 abi does not support named sections, the other two do.
The default ABI is n32, but you can switch with the -mabi= flag.
2. So I tried to bootstrap again configured with --enable-multilib=no
to avoid o32 and got this problem in stage2 exposed by -Werror:
> varasm.c: In function `current_section_name':
> varasm.c:200: warning: enumeration value `in_unlikely_executed_text'
> not handled in switch
The function definitions in EXTRA_SECTION_FUNCTIONS inherited from
config/mips/iris5.h don't handle `in_unlikely_executed_text'.
I'm not sure what the right thing to do is here. I could punt and
have a default clause that calls abort. Several other ports do
this but it simply masks the problem. See config/arm/pe.h,
config/i386/cygming.h and config/mcore/mcore.h. I could cram the
in_unlikely_executed_text case into the in_text case. But how to
handle in_unlikely_executed_text for real eludes me. Suggestions
welcome.
3. Looking at unlikely_text_section() in varasm.c I see:
> #ifdef TARGET_ASM_NAMED_SECTION
> named_section (NULL_TREE, UNLIKELY_EXECUTED_TEXT_SECTION_NAME, 0);
> #else
> in_section = in_unlikely_executed_text;
> fprintf (asm_out_file, SECTION_FORMAT_STRING,
> UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
> #endif /* ifdef TARGET_ASM_NAMED_SECTION */
This doesn't look right. AFAICT, TARGET_ASM_NAMED_SECTION is
*always* defined, see target-def.h. So if the target doesn't
support named sections, you'll call default_no_named_section()
which calls abort().
I think you want to do a runtime check on the target-hook
`targetm.have_named_sections' instead of any compile-time macro.
4. Next, SECTION_FORMAT_STRING interacts badly with irix. I don't
understand why you overwrote TEXT_SECTION_ASM_OP. I see the
comments in your posting about needing the align. But this design
choice hoses any target which doesn't have ".section". See
problem #1.
You might want to go back and use TEXT_SECTION_ASM_OP followed by
ASM_OUTPUT_ALIGN and get rid of NORMAL_TEXT_SECTION_NAME. Then
figure out another way to do what you wanted to flip the .text
name.
Would you please work on fixes? I willing to help test.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu