This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: libffi related bootstrap failure on sparc-sun-solaris2.8


>>>>> "Gerald" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

Gerald> Mainline built fine a few hours ago; I'm running another
Gerald> mainline build just right now and will then try the branch
Gerald> again.

Do you mean it works on the main line and not the branch?
If so that's quite surprising.  The trunk and branch libffi/configure
scripts are identical.

Gerald> However, /usr/include/sys/isa_defs.h is #included by param.h
Gerald> and it has
Gerald>   #define _BIG_ENDIAN
Gerald> (Note the underscore!)

Ok.  This suggests that the test itself is buggy..

>> Failing that we can find a way to improve the configure macro in
>> question.

Gerald> Anything I could try?

I looked at the config.log output again.  Then I re-read the configury
code in libffi/aclocal.m4.  I see this at the very end of your
config.log posting:

    configure:3358: /files/pfeifer/OBJ-0322-22:00/gcc/xgcc -B/files/pfeifer/OBJ-0322-22:00/gcc/ -B/files/pfeifer/gcc/sparc-sun-solaris2.8/bin/ -B/files/pfeifer/gcc/sparc-sun-solaris2.8/lib/ -isystem /files/pfeifer/gcc/sparc-sun-solaris2.8/include -o conftest -g -O2   conftest.c  1>&5
    configure: failed program was:
    #line 3345 "configure"
    #include "confdefs.h"
    main () {
      /* Are we little or big endian?  From Harbison&Steele.  */
      union
      {
	long l;
	char c[sizeof (long)];
      } u;
      u.l = 1;
      exit (u.c[sizeof (long) - 1] == 1);
    }


Ok.  The test I quoted earlier was not the last one.  Reading more
closely, that test can fail in some situations without indicating a
bug.

I'm not certain why the above test failed in your situation.  It seems
like at least some error message should be printed.  But that's ok too
-- even that test can fail normally, since it is a run-test which
can't work when cross-compiling.

There is yet another test in that macro in aclocal.m4.  We need to
know why that one didn't get run.  That is the test we would expect to
find the answer.


I think there are a couple things you could do that would help.

First, if indeed this code works on the trunk and not the branch, look
at the differences between the two.  See how the config.log files
differ.

Next, it might help to add debugging code to libffi/configure and then
re-run the configury to see what actually happens.  I usually start by
finding the section of code I care about and then adding `set -x'/`set +x'
around it.

Tom


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