public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Mips Multilib issue
@ 2014-06-02 23:20 ANDY KENNEDY
  2014-06-06 20:51 ` ANDY KENNEDY
  0 siblings, 1 reply; 2+ messages in thread
From: ANDY KENNEDY @ 2014-06-02 23:20 UTC (permalink / raw)
  To: 'crossgcc@sourceware.org'

All,

While attempting to build a toolchain for a new version of a MIPS system
(which needs multilib), I run across the following issue:

[ERROR]      configure: error: Need linker with .init_array/.fini_array support.
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Building for multilib subdir='32''
[ERROR]  >>        called in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'

Which doesn't really tell me anything.  So, digging down a bit I find:

/big/home/akennedy/crosstool-ng-hg/.build/mips64-unknwon-linux-gnu/buildtools/lib/gcc/mips64-unknown-linux-gnu/4.8.2/../../../../mips64-unknown-linux-gnu/bin/ld: /tmp/ccSfwfwN.o: ABI is incompatible with that of the selected emulation
/big/home/akennedy/crosstool-ng-hg/.build/mips64-unknown-linux-gnu/buildtools/lib/gcc/mips64-unknown-linux-gnu/4.8.2/../../../../mips64-unknown-linux-gnu/bin/ld: failed to merge target specific data of file /tmp/ccSfwfwN.o
collect2: error: ld returned 1 exit status
configure:6163: $? = 1
configure:6176: result: no
configure:6179: error: Need linker with .init_array/.fini_array support.

in the config.log of build-libc-startfiles_32.  Even more interesting is
the linker line above it:

configure:6160: mips64-unknown-linux-gnu-gcc -mabi=32 -U_FORTIFY_SOURCE -EB -march=xlp -mabi=n32 -mtune=mips64r2 -mhard-float -O2 -o conftest conftest.c -static -nostartfiles -nostdlib

Which would probably be my whole problem.  The issue, as I see it, is
that

CT_TARGET_CFLAGS=' -EB -march=xlp -mabi=n32 -mtune=mips64r2 -mhard-float '


and I'm attempting to build for -mabi=32.  So, the resulting command of
the former would be -mabi=n32 (as it is the last in the list), Right?

Without really doing a HACK in scripts/build/libc/glibc-eglibc.sh-common
(one in which I recreate the CFLAGS without my HARDCODED -mabi=n32
deleted, and inserted back into the list AFTER my command runs), what
can I do to fix this?

Thanks,
Andy

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Mips Multilib issue
  2014-06-02 23:20 Mips Multilib issue ANDY KENNEDY
@ 2014-06-06 20:51 ` ANDY KENNEDY
  0 siblings, 0 replies; 2+ messages in thread
From: ANDY KENNEDY @ 2014-06-06 20:51 UTC (permalink / raw)
  To: ANDY KENNEDY, 'crossgcc@sourceware.org'

> -----Original Message-----
> From: crossgcc-owner@sourceware.org [mailto:crossgcc-owner@sourceware.org] On Behalf Of ANDY KENNEDY
> Sent: Monday, June 02, 2014 6:20 PM
> To: 'crossgcc@sourceware.org'
> Subject: Mips Multilib issue
> 
> All,
> 
> While attempting to build a toolchain for a new version of a MIPS system
> (which needs multilib), I run across the following issue:
> 
> [ERROR]      configure: error: Need linker with .init_array/.fini_array support.
> [ERROR]
> [ERROR]  >>
> [ERROR]  >>  Build failed in step 'Building for multilib subdir='32''
> [ERROR]  >>        called in step 'Installing C library headers & start files'
> [ERROR]  >>        called in step '(top-level)'
<snip>

Okay, I'm past that one (I'll have a patch for this whole thing when I
get done).  Now, I'm at "Installing pass-2 core C compiler" and I get
breakage when attempting to build a mabi=32 32/libgcc_s.so.1.tmp file.
The problem is that the xgcc compiler attempts to link in the
lib/libc.so file:

/sysroot/usr/lib/../lib/libc.so: error adding symbols: File in wrong format

Basically, to solve the other issue, what I had to do was:

CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS//${CT_ARCH_ABI_CFLAG}}"

just after the if [ "${multi_dir}" != "." } ; do (near line 106 or so)
in the file scripts/build/libc/glibc-eglibc.sh-common.  Later, in the
SECOND if [ "${multi_dir} (near line 175 or so), I undo this by doing:

CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_ABI_CFLAG}"

which puts it back in there for me.

If any of you have multi-lib experience and would be willing to help me,
please throw advice my way!

Thanks,
Andy

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-06 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 23:20 Mips Multilib issue ANDY KENNEDY
2014-06-06 20:51 ` ANDY KENNEDY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).