crosstool-0.28-rc16: compiling linux-2.6.6 on Mac OS X

Martin Schaffner schaffner@gmx.li
Tue May 25 16:46:00 GMT 2004


On 24.05.2004, at 00:58, Dan Kegel wrote:
> Martin Schaffner wrote:
>> I had to apply the following patch to linux-2.6.6 for it to compile  
>> on Mac OS X.
>> Unfortunately, it is quite OS X-specific, so I won't even try to get  
>> it
>> included into the official tree...
>
> bleah!  (Say, did you come up with that patch, or is it floating around
> on the linux-ppc mailing list?)
> - Dan

I did most if it by myself. Although I have tried not to break builds  
on other platforms, I have tested it only on OS X.

>> Today I sucessfully tested crosstool-0.28-rc16 with the following  
>> command:
>> export TARBALLS_DIR=/Volumes/ext/src/ RESULT_TOP=/opt/crosstool  
>> GCC_LANGUAGES="c,c++"; eval `cat powerpc-750.dat  
>> gcc-3.4.0-glibc-2.3.2.dat` LINUX_DIR=linux-2.6.6  
>> BINUTILS_DIR=binutils-2.14.90.0.5  sh all.sh --notest
>> I set BINUTILS_DIR to an old version because of the following issue  
>> when compiling linux:
>>   http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00064.html
>> Maybe crosstool should contain a patch against this problem?
>
> I guess I could include
> http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
> for binutils-2.15.  Hrmph.  Does that work for you?

binutils-2.15.90.0.3, for which there is already a patches directory in  
crosstool, has this patch already applied. I tested the above command  
with BINUTILS_DIR=binutils-2.15.90.0.3. Linux-2.6.6 starts to compile  
fine, until it tries to compile ipt_ecn.c:

[...]
net/ipv4/netfilter/ipt_ecn.c:28: warning: "struct ipt_ECN_info"  
declared inside parameter list
net/ipv4/netfilter/ipt_ecn.c:28: warning: its scope is only this  
definition or declaration, which is probably not what you want
net/ipv4/netfilter/ipt_ecn.c: In function `set_ect_ip':
net/ipv4/netfilter/ipt_ecn.c:31: error: dereferencing pointer to  
incomplete type
net/ipv4/netfilter/ipt_ecn.c:39: error: dereferencing pointer to  
incomplete type
[...]

After disabling network packet filtering, it continues until:

[...]
   LD      init/built-in.o
   LD      .tmp_vmlinux1
//opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/ 
powerpc-750-linux-gnu-ld: section __ftr_fixup [000005f4 -> 00000a53]  
overlaps section .text.1 [00000000 -> 00003c2f]
//opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/ 
powerpc-750-linux-gnu-ld: section .rodata [000008c8 -> 0000e51f]  
overlaps section .text.1 [00000000 -> 00003c2f]
//opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/ 
powerpc-750-linux-gnu-ld: section __ksymtab [0000e520 -> 00012d87]  
overlaps section .init.text [000063f8 -> 0002c2fb]
[...]

However, most gcc-*-glibc-*.dat files ask for binutils-2.14.92.
I backported this patch for binutils-2.14.92 and made it applyable with  
"patch -p1" (attached).
I included it into the correct patches subdirectory.
Unfortunately, when I did the above command line with no BINUTILS_DIR  
assignment, I got:

[...]
cp  
/Volumes/ext/crosstool-0.28-rc16/build/powerpc-750-linux-gnu/gcc-3.4.0- 
glibc-2.3.2/gcc-3.4.0/libstdc++-v3/config/linker-map.gnu  
./libstdc++-symbol.ver
if test "x" != x; then \
   sed -n '1,/DO NOT DELETE/p' libstdc++-symbol.ver > tmp.top; \
   sed -n '/DO NOT DELETE/,$p' libstdc++-symbol.ver > tmp.bottom; \
   cat tmp.top  tmp.bottom > libstdc++-symbol.ver; \
   rm tmp.top tmp.bottom; \
fi
/bin/sh ../libtool --tag CXX --mode=link  
/Volumes/ext/crosstool-0.28-rc16/build/powerpc-750-linux-gnu/gcc-3.4.0- 
glibc-2.3.2/build-gcc/gcc/xgcc -shared-libgcc  
-B/Volumes/ext/crosstool-0.28-rc16/build/powerpc-750-linux-gnu/gcc 
-3.4.0-glibc-2.3.2/build-gcc/gcc/ -nostdinc++  
-L/Volumes/ext/crosstool-0.28-rc16/build/powerpc-750-linux-gnu/gcc 
-3.4.0-glibc-2.3.2/build-gcc/powerpc-750-linux-gnu/libstdc++-v3/src  
-L/Volumes/ext/crosstool-0.28-rc16/build/powerpc-750-linux-gnu/gcc 
-3.4.0-glibc-2.3.2/build-gcc/powerpc-750-linux-gnu/libstdc++-v3/src/ 
.libs  
-B/opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc 
-750-linux-gnu/bin/  
-B/opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc 
-750-linux-gnu/lib/ -isystem  
/opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc-750- 
linux-gnu/include -isystem  
/opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc-750- 
linux-gnu/sys-include -Wl,-O1   -fno-implicit-templates -Wall -W  
-Wwrite-strings -Wcast-qual  -fdiagnostics-show-location=once   
-ffunction-sections -fdata-sections   -o libstdc++.la -rpath  
/opt/crosstool/powerpc-750-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc-750- 
linux-gnu/lib -version-info 6:0:0  
-Wl,--version-script=libstdc++-symbol.ver -lm  allocator.lo codecvt.lo  
complex_io.lo ctype.lo debug.lo debug_list.lo functexcept.lo  
globals_locale.lo globals_io.lo ios.lo ios_failure.lo ios_init.lo  
ios_locale.lo limits.lo list.lo locale.lo locale_init.lo  
locale_facets.lo localename.lo stdexcept.lo strstream.lo tree.lo  
allocator-inst.lo concept-inst.lo fstream-inst.lo ext-inst.lo  
io-inst.lo istream-inst.lo locale-inst.lo locale-misc-inst.lo  
misc-inst.lo ostream-inst.lo sstream-inst.lo streambuf-inst.lo  
string-inst.lo valarray-inst.lo wlocale-inst.lo wstring-inst.lo  
atomicity.lo codecvt_members.lo collate_members.lo ctype_members.lo  
messages_members.lo monetary_members.lo numeric_members.lo  
time_members.lo basic_file.lo c++locale.lo ../libmath/libmath.la  
../libsupc++/libsupc++convenience.la -lm
libtool: link: `wlocale-inst.lo' is not a valid libtool object
make[3]: *** [libstdc++.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-target-libstdc++-v3] Error 2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.14.92-compile-ppc-linux.patch
Type: application/octet-stream
Size: 3716 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20040525/03f05778/attachment.obj>
-------------- next part --------------
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


More information about the crossgcc mailing list