bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25803] cross compilation of glibc using mips64el-none-linu


From: broly at mac dot com
Subject: [Bug binutils/25803] cross compilation of glibc using mips64el-none-linux-gnu as the host
Date: Thu, 09 Apr 2020 21:14:41 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25803

--- Comment #5 from gagan singh sidhu (gagz, broly, w/e u want) <broly at mac 
dot com> ---
hi,

so the error when building the o32 library is on the following line:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  subdir=rt -C rt ..=../
others
mips64el-none-linux-gnu-gcc -mabi=32 -B/cross/bin/   -shared -static-libgcc
-Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld.so.1 
-B/Volumes/xtoolshit/bglibc/csu/ 
-Wl,--version-script=/Volumes/xtoolshit/bglibc/librt.map -Wl,-soname=librt.so.1
-Wl,-z,relro -Wl,--hash-style=both  -Wl,--enable-new-dtags,-z,nodelete
-L/Volumes/xtoolshit/bglibc -L/Volumes/xtoolshit/bglibc/math
-L/Volumes/xtoolshit/bglibc/elf -L/Volumes/xtoolshit/bglibc/dlfcn
-L/Volumes/xtoolshit/bglibc/nss -L/Volumes/xtoolshit/bglibc/nis
-L/Volumes/xtoolshit/bglibc/rt -L/Volumes/xtoolshit/bglibc/resolv
-L/Volumes/xtoolshit/bglibc/mathvec -L/Volumes/xtoolshit/bglibc/support
-L/Volumes/xtoolshit/bglibc/crypt -L/Volumes/xtoolshit/bglibc/nptl
-Wl,-rpath-link=/Volumes/xtoolshit/bglibc:/Volumes/xtoolshit/bglibc/math:/Volumes/xtoolshit/bglibc/elf:/Volumes/xtoolshit/bglibc/dlfcn:/Volumes/xtoolshit/bglibc/nss:/Volumes/xtoolshit/bglibc/nis:/Volumes/xtoolshit/bglibc/rt:/Volumes/xtoolshit/bglibc/resolv:/Volumes/xtoolshit/bglibc/mathvec:/Volumes/xtoolshit/bglibc/support:/Volumes/xtoolshit/bglibc/crypt:/Volumes/xtoolshit/bglibc/nptl
-o /Volumes/xtoolshit/bglibc/rt/librt.so -T /Volumes/xtoolshit/bglibc/shlib.lds
/Volumes/xtoolshit/bglibc/csu/abi-note.o -Wl,--whole-archive
/Volumes/xtoolshit/bglibc/rt/librt_pic.a -Wl,--no-whole-archive
/Volumes/xtoolshit/bglibc/nptl/libpthread.so   -Wl,--start-group
/Volumes/xtoolshit/bglibc/libc.so /Volumes/xtoolshit/bglibc/libc_nonshared.a
-Wl,--as-needed /Volumes/xtoolshit/bglibc/elf/ld.so -Wl,--no-as-needed
-Wl,--end-group
/Volumes/xtoolshit/hdr3/cross/bin/../lib/gcc/mips64el-none-linux-gnu/9.3.0/../../../../mips64el-none-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.34 assertion fail
../../binutils-2.34/bfd/elfxx-mips.c:9313
/Volumes/xtoolshit/hdr3/cross/bin/../lib/gcc/mips64el-none-linux-gnu/9.3.0/../../../../mips64el-none-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.34 assertion fail
../../binutils-2.34/bfd/elfxx-mips.c:9313
/Volumes/xtoolshit/hdr3/cross/bin/../lib/gcc/mips64el-none-linux-gnu/9.3.0/../../../../mips64el-none-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.34 assertion fail
../../binutils-2.34/bfd/elfxx-mips.c:9313
/Volumes/xtoolshit/hdr3/cross/bin/../lib/gcc/mips64el-none-linux-gnu/9.3.0/../../../../mips64el-none-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.34 assertion fail
../../binutils-2.34/bfd/elfxx-mips.c:9313
/Volumes/xtoolshit/hdr3/cross/bin/../lib/gcc/mips64el-none-linux-gnu/9.3.0/../../../../mips64el-none-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.34 assertion fail
../../binutils-2.34/bfd/elfxx-mips.c:9313


