Go to previous topic
Go to next topic
Last Post 25 Jan 2008 09:47 AM by  tporter@dtool.com
error building toolchain
 6 Replies
Author Messages
henrys
New Member
New Member
Posts:


--
10 May 2007 08:21 PM
    gcc -DHAVE_CONFIG_H -I. -I/home/henry/BSP/LinuxTools/insight-6.3.50/bfd -I. -I. -I/home/henry/BSP/LinuxTools/insight-6.3.50/bfd -I/home/henry/BSP/LinuxTools/insight-6.3.50/bfd/../include -I/home/henry/BSP/LinuxTools/insight-6.3.50/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/henry/BSP/LinuxTools/insight-6.3.50/bfd/elf32-m68k.c -o elf32-m68k.o
    cc1: warnings being treated as errors
    /home/henry/BSP/LinuxTools/insight-6.3.50/bfd/elf32-m68k.c: In function 'elf_m68k_check_relocs':
    /home/henry/BSP/LinuxTools/insight-6.3.50/bfd/elf32-m68k.c:750: warning: dereferencing type-punned pointer will break strict-aliasing rules
    make[3]: *** [elf32-m68k.lo] Error 1
    make[3]: Leaving directory `/home/henry/BSP/LinuxTools/obj/insight-6.3.50/bfd'
    make[2]: *** [install-recursive] Error 1
    make[2]: Leaving directory `/home/henry/BSP/LinuxTools/obj/insight-6.3.50/bfd'
    make[1]: *** [install-bfd] Error 2
    make[1]: Leaving directory `/home/henry/BSP/LinuxTools/obj/insight-6.3.50'
    make: *** [insight] Error 2

    I am runing Linux-2.6.18
    any suggestions?
    henry
    willyboy
    New Member
    New Member
    Posts:


    --
    02 Aug 2007 04:33 PM
    I have the exact same issue when I tried building the toolchain.
    Can someone help with this issue ?

    Cheers
    Will
    henrys
    New Member
    New Member
    Posts:


    --
    03 Aug 2007 11:00 PM
    I edit the Makefile and remove insight on the line:
    toolchain: test-components cross-toolchain insight
    henrys
    willyboy
    New Member
    New Member
    Posts:


    --
    05 Aug 2007 04:59 AM
    Thanks henrys.
    Got past the error by removing call to 'insight' target from 'toolchain' top target as you suggested.
    Do you know what are the consequences of removing 'insight' ?
    I will probably find out soon enogh but just asking in case you have faced any issue with this workaround....

    I got another the error that follows
    /bin/sh: line 1: no: command not found
    make[4]: *** [fr.gmo] Error 127
    This error was due to a path variable in a makefile not getting a valid value for location of msgfmt

    This error can be solved by opening the file
    /LinuxTools/crosstool/build/m68k-linux/gcc-3.4.3-glibc-2.3.5/gdb-6.3/opcodes/po/Make-in

    And replacing the following lines
    #GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
    #MSGFMT = @MSGFMT@

    with lines
    GMSGFMT = /usr/bin/msgfmt
    MSGFMT = /usr/bin/msgfmt

    willyboy
    henrys
    New Member
    New Member
    Posts:


    --
    05 Aug 2007 08:54 PM
    Insight is just the debugger like GDB.
    henrys
    klaus
    New Member
    New Member
    Posts:


    --
    14 Nov 2007 04:09 AM
    Posted By henrys on 10 May 2007 8:20 PM

    /home/henry/BSP/LinuxTools/insight-6.3.50/bfd/elf32-m68k.c: In function ''elf_m68k_check_relocs'':
    /home/henry/BSP/LinuxTools/insight-6.3.50/bfd/elf32-m68k.c:750: warning: dereferencing type-punned pointer will break strict-aliasing rules




    i had the same thing, it's gcc4.1's stricter aliasing rules... i fixed the warning by changing the offending line to cast via a void*:



    {
    asection *s;
    void* vp;

    s = (bfd_section_from_r_symndx
    (abfd, &elf_m68k_hash_table (info)->sym_sec,
    sec, r_symndx));
    if (s == NULL)
    return FALSE;

    vp = &elf_section_data (s)->local_dynrel;
    head = (struct elf_m68k_pcrel_relocs_copied **) vp;
    }



    hth ~k
    tporter@dtool.com
    New Member
    New Member
    Posts:


    --
    25 Jan 2008 09:47 AM
    Alternatively, you can turn off strict aliasing by setting CFLAGS in your environment:
    CFLAGS = "-fno-strict-aliasing -g -O2"


    ---