<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi all,</div>
<div>This is my first post to this list.</div>
<div> </div>
<div>I’m trying to follow the CLFS guide “Version SYSVINIT-20160313-x86_64-Multilib”. I did manage to successfully achieve all steps of an older guide, employing older compiler/glibc/kernel header versions… now I need to update the cross-compile tools but I
get an error when following the latest CLFS book:</div>
<div> <a href="http://clfs.org/view/sysvinit/x86_64/cross-tools/glibc.html">http://clfs.org/view/sysvinit/x86_64/cross-tools/glibc.html</a> </div>
<div> </div>
<div>In particular I managed to:</div>
<div>1) compile all required libs for GCC</div>
<div>2) compile GCC 5.3.0 statically for creating the temporary toolchain in /cross-tools</div>
<div> </div>
<div>Next step 3) would be building glibc in 32 bits but it fails… the error I get is: </div>
<div> </div>
<div>-------------------</div>
<div> </div>
<div>…</div>
<div>x86_64-unknown-linux-gnu-gcc -<b>m32</b> -B/cross-tools/bin/ -nostdlib -nostartfiles -r -o /home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map.o '-Wl,-(' /home/clfs/sources/gcc_glibc/glibc-build/elf/dl-allobjs.os /home/clfs/sources/gcc_glibc/glibc-build/libc_pic.a
-lgcc '-Wl,-)' -Wl,-Map,/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.mapT</div>
<div><b>/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/libgcc.a when searching for -lgcc</b></div>
<div><b>/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc</b></div>
<div><b>collect2: error: ld returned 1 exit status</b></div>
<div>Makefile:322: recipe for target '/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map' failed</div>
<div>make[3]: *** [/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map] Error 1</div>
<div>make[3]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22/elf'</div>
<div>Makefile:213: recipe for target 'elf/subdir_lib' failed</div>
<div>make[2]: *** [elf/subdir_lib] Error 2</div>
<div>make[2]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22'</div>
<div>Makefile:9: recipe for target 'all' failed</div>
<div>make[1]: *** [all] Error 2</div>
<div>make[1]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-build'</div>
<div>makefile:274: recipe for target 'glibc_32bit' failed</div>
<div>make: *** [glibc_32bit] Error 2</div>
<div>…</div>
<div>-------</div>
<div> </div>
<div>The problem IMHO is that the libgcc.a created in step 2) is a 64bit library, while glibc 32 bit perhaps needs it in 32 bit architecture.</div>
<div> </div>
<div>Note that for my setup "export" returns:</div>
<div> </div>
<div>…</div>
<div>declare -x CLFS_HOST="x86_64-cross-linux-gnu"</div>
<div>declare -x CLFS_TARGET="x86_64-unknown-linux-gnu"</div>
<div>declare -x CLFS_TARGET32="i686-pc-linux-gnu"</div>
<div>…</div>
<div> </div>
<div>What do you suggest? What else can I post to get help <font face="Wingdings">J</font> ?</div>
<div> </div>
<div>Thanks,</div>
<div>Francesco Montorsi</div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>