Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MIPS assembly code
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ArlexBee-871RBO
n00b
n00b


Joined: 20 Mar 2007
Posts: 57
Location: Hell

PostPosted: Sun Oct 12, 2008 1:52 pm    Post subject: MIPS assembly code Reply with quote

I'm running 64bit Gentoo on an Intel Core 2 Due laptop. I'm trying to get gcc to output assembly code (-S) from .c file for 32bit MIPS system. I found out about crossdev and I had to try it. I had to set PORTDIR_OVERLAY=/usr/local/portage, then I tried crossdev --target mips-unknown-linux-gnu. But I get an error saying "gcc failed :(". Any idea what is causing this and how do I fix it?

I've tried other machines names, but they all fail.
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Mon Oct 13, 2008 8:11 am    Post subject: Reply with quote

This works for me:

crossdev -t mipsel -v --b 2.18.50.0.9 --g 4.3.2 --k 2.6.26 --l 2.7-r2 --without-headers

You need to remove patch "77_all-generate-gnu_hash.patch" from the binutils patchkit or
glibc build will abort in the configure stage.

--without-headers is to work around a glibc-header build failure.
Back to top
View user's profile Send private message
ArlexBee-871RBO
n00b
n00b


Joined: 20 Mar 2007
Posts: 57
Location: Hell

PostPosted: Mon Oct 13, 2008 1:22 pm    Post subject: Reply with quote

glibc fails for me. and there is no "77_all-generate-gnu_hash.patch" , so I can't remove it.
Back to top
View user's profile Send private message
ArlexBee-871RBO
n00b
n00b


Joined: 20 Mar 2007
Posts: 57
Location: Hell

PostPosted: Mon Oct 13, 2008 1:24 pm    Post subject: Reply with quote

Code:

checking for .preinit_array/.init_array/.fini_array support... no
configure: error: Need linker with .init_array/.fini_array support.
 *
 * ERROR: cross-mipsel-unknown-linux-gnu/glibc-2.7-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3445:  Called eblit-run 'src_compile'
 *             environment, line 1124:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  173:  Called src_compile
 *             environment, line 3445:  Called eblit-run 'src_compile'
 *             environment, line 1124:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  181:  Called toolchain-glibc_src_compile
 *       src_compile.eblit, line  120:  Called glibc_do_configure 'src_compile'
 *       src_compile.eblit, line   97:  Called die
 * The specific snippet of code:
 *      "${S}"/configure ${myconf} || die "failed to configure glibc"
 *  The die message:
 *   failed to configure glibc
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/mipsel-unknown-linux-gnu/portage/cross-mipsel-unknown-linux-gnu/glibc-2.7-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/mipsel-unknown-linux-gnu/portage/cross-mipsel-unknown-linux-gnu/glibc-2.7-r2/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 *

 * Messages for package cross-mipsel-unknown-linux-gnu/glibc-2.7-r2:

 *
 * ERROR: cross-mipsel-unknown-linux-gnu/glibc-2.7-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3445:  Called eblit-run 'src_compile'
 *             environment, line 1124:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  173:  Called src_compile
 *             environment, line 3445:  Called eblit-run 'src_compile'
 *             environment, line 1124:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  181:  Called toolchain-glibc_src_compile
 *       src_compile.eblit, line  120:  Called glibc_do_configure 'src_compile'
 *       src_compile.eblit, line   97:  Called die
 * The specific snippet of code:
 *      "${S}"/configure ${myconf} || die "failed to configure glibc"
 *  The die message:
 *   failed to configure glibc
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/mipsel-unknown-linux-gnu/portage/cross-mipsel-unknown-linux-gnu/glibc-2.7-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/mipsel-unknown-linux-gnu/portage/cross-mipsel-unknown-linux-gnu/glibc-2.7-r2/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 *

 * glibc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-mipsel-unknown-linux-gnu-info.log
 * /var/log/portage/cross-mipsel-unknown-linux-gnu-glibc.log
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 520

PostPosted: Tue Oct 14, 2008 8:21 am    Post subject: Reply with quote

ArlexBee-871RBO wrote:
glibc fails for me. and there is no "77_all-generate-gnu_hash.patch" , so I can't remove it.


sure there is. during binutils' ./configure run, stop the build (ctrl-z),
cd to /var/tmp/cross/mipsel-.../[...]/work/binutils-2.18.50.0.9
and unapply patch "77_all_generate-gnu-hash.patch"
(patch -Rp1 < ../patch/77_all_generate-gnu-hash.patch).

Then resume the build.

(I assume there's a more elegant way, but this is the easiest I could come up with)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum