Re : install sample_fe in gcc 4.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






----- Message d'origine ----
De : Philip Herron <redbrain@xxxxxxxxxxx>
À : charfi asma <charfiasma@xxxxxxxx>
Cc : gcc-help@xxxxxxxxxxx
Envoyé le : Lun 11 octobre 2010, 16h 19min 59s
Objet : Re: install sample_fe in gcc 4.6

On 11 October 2010 14:54, charfi asma <charfiasma@xxxxxxxx> wrote:
> Hello,
>
> I tried to install sample_fe in gcc-dev.
>
> I get errors dealing with  #include "gtype-sample_fe.h" and #include
> "gt-sample_fe-sfe1.h"
>
> In the sample_fe (that woked well in gcc4.5) there is only #include
> "gtype-sample_fe.h" not "gt-sample_fe-sfe1.h"
> when I call make I get this error:
>
> libbackend.a(i386.o):(.rodata+0x242c): undefined reference to
> `gt_ggc_mx_lang_tree_node'
> libbackend.a(i386.o):(.rodata+0x2430): undefined reference to
> `gt_pch_nx_lang_tree_node'
> /usr/bin/ld: Dwarf Error: Offset (17707) greater than or equal to .debug_str
> size (1397).
> libbackend.a(cgraphunit.o):(.rodata+0xc): undefined reference to
> `gt_ggc_mx_lang_tree_node'
> libbackend.a(cgraphunit.o):(.rodata+0x10): undefined reference to
> `gt_pch_nx_lang_tree_node'
> /usr/bin/ld: Dwarf Error: Offset (15649) greater than or equal to .debug_str
> size (1103).
> libbackend.a(ggc-page.o): In function `gt_ggc_m_S':
> /export/home/charfi/Bureau/build_uml/gcc/../../gcc-dev/gcc/ggc-page.c:1304:
> undefined reference to `gt_ggc_mx_lang_tree_node'
> collect2: ld returned 1 exit status
>
> if I add #include "gt-sample_fe-sfe1.h" and call make I get this different
> error:
>
> ../../gcc-dev/gcc/sample_fe/sfe1.c:173:31: error: gt-sample_fe-sfe1.h: No such
> file or directory
>
> I do not change the make_lang.in.
>
> any idea ?
>

Last i remember sample_fe was andi's skeleton front-end, it was
probably based on a much older version gcc sources (the front-end
langhooks and interfaces change alot) andi would know more, but my
guess you could get it working easily again. But not sure why you
would bother since i try to weekly merge in the gcc/master on all
branches of my git repo. When we get thinks more stable with my python
fe and gcalc i will try to push these into gcc/git and or svn and see
why people say about merging into trunk since me and andi can maintain
gcalc and the documentation. The python front-end is a long time
before it will be ready for trunk but i would like to put it in the
gcc git/svn soon.

--Phil


Hello Phill,

OK, but all I need for the moment is a Generic representation of int main () { 
return 0;} that compiles.
I try to add a new fe to GCC and I can Install this fe (called uml) but when I 
compile a file .uml I did not get the gimple, ssa , ... assembly output it 
blocks in cgrpah_finalize_function.
I thought that adding in the getdecls langhooks or parse_file langhooks a 
Generic representation of : int main() { return 0}; to generate the appropriate 
assembly is so easy if I follow existing fe (sample_fe, gcalc, python, ...) but 
I am blocked since 2 weeks at the same error :

[charfi@is010178 test_gcalc]$ guml test.uml -fdump-tree-all -S
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups> <whole-program> 
<inline>Assembling functions:
uml1: internal compiler error: in cgraph_mark_reachable_node, at cgraph.c:1687

And I am sure that this happen because cgraph_global_info_ready is passed from 
false to true (in the gcalc fe this variable is always false) :( :(

I even tried to modify cgraph.c (this is not good)  I add 
cgraph_global_info_ready = false just before line 1687, I did not get an errror 
in the cgraph_mark_reachable_node function but this time the error was in the 
cgraph_optimize() at passes.c:1528 


may be you can recreate this error by compiling my fe (andi has send an example 
that compiles ) 


thank you very much

Asma







[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux