[PATCH v4 5/7] MIPS: Fix some ld testcases with compiler
YunQiang Su
wzssyqa@gmail.com
Tue Jun 20 03:17:00 GMT 2023
Alan Modra <amodra@gmail.com> 于2023年6月20日周二 10:34写道:
>
> On Tue, Jun 20, 2023 at 09:40:19AM +0800, YunQiang Su wrote:
> > How do you build your cross toolchain?
>
> mips64-linux-gnuabi64-gcc (GCC) 13.0.0 20220910 (experimental) was
> built using this configuration:
> ~/src/gcc/configure \
> --with-sysroot=/home/gnu/mips64-linux-gnuabi64 \
> --prefix=/usr/local \
> --target=mips64-linux-gnuabi64 \
> --enable-targets=mips-linux-gnu \
> --with-mips-plt \
> --disable-nls \
> --enable-__cxa_atexit \
> --enable-initfini-array \
> --disable-libsanitizer \
> --disable-bootstrap \
> --enable-languages=c,c++
>
You have no `--enable-plugin` option here, so
> > 9. ld-plugin/plugin.exp: xfail
> > plugin claimfile lost symbol,
> > plugin claimfile replace symbol,
> > plugin claimfile replace symbol,
> > plugin claimfile lost symbol with source,
> > plugin claimfile replace symbol with source,
> > plugin claimfile resolve symbol with source,
> > plugin 2 with source lib,
> > load plugin 2 with source,
> > plugin 3 with source lib,
> > load plugin 3 with source.
won't run.
I am using the cross toolchain in Debian:
you can
apt install g++-multilib-mipsel-linux-gnu g++-multilib-mips-linux-gnu
and link them as N32/N64 ones
For example, you can create a script with name
`mips64el-linux-gnu`
#!/bin/sh
exec mipsel-linux-gnu-gcc -mabi=n32 $@
> glibc64 with
> dest=/home/gnu/mips64-linux-gnuabi64
> echo slibdir="${dest}"/lib64 > configparms
> echo sysconfdir="${dest}"/etc >> configparms
> echo sbindir="${dest}"/usr/sbin >> configparms
> echo rootsbindir="${dest}"/sbin >> configparms
> echo localedir="${dest}"/usr/lib64 >> configparms
>
> libc_cv_forced_unwind=yes \
> libc_cv_c_cleanup=yes \
> CC="mips64-linux-gnuabi64-gcc" \
> ~/src/glibc-current/configure \
> --build=x86_64-linux-gnu \
> --host=mips64-linux-gnuabi64 \
> --prefix="${dest}"/usr \
> --libdir="${dest}"/usr/lib64 \
> --with-headers="${dest}"/usr/include \
> --enable-add-ons \
> --with-tls \
> --enable-kernel=4.0
>
> glibc32 with
> dest=/home/gnu/mips64-linux-gnuabi64
> echo slibdir="${dest}"/lib > configparms
> echo sysconfdir="${dest}"/etc >> configparms
> echo sbindir="${dest}"/usr/sbin >> configparms
> echo rootsbindir="${dest}"/sbin >> configparms
> echo localedir="${dest}"/usr/lib >> configparms
>
> libc_cv_forced_unwind=yes \
> libc_cv_c_cleanup=yes \
> CC="mips64-linux-gnuabi64-gcc -mabi=32" \
> ~/src/glibc-current/configure \
> --build=x86_64-linux-gnu \
> --host=mips-linux-gnu \
> --prefix="${dest}"/usr \
> --libdir="${dest}"/usr/lib \
> --with-headers="${dest}"/usr/include \
> --enable-add-ons \
> --with-tls \
> --enable-kernel=4.0
>
> glibcn32 with
> dest=/home/gnu/mips64-linux-gnuabi64
> echo slibdir="${dest}"/lib32 > configparms
> echo sysconfdir="${dest}"/etc >> configparms
> echo sbindir="${dest}"/usr/sbin >> configparms
> echo rootsbindir="${dest}"/sbin >> configparms
> echo localedir="${dest}"/usr/lib32 >> configparms
>
> libc_cv_forced_unwind=yes \
> libc_cv_c_cleanup=yes \
> CC="mips64-linux-gnuabi64-gcc -mabi=n32" \
> ~/src/glibc-current/configure \
> --build=x86_64-linux-gnu \
> --host=mips64-linux-gnuabi64 \
> --prefix="${dest}"/usr \
> --libdir="${dest}"/usr/lib32 \
> --with-headers="${dest}"/usr/include \
> --enable-add-ons \
> --with-tls \
> --enable-kernel=4.0
>
> mips-linux-gnu-gcc (GCC) 13.0.0 20220910 (experimental) was built with
> ~/src/gcc/configure \
> --with-sysroot=/home/gnu/mips-linux-gnu \
> --prefix=/usr/local \
> --target=mips-linux-gnu \
> --with-mips-plt \
> --disable-nls \
> --enable-__cxa_atexit \
> --disable-libsanitizer \
> --disable-bootstrap \
> --enable-languages=c,c++
>
> glibc with
> dest=/home/gnu/mips-linux-gnu
> libc_cv_forced_unwind=yes \
> libc_cv_c_cleanup=yes \
> libc_cv_ssp=no \
> ~/src/glibc-current/configure \
> --build=x86_64-linux-gnu \
> --host=mips-linux-gnu \
> --prefix="${dest}"/usr \
> --with-headers="${dest}"/usr/include \
> --enable-add-ons \
> --with-tls \
> --enable-kernel=4.0 \
> --without-selinux \
> --enable-obsolete-rpc \
> --disable-werror
>
> --
> Alan Modra
> Australia Development Lab, IBM
--
YunQiang Su
More information about the Binutils
mailing list