On Thu, Nov 11, 2010 at 3:47 PM, Merrick, Thomas
<thomas.merr...@tamucc.edu> wrote:
> I would like to resurrect the PL/1 frontend which appears to have stopped 
> development about 3 years ago.  I plan to start with the preprocessor, which 
> is a PL/1 subset interpreter.
>
> First of all, is this the correct list to ask questions about writing a 
> frontend?  I plan on using GCC 4.5.1 and most of the example frontends seem 
> to be made for 4.4.3 or earlier and do not work against 4.5.1.  Is there a 
> good example that works on 4.5.1?  I just need the minimal subset right now 
> as the preprocessor does not output, except for debugging and the input 
> stream for the main PL/1 processor.
>
> When I wrote a minimal frontend program, I get the following during linking:
>
> /a0/staff/tmerrick/gcc-4.5.1/host-i686-pc-linux-gnu/prev-gcc/xgcc 
> -B/a0/staff/tmerrick/gcc-4.5.1/host-i686-pc-linux-gnu/prev-gcc/ 
> -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/bin/ 
> -B/usr/local/i686-pc-linux-gnu/lib/ -isystem 
> /usr/local/i686-pc-linux-gnu/include -isystem 
> /usr/local/i686-pc-linux-gnu/sys-include     -g -O2 -fomit-frame-pointer 
> -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes 
> -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long 
> -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition 
> -Wc++-compat   -DHAVE_CONFIG_H  -o pl11 \
>        pl1/pl11.o main.o  libbackend.a ../libcpp/libcpp.a 
> ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a 
> ../libdecnumber/libdecnumber.a  attribs.o   
> -L/a0/staff/tmerrick/gcc-4.5.1/host-i686-pc-linux-gnu/gmp/.libs 
> -L/a0/staff/tmerrick/gcc-4.5.1/host-i686-pc-linux-gnu/mpfr/.libs 
> -L/a0/staff/tmerrick/gcc-4.5.1/host-i686-pc-linux-gnu/mpc/src/.libs -lmpc 
> -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz -lelf
> libbackend.a(coverage.o):(.rodata+0x20): undefined reference to 
> `gt_ggc_mx_lang_tree_node'
> libbackend.a(coverage.o):(.rodata+0x24): undefined reference to 
> `gt_pch_nx_lang_tree_node'
> libbackend.a(dbxout.o):(.rodata+0x180): undefined reference to 
> `gt_ggc_mx_lang_tree_node'
> libbackend.a(dbxout.o):(.rodata+0x184): undefined reference to 
> `gt_pch_nx_lang_tree_node'
>
> With the last 4 lines repeated about 100 times for various parts of the 
> backend.  I am not sure if this is for debugging or inline code, but there is 
> obviously something that I am missing.  Any ideas?

You need to define a lang_tree_node type, even if its empty.  See
the lto frontend example.

>
> Tom Merrick
> IT Manager
> College of Science & Technology
> Texas A&M University
> CI 352
> 6300 Ocean Drive
> Corpus Christi, TX 78412-5806
> Phone: 361-825-2435
> Fax: 361-825-5789
>
>

Reply via email to