[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-21 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #18 from Tobias Burnus  2010-11-21 
08:02:53 UTC ---
FIXED on the trunk (4.6), hopefully.

Thanks for the report.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-20 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #17 from Tobias Burnus  2010-11-21 
07:56:15 UTC ---
Author: burnus
Date: Sun Nov 21 07:56:12 2010
New Revision: 166998

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166998
Log:
2010-11-21  Michael Matz  
Tobias Burnus  

PR driver/46516
* gfortranspec.c (lang_specific_driver,
lang_specific_pre_link): Load libgfortran.spec in
lang_specific_pre_link unless found in the -L path.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortranspec.c


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

Tobias Burnus  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

--- Comment #16 from Tobias Burnus  2010-11-18 
14:36:00 UTC ---
We (for another group of "we") agreed that that's the wrong approach.

Current suggestion my Matz:

15:20 < richi> I wonder why/how it works for libgomp
15:21 < matz> That is included via %:include in the linker_command_spec.  That
comes after the multilib paths are ready.
15:21 < matz> But there's (currently) no hook for frontends to include anything
into link_command_spec.
[...]
15:29 < matz> Add a new (frontend-driver) macro: LANG_LINK_LIBS (or something).
 In gcc.c handle it similar to STACK_SPLIT_SPEC.  (#ifndef -> then empty).  In
fortran frontend header #define it to
'%:include(libgfortran.spec)%lib_gfortran)'.  in libgfortran.spec don't define
'lib:' but 'lib_gfortran:' (look at libgomp.spec).
15:30 < matz> Similar to STACK_SPLIT_SPEC includes adding it to
LINK_COMMAND_SPEC.
15:31 < matz> And then hack long enough until everything works.  But at least
that way libgfortran.spec will be found in the multilib dirs.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.11.18 10:24:17
 AssignedTo|unassigned at gcc dot   |burnus at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #15 from Tobias Burnus  2010-11-18 
10:24:17 UTC ---
Patch which gets rid of the spec file:
http://gcc.gnu.org/ml/fortran/2010-11/msg00274.html


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #14 from Tobias Burnus  2010-11-17 
16:25:56 UTC ---
Suggested solution from Joseph on #gcc:

- get rid of the spec file (hooray!)
- Add a configure test. One needs to make sure that both the compiler supports
__float128 and the libgcc library support it.

If I read the files correctly, the latter is set via
  libgcc/config.host
There is also the adjunct file
  gcc/config.gcc

I am not 100% sure whether I understood the syntax; however, there is
"t-softfp" in libgcc and soft-fp/t-softfp in gcc; I do not yet quite understand
how they relate and whether that's the correct information; in any case, it is
not sufficient as "t-softfp" is also present for PowerPC, which has a hardware
128-bit FP type.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #13 from Tobias Burnus  2010-11-17 
15:32:34 UTC ---
Some debugging: While for libgfortran.spec and libgomp.spec the call to gcc.c's
find_a_file and thus to for_each_path is the same, the global variable
multilib_os_dir is NULL for libgfortran.spec and only later for libgomp.spec
(and thus too late) it is "../lib64"



It is set in set_multilib_dir, which is too late:

main (int argc, char **argv)
{
  ...
// Get default setting, OK so far:
  specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);


// This reads the file we want:
/* Process DRIVER_SELF_SPECS, adding any new options to the end
 of the command line.  */
  for (i = 0; i < ARRAY_SIZE (driver_self_specs); i++)
do_self_spec (driver_self_specs[i]);


// but ../lib64 is only set at:
  /* Now that we have the switches and the specs, set
 the subdirectory based on the options.  */
  set_multilib_dir ();


Frankly, I have no idea how to solve this interdependence.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #12 from joseph at codesourcery dot com  2010-11-17 11:55:29 UTC ---
In  I discussed 
issues relating to finding specs in the presence of multilib paths.  I 
hope this - and Nathan Froyd's patch linked from there in particular, 
which solved the libgomp.spec issue - helps provide a roadmap for 
resolving the present issue.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #11 from Tobias Burnus  2010-11-17 
09:40:52 UTC ---
(In reply to comment #10)
> Are they actually read?

Sorry, I tested wrongly. One needs to have both -fopenmp *and* one needs to
link. Then I also sees "Read specs" + strace for libgomp.spec.

I think I just will bootstrap with --disable-multilib and keep silent until I
have debugged this.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #10 from Tobias Burnus  2010-11-17 
09:27:21 UTC ---
(In reply to comment #8)
> however, I just observe that the libgomp.spec are causing no problems in my
> build.

Are they actually read? Even here, where I use multilib and the gfortran.spec
is found, I do not see that the libgomp.spec is read - at least I do not see a
line like:
  Reading specs from ... libgomp.spec
unless I explicitly pass '-specs=libgomp.spec' to the driver.

My impression is that libgomp.spec should be read if found, otherwise the
defaults are used. But seemingly, it is never read - also strace does not show
anything.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread Joost.VandeVondele at pci dot uzh.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #9 from Joost VandeVondele  
2010-11-17 08:50:06 UTC ---
FYI, with strace I see following things being searched for the specs:

access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/",
X_OK) = 0
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/",
X_OK) = 0
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/specs",
R_OK) = -1 E
NOENT (No such file or directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-u
nknown-linux-gnu/lib/x86_64-unknown-linux-gnu/4.6.0/specs", R_OK) = -1 ENOENT
(No such file or directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-u
nknown-linux-gnu/lib/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/specs",
R_OK) = -1 ENOENT 
(No such file or directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/",
X_OK) = 0
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/libgfortran.spec",
R _OK) = -1 ENOENT
(No such file or directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-u
   
nknown-linux-gnu/lib/x86_64-unknown-linux-gnu/4.6.0/libgfortran.spec", R_OK) =
-1 ENOENT (No such file or d   
 irectory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-u
   
nknown-linux-gnu/lib/libgfortran.spec", R_OK) = -1 ENOENT (No such file or
directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../x86_64-unkn
   
own-linux-gnu/4.6.0/libgfortran.spec", R_OK) = -1 ENOENT (No such file or
directory)
access("/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../libgfortran
.spec", R_OK) = -1
ENOENT (No such file or directory)
access("/lib/x86_64-unknown-linux-gnu/4.6.0/libgfortran.spec", R_OK) = -1
ENOENT (No such file or directory  
  )
access("/lib/libgfortran.spec", R_OK)   = -1 ENOENT (No such file or directory)
access("/usr/lib/x86_64-unknown-linux-gnu/4.6.0/libgfortran.spec", R_OK) = -1
ENOENT (No such file or direc  
  tory)
access("/usr/lib/libgfortran.spec", R_OK) = -1 ENOENT (No such file or
directory)
open("libgfortran.spec", O_RDONLY)  = -1 ENOENT (No such file or directory)


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread Joost.VandeVondele at pci dot uzh.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

--- Comment #8 from Joost VandeVondele  
2010-11-17 08:46:11 UTC ---
mine look like:

static const char *const multilib_raw[] = {
". !m64 !m32;",
".:../lib64 m64 !m32;",
".:../lib !m64 m32;",
NULL
};

however, I just observe that the libgomp.spec are causing no problems in my
build.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

Tobias Burnus  changed:

   What|Removed |Added

 CC||joseph at codesourcery dot
   ||com

--- Comment #7 from Tobias Burnus  2010-11-17 
08:31:06 UTC ---
CC Joseph, who - after Alan Modra in 2005 (for PR 20425) - seems to be the only
one who has ever touched gcc.c's multilib.


[Bug driver/46516] Non-multilib search problem in gcc.c / gfortran error: libgfortran.spec: No such file or directory

2010-11-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46516

Tobias Burnus  changed:

   What|Removed |Added

 Target||x86_64-unknown-linux-gnu
   Host||x86_64-unknown-linux-gnu
   Target Milestone|--- |4.6.0
Summary|gfortran-trunk: error:  |Non-multilib search problem
   |libgfortran.spec: No such   |in gcc.c / gfortran error:
   |file or directory   |libgfortran.spec: No such
   ||file or directory
  Build||x86_64-unknown-linux-gnu