This is the mail archive of the gcc-help@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: Building GCC 4.3.2 on powerpc-yellowdog-linux-gnu


Angel Tsankov wrote:
> Angel Tsankov wrote:
>> Angel Tsankov wrote:
>>> OK, the build process anew:
>>>
>>> 1. I configured gcc-core 4.3.2
>>> with --prefix="$INSTALLED_SOFTWARE"/"$program"
>>> --with-local-prefix="$INSTALLED_SOFTWARE"/"$program"
>>> --with-gmp="$INSTALLED_SOFTWARE"/gmp
>>> --with-mpfr="$INSTALLED_SOFTWARE"/mpfr
>>>
>>>
>>> 2. I tried to build with 'make -j 2 bootstrap' and got the following
>>> during stage 2 (<build dir>/stage_current contains 'stage2'):
>>> /home/angel/software/gcc/build/./prev-gcc/xgcc
>>> -B/home/angel/software/gcc/build/./prev-gcc/
>>> -B/home/angel/installed_software/gcc/powerpc-unknown-linux-gnu/bin/
>>> -c
>>>  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
>>> -Wmissing-prototypes
>>> -Wold-style-definition -Wmissing-format-attribute -pedantic
>>> -Wno-long-long
>>> -Wno-variadic-macros
>>> -Wno-overlength-strings
>>>    -DHAVE_CONFIG_H -I. -I. -I../../source/unpacked/gcc
>>> -I../../source/unpacked/gcc/.
>>> -I../../source/unpacked/gcc/../include
>>> -I../../source/unpacked/gcc/../libcpp/include
>>> -I/home/angel/installed_software/gmp/include
>>> -I/home/angel/installed_software/mpfr/include
>>> -I../../source/unpacked/gcc/../libdecnumber
>>> -I../../source/unpacked/gcc/../libdecnumber/dpd
>>> -I../libdecnumber    ../../source/unpacked/gcc/dbgcnt.c -o dbgcnt.o
>>> In file included from ../../source/unpacked/gcc/dbgcnt.c:45:
>>> ../../source/unpacked/gcc/dbgcn
>>>
>>> I've attached the two dependecy files for dbgcnt.c: one produced
>>> from the above command line but with -MD added and one produced
>>> with -MD and -DHAVE_LIMITS_H added to the same command line.  None
>>> of the dependency files includes auto-host.h (where HAVE_LIMITS_H
>>> is defines as 1).  In this case, how is limits.h supposed to get
>>> included in dbgcnt.c
>>> if not by passing -DHAVE_LIMITS_H to the compiler?
>>>
>> It turns out that during stage 2 <build dir>/prev-gcc/xgcc gives
>> preference to <build dir>/gcc/../libdecnumber/config.h instead of to
>> <build dir>/gcc/config.h.  I thought it might be because -I.
>> precedes -I../libdecnumber, so I moved -I. to the end of the list of
>> options in <source dir>/gcc/Makefile but the result was the same.
>> Then
>> I fiddled with the above command line and found out that
>>
>> <build
>> dir>/prev-gcc/xgcc -B/home/angel/software/gcc/build/./prev-gcc/
>> -B/home/angel/installed_software/gcc/powerpc-unknown-linux-gnu/bin/
>> -W -Wall -pedantic -I../libdecnumber -I.
>> ../../source/unpacked/gcc/dbgcnt.c
>>
>> still includes <build dir>/../libdecnumber/config.h instead of <build
>> dir>/config.h.  The only way to include <build dir>/config.h that I
>> found was by removing -I../libdecnumber from command line but I guess
>> I
>> should not do this.  So, what else could I try?
>>
> I forgot to mention that the host C compiler is GCC 2.95.4.
>
I built GCC core 4.3.2 (with GCC 2.95.4 and w/o bootstrapping).  Then I 
tried to build GCC core with the just built GCC (this should esentially 
be stage 2 of bootstrapping).  However, the following command fails in 
<build dir>/gcc:

gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes  
-Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic 
 -Wno-long-long -Wno-variadic-macros                                 -Wno-overlength-strings 
    -DHAVE_CONFIG_H -I. -I. -I../../source/unpacked/gcc -I../../source/unpacked/gcc/. 
 -I../../source/unpacked/gcc/../include -I../../source/unpacked/gcc/../libcpp/include 
 -I/home/angel/installed_software/gmp/include -I/home/angel/installed_software/mpfr/include 
 -I../../source/unpacked/gcc/../libdecnumber -I../../source/unpacked/gcc/../libdecnumber/dpd 
 -I../libdecnumber    ../../source/unpacked/gcc/dbgcnt.c -o dbgcnt.o

The reason is that #include "config.h" in dbgcnt.c resolves to <build 
dir>gcc/../libdecnumber/config.h instead of to <build dir>/gcc/config.h. 
Any ideas why this happens?

Angel Tsankov 




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