helpThe libunwind project - Support: sr #108280, Cross-compiling for a mips target


sr #108280: Cross-compiling for a mips target

Submitted by:  Michal Dorsett <howlingcat>
Submitted on:  Fri 05 Apr 2013 07:11:19 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 05 Apr 2013 07:11:19 PM UTC, original submission:

I am attempting to cross-compile libunwind for a mips64 architecture and a linux 2.6, using the following compiler (no choice there):
mips64-nlm-linux-gcc (GCC) 4.4.5 20100516 (prerelease)

The configure log is attached. I tried the following 2 commands, without any luck:

./configure --host=mips CC="mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64" CPP="mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64 -E"

./configure --build=mips64-linux-gnu --host=mips CC="mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64" CPP="mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64 -E"

When I make the library, I am encountering 2 issues:

1. PATH_MAX is not defined. I defined it locally for each of the files using it, and set it to 1024.
2. A link error, which I don't know how to resolve:

Making all in src
make[1]: Entering directory `/home/mdorsett/junk/libunwind-mips/src'
make all-am
make[2]: Entering directory `/home/mdorsett/junk/libunwind-mips/src'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/mdorsett/junk/libunwind-mips/src'
make[1]: Leaving directory `/home/mdorsett/junk/libunwind-mips/src'
Making all in tests
make[1]: Entering directory `/home/mdorsett/junk/libunwind-mips/tests'
/bin/sh ../libtool --tag=CC --mode=link mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64 -g -O2 -fexceptions -Wall -Wsign-compare -o Gperf-simple Gperf-simple.o ../src/ ../src/
libtool: link: mips64-nlm-linux-gcc -march=xlp -mabi=64 -mplt -msym32 -Wl,-rpath=/lib64 -g -O2 -fexceptions -Wall -Wsign-compare -o Gperf-simple Gperf-simple.o ../src/.libs/libunwind-mips.a /home/mdorsett/junk/libunwind-mips/src/.libs/libunwind.a ../src/.libs/libunwind.a -lc -lgcc
../src/.libs/libunwind-mips.a(elfxx.o): In function `_Uelf64_get_proc_name':
/home/mdorsett/junk/libunwind-mips/src/elfxx.c:351: undefined reference to `_Umips_get_elf_image'
/home/mdorsett/junk/libunwind-mips/src/elfxx.c:351: relocation truncated to fit: R_MIPS_26 against `_Umips_get_elf_image'
collect2: ld returned 1 exit status
make[1]: *** [Gperf-simple] Error 1
make[1]: Leaving directory `/home/mdorsett/junk/libunwind-mips/tests'
make: *** [all-recursive] Error 1

Your assistance with resolving this is much appreciated.



Michal Dorsett <howlingcat>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #27780:  config.log added by howlingcat (104KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by howlingcat (Submitted the item)
  • -email is unavailable- added by howlingcat

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-05 howlingcat Attached File- => Added config.log, #27780
        Carbon-Copy- => Added howlingcat

    Back to the top

    Powered by Savane 3.3