m68k-rtems-gcc toolchain build problem on Solaris-7
Paul Cadaret
rtems at usd.com
Tue Dec 30 08:20:26 UTC 2003
With help from Thomas (see below) I used the files he pointed out at
ftp://ftp.rtems.com/pub/rtems/releases/4.6.0pre5/tools
to run the build according to the PDF file at
http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.6.0pre5/share/rtems/pdf/started.pdf
and I followed the PDF file instructions carefully for:
4.1.2 Unarchiving the Tools
4.1.3 Applying RTEMS Patches,
Apply RTEMS Patch to GCC,
Apply RTEMS Patch to binutils,
Apply RTEMS Patch to newlib
4.1.4.2 Using configure and make,
Configuring and Building BINUTILS,
Configuring and Building GCC and NEWLIB
Binutils built and installed without error.
Building gcc-3.2.3 died as follows:
1113
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/xgcc
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/
1113 tools/gcc-3.2.3/build.m68k-rtems/gcc/ -nostdinc
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m
1113 68k-rtems/newlib/ -isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m68k-rtems/newlib/targ-i
1113 nclude -isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/src/newlib/libc/include
-B/tools/local.m68k-rtems/m6
1113 8k-rtems/bin/ -B/tools/local.m68k-rtems/m68k-rtems/lib/
-isystem /tools/local.m68k-rtems/m68k-rtems/include -O2 -I../../src/
1113 gcc/../newlib/libc/sys/rtems/include -DIN_GCC
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-proto
1113 types -isystem ./include -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I../../src/g
1113 cc -I../../src/gcc/. -I../../src/gcc/config
-I../../src/gcc/../include -DL_floatdisf -c ../../src/gcc/libgcc2.c
-o libgcc/.
1113 /_floatdisf.o
1114
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/xgcc
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/
1114 tools/gcc-3.2.3/build.m68k-rtems/gcc/ -nostdinc
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m
1114 68k-rtems/newlib/ -isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m68k-rtems/newlib/targ-i
1114 nclude -isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/src/newlib/libc/include
-B/tools/local.m68k-rtems/m6
1114 8k-rtems/bin/ -B/tools/local.m68k-rtems/m68k-rtems/lib/
-isystem /tools/local.m68k-rtems/m68k-rtems/include -O2 -I../../src/
1114 gcc/../newlib/libc/sys/rtems/include -DIN_GCC
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-proto
1114 types -isystem ./include -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I../../src/g
1114 cc -I../../src/gcc/. -I../../src/gcc/config
-I../../src/gcc/../include -DL_fixunsdfsi -c
../../src/gcc/libgcc2.c -o libgcc/
1114 ./_fixunsdfsi.o
1115 In file included from
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/include/syslimits.h:7,
1116 from
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/include/limits.h:11,
1117 from ../../src/gcc/libgcc2.c:1166:
1118
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/include/limits.h:132:75:
no include path in whi
1118 ch to find limits.h
1119 make[2]: *** [libgcc/./_fixunsdfsi.o] Error 1
1120 make[2]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc'
1121 make[1]: *** [stmp-multilib] Error 2
1122 make[1]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc'
1123 make: *** [all-gcc] Error 2
../../src/gcc/libgcc2.c looks like:
1155 #ifdef L_fixunsdfsi
1156 /* Reenable the normal types, in case limits.h needs them. */
1157 #undef char
1158 #undef short
1159 #undef int
1160 #undef long
1161 #undef unsigned
1162 #undef float
1163 #undef double
1164 #undef MIN
1165 #undef MAX
1166 #include <limits.h> <<<============== OK
Note that ../src/gcc is where I unpacked the gcc-3.2.3 source tree and
applied the patches.
The above file includes ./gcc/include/limits.h:
9 #ifndef _LIBC_LIMITS_H_
10 /* Use "..." so that we find syslimits.h only in this same
directory. */
11 #include "syslimits.h" <<<===============OK
12 #endif
13 #ifndef _LIMITS_H___
14 #define _LIMITS_H___
The above file includes ./gcc/include/syslimits.h:
1 /* syslimits.h stands for the system's own limits.h file.
2 If we can use it ok unmodified, then we install this text.
3 If fixincludes fixes it, then the fixed version is installed
4 instead of this text. */
5
6 #define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h
to recurse */
7 #include_next <limits.h> <<<============= dies here searching
for a secondary instance of limits.h
8 #undef _GCC_NEXT_LIMITS_H
What is "the system's own limits.h file" ??? linux? solaris? newlib?
rtems?
The "#include_next" is a feature of the newer gcc's
Disecting my build log line 1114 above looks like this:
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/xgcc
\
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc/
\
-nostdinc \
-B/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m68k-rtems/newlib/
\
-isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m68k-rtems/newlib/targ-include
\
-isystem
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/src/newlib/libc/include
\
-B/tools/local.m68k-rtems/m68k-rtems/bin/ \
-B/tools/local.m68k-rtems/m68k-rtems/lib/ \
-isystem /tools/local.m68k-rtems/m68k-rtems/include \
-O2 \
-I../../src/gcc/../newlib/libc/sys/rtems/include \
-DIN_GCC -DCROSS_COMPILE \
-W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes \
-isystem ./include \
-g \
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc \
-I. \
-I. \
-I../../src/gcc \
-I../../src/gcc/. \
-I../../src/gcc/config \
-I../../src/gcc/../include \
-DL_fixunsdfsi \
-c \
../../src/gcc/libgcc2.c \
-o libgcc/./_fixunsdfsi.o
From my build directory
(/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/gcc)
if I run the command below
find .. ../../src /tools/local.m68k-rtems -follow -name limits.h -print
shows the following:
find: ../gcc/cp/stage1: No such file or directory
find: ../gcc/cp/stage2: No such file or directory
find: ../gcc/cp/stage3: No such file or directory
find: ../gcc/cp/stage4: No such file or directory
../gcc/cp/include/limits.h
find: ../gcc/fixinc/stage1: No such file or directory
find: ../gcc/fixinc/stage2: No such file or directory
find: ../gcc/fixinc/stage3: No such file or directory
find: ../gcc/fixinc/stage4: No such file or directory
../gcc/fixinc/include/limits.h
../gcc/include/limits.h
../../src/gcc/fixinc/tests/base/sys/limits.h
../../src/libstdc++-v3/config/cpu/generic/bits/limits.h
../../src/libstdc++-v3/include/c_compatibility/limits.h
../../src/libstdc++-v3/include/c_shadow/limits.h
../../src/newlib/newlib/libc/include/limits.h
../../src/newlib/newlib/libc/sys/linux/include/limits.h
../../src/newlib/newlib/libc/sys/rtems/include/limits.h
../../src/newlib/newlib/libc/sys/rtems/machine/limits.h
The above list shows --ALL-- of the instances of files named "limits.h"
available to this build; in fact, everything
that might possibly pertain to the RTEMS tool sources I downloaded.
The file "./include/limits.h" (aka ../gcc/include/limits.h) is the file
that xgcc finds on line 1166 above.
The file "syslimits.h" tries to use the "#include_next" mechanism to
find a secondary "limits.h", however,
the xgcc include path doesn't have any more files along the path. As
best I can determine the xgcc include path
should effectively be (from top to bottom):
../../src/gcc/../newlib/libc/sys/rtems/include
.
../../src/gcc
../../src/gcc/config
../../src/gcc/../include
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/build.m68k-rtems/m68k-rtems/newlib/targ-include
/sd/c0t8d0/opt1/web/sites/ftp.rtems.com/tools/gcc-3.2.3/src/newlib/libc/include
/tools/local.m68k-rtems/m68k-rtems/include
./include
Since 'configure' builds the makefiles here and I have no idea what it
is trying to accomplish here, I really don't know
what to fix. As best I can tell the Solaris toolchain is broken.
Some further data:
rtems> uname -a
SunOS u2 5.7 Generic_106541-08 sun4u sparc SUNW,UltraSPARC-IIi-Engine
rtems> perl --version
This is perl, v5.6.0 built for sun4-solaris
rtems> autoconf --version
autoconf (GNU Autoconf) 2.59
rtems> automake --version
automake (GNU automake) 1.8
rtems> gmake --version
GNU Make 3.80
rtems> gcc --version
2.95.2
rtems> type m68k-rtems-as
m68k-rtems-as is /tools/local.m68k-rtems/bin/m68k-rtems-as
rtems> m68k-rtems-as --version
GNU assembler 2.13.2.1
I would appreciate some guidance here.
Thanks much.
Paul
-------------------------------------------------------------------------------------------------------------
Thomas Doerfler wrote:
>Paul,
>
>the files you are looking for are actually located under
>
>ftp://ftp.rtems.com/pub/rtems/releases/4.6.0pre5/tools/rtems-4.6-gcc3.2.3newlib1.11.0-1/source/newlib-1.11.0-rtems-20030605.diff
>
>and
>
>ftp://ftp.rtems.com/pub/rtems/releases/4.6.0pre5/tools/rtems-4.6-gcc3.2.3newlib1.11.0-1/source/gcc-3.2.3-rtems-20030826.diff
>
>wkr,
> Thomas.
>
>
>
>>The web page
>>http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.6.0pre5/share/rtems/html/
>>has an entry that referrs to ' Getting Started with RTEMS for C/C++
>>Users
>><http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.6.0pre5/share/rtems/html/started/index.html>'
>>that is a PDF file
>>'started-6.pdf'.
>>
>>On page 14 of the PDF file it says:
>>
>> RTEMS Speci c Tool Patches and Scripts
>>
>> FTP Site: ftp.rtems.com
>> Directory: /pub/rtems/releases/4.6.0pre5/c_tools/source
>> File: newlib-1.11.0-rtems-20030605.diff
>> File: gcc-3.2.3-rtems-20030507a.diff
>>
>>The directory /pub/rtems/releases/4.6.0pre5/c_tools does not exist.
>>
>>
>>Where can these patch diffs be found now?
>>
>>thanks much.
>>paul
>>
>>
>
>--------------------------------------------
>IMD Ingenieurbuero fuer Microcomputertechnik
>Thomas Doerfler Herbststrasse 8
>D-82178 Puchheim Germany
>email: Thomas.Doerfler at imd-systems.de
>PGP public key available at: http://www.imd-
>systems.de/pgp_keys.htm
>
>
>
More information about the users
mailing list