This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug: Undefined reference to MAIN__

Alexandre Oliva wrote:

> I wrote:

> > Unfortunately, this patch doesn't solve the problem that one cannot run
> > the Fortran testsuite successfully without installing the compiler -
> > that's a problem I'm going to tackle tomorrow ...
> `grep -i library_path gcc/testsuite/lib/g++.exp' for some ideas on how
> to do it, in case you find yourself wondering how to fix it.

Hmmm, yes - and .../lib/g77.exp does this:

proc g77_target_compile { source dest type options } {


    if ![is_remote host] {
      set gccpath "[get_multilibs]"
      set libg2c_dir [lookfor_file ${gccpath} libf2c/libg2c.a]
      if { $libg2c_dir != "" }
        set libg2c_link_flags "-L[file dirname ${libg2c_dir}]"
        lappend options "additional_flags=${libg2c_link_flags}"
    lappend options "compiler=$G77_UNDER_TEST"
    return [target_compile $source $dest $type $options]

Unfortunately, it doesn't seem to work, as this is `ld' line from

 ld -m elf_i386 -dynamic-linker /lib/ -o /tmp/ccNQXKKq
/tmp/ccP357gm.o /usr/lib/crt1.o /usr/lib/crti.o /home/toon/co
-L/home/toon/compilers/snapshots/obj/gcc -lg2c -lm -lgcc -lc -lgcc
shots/obj/gcc/crtend.o /usr/lib/crtn.o

and `/home/toon/compilers/snapshots/obj/gcc' certainly is *not* the
place where libg2c.a lives prior to installation.  So my conclusion is
that previously, when running the test suite without first installing
the compiler didn't even test libg2c.a - but probably the installed
/usr/local/lib/libg2c.a ...

Alas, I do not understand enough of the above language to repair this

Toon Moene - - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77:
Join GNU Fortran 95: (under construction)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]