to reproduce this, build the cross binutils as follows
(CLFS_HOST=x86_64-apple-darwin, CLFS_TARGET=mips64el-none-linux-gnu):

http://clfs.org/view/sysvinit/mips64/cross-tools/binutils.html
<http://clfs.org/view/sysvinit/mips64/cross-tools/binutils.html>
AR=ar AS=as \
../binutils-2.28/configure \
    --prefix=/cross-tools \
    --host=${CLFS_HOST} \
    --target=${CLFS_TARGET} \
    --with-sysroot=${CLFS} \
    --with-lib-path=/tools/lib:/tools/lib64 \
    --disable-nls \
    --disable-static \
    --enable-64-bit-bfd \
    --enable-gold=yes \
    --enable-plugins \
    --enable-threads \
    --disable-werror

and the static gcc (doesn’t matter whether it’s the static or shared library
variant, as you all should be aware, since we’re building glibc):

http://clfs.org/view/sysvinit/mips64/cross-tools/gcc-static.html
<http://clfs.org/view/sysvinit/mips64/cross-tools/gcc-static.html>

AR=ar \
LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
../gcc-7.1.0/configure \
    --prefix=/cross-tools \
    --build=${CLFS_HOST} \
    --host=${CLFS_HOST} \
    --target=${CLFS_TARGET} \
    --with-sysroot=${CLFS} \
    --with-local-prefix=/tools \
    --with-native-system-header-dir=/tools/include \
    --disable-shared \
    --with-mpfr=/cross-tools \
    --with-gmp=/cross-tools \
    --with-mpc=/cross-tools \
    --without-headers \
    --with-newlib \
    --disable-decimal-float \
    --disable-libgomp \
    --disable-libssp \
    --disable-libatomic \
    --disable-libitm \
    --disable-libsanitizer \
    --disable-libquadmath \
    --disable-libvtv \
    --disable-libcilkrts \
    --disable-libstdc++-v3 \
    --disable-threads \
    --with-isl=/cross-tools \
    --enable-languages=c \
    --with-glibc-version=2.25

then when building the o32 GLIBC will fail using the following:

http://clfs.org/view/sysvinit/mips64/cross-tools/glibc.html
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc ${BUILD32}" \
AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
../glibc-2.25/configure \
    --prefix=/tools \
    --host=${CLFS_TARGET32} \
    --build=${CLFS_HOST} \
    --enable-kernel=3.12.0 \
    --with-binutils=/cross-tools/bin \
    --with-headers=/tools/include \
    --enable-obsolete-rpc
when CLFS_TARGET32 is set to mipsel-none-linux-gnu

neither the 64 or n32 have this problem, which leads me to believe this is
solely due to the host being 32bit. it has to be something small that causes a
downstream issue with elfxx-mips

Thanks,
Gagan

> On Apr 9, 2020, at 2:06 PM, beatlesnut at mac dot com <address@hidden> wrote:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=25803
> 
> --- Comment #4 from beatlesnut at mac dot com ---
> Hi,
> 
> That's not a problem. As a heads up please do keep in mind I'm on Darwin. 
> 
> However the instructions I use are from CLFS and required little changes. I
> will provide them shortly. 
> 
> I have reproduced the assertion fail on 10.10 and 10.13 using a
> mips64el-none-linux-gnu-gcc compiler ‎also produced from CLFS. 
> 
> I should note this is the only scenario where cross compilation has been a
> problem. Everything else has worked/compiled great, including LTO.
> 
>   Original Message  
> From: nickc at redhat dot com
> Sent: Thursday, 9 April 2020 12:59 AM
> To: address@hidden
> Subject: [Bug binutils/25803] cross compilation of glibc using
> mips64el-none-linux-gnu as the host
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=25803
> 
> Nick Clifton <nickc at redhat dot com> changed:
> 
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |nickc at redhat dot com
> 
> --- Comment #3 from Nick Clifton <nickc at redhat dot com> ---
> (In reply to gagan singh sidhu (gagz, broly, w/e u want) from comment #2)
> Hi Gagan,
> 
>> i really would appreciate it being fixed
> 
> Ok - please can you provide a small, standalone testcase that reproduces the
> problem ?
> 
> Cheers
> Nick
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]