Results 1 to 4 of 4

Thread: Calling all *nix Guru's: Compiling a cross-architecture compiler via crosstool

  1. #1
    Loves duck, Peking Duck! bsodmike's Avatar
    Join Date
    Jul 2003
    Location
    Colombo
    Posts
    2,909
    Thanks
    496
    Thanked
    92 times in 80 posts
    • bsodmike's system
      • Motherboard:
      • Misc.
      • CPU:
      • Mac Pro 2.8 GHz (8-cores) / iMac 2.8GHz C2D Extreme Edition / MacBook Pro 15" 2.33 & 13.3" 2.26 GHz
      • Memory:
      • 2GB DDR2 kits on all systems / FB ECC RAM in Mac Pro
      • Storage:
      • 320GB + 3x 1TB, Mac Pro / 500 GB, iMac / 2x 1TB & 2x 2TB WD My Book Studio II, via FW800 to Mac Pro
      • Graphics card(s):
      • ATI Radeon HD 2600 XT 256MB (two dual-link DVI ports / Mac Pro)
      • PSU:
      • Misc.
      • Case:
      • Misc.
      • Operating System:
      • Mac OS X 10.5 (Mac Pro) / Mac OS X 10.4.11 (others)
      • Monitor(s):
      • Apple 23" Cinema HD / Dell FPW2408 / iMac 24" display
      • Internet:
      • 2mbps ADSL (Mac Pro) / 512kbps WiMax (Wifi/MacBook Pro)

    Calling all *nix Guru's: Compiling a cross-architecture compiler via crosstool

    Hi,

    If you haven't already seen this,
    http://www.kegel.com/crosstool/curre...ool-howto.html

    I'm performing the crosstool for the ARM target architecture cross-compiled in OS X. I found a few issues with the demo-arm.sh file, and have got it using a custom .dat file,

    gcc-glibc_custom.dat
    Code:
    BINUTILS_DIR=binutils-2.17
    GCC_CORE_DIR=gcc-4.0.1
    GCC_DIR=gcc-4.0.1
    GLIBC_DIR=glibc-2.3.2
    LINUX_DIR=linux-2.6.15.4
    LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0
    GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.2
    GDB_DIR=gdb-6.5
    demo-arm.sh (edited)
    Code:
    #!/bin/sh
    set -ex
    TARBALLS_DIR=$HOME/downloads
    RESULT_TOP=/usr/local/crosstool
    export TARBALLS_DIR RESULT_TOP
    GCC_LANGUAGES="c,c++"
    export GCC_LANGUAGES
    
    # Really, you should do the mkdir before running this,
    # and chown /opt/crosstool to yourself so you don't need to run as root.
    mkdir -p $RESULT_TOP
    
    # Build the toolchain.  Takes a couple hours and a couple gigabytes.
    
    #eval `cat arm.dat gcc-4.1-20050709-glibc-2.3.2.dat`  sh all.sh --notest
    eval `cat arm.dat gcc-glibc_custom.dat`  sh all.sh --notest
    
    echo Done.
    I downloaded the latest binutils and XCode 2.4.1 installed gcc 4.0.1.

    I tried setting,
    GCC_DIR=gcc-4.1.1

    ...which got me the farthest I've been (over an hour of compile time) and it quit with odd error messages while working on glibc. I'm now attempting to use v4.0.1 in both and see that makes a difference. If not I'm going to look for some newer glibc files but hrm!

    Any ideas?

  2. #2
    Loves duck, Peking Duck! bsodmike's Avatar
    Join Date
    Jul 2003
    Location
    Colombo
    Posts
    2,909
    Thanks
    496
    Thanked
    92 times in 80 posts
    • bsodmike's system
      • Motherboard:
      • Misc.
      • CPU:
      • Mac Pro 2.8 GHz (8-cores) / iMac 2.8GHz C2D Extreme Edition / MacBook Pro 15" 2.33 & 13.3" 2.26 GHz
      • Memory:
      • 2GB DDR2 kits on all systems / FB ECC RAM in Mac Pro
      • Storage:
      • 320GB + 3x 1TB, Mac Pro / 500 GB, iMac / 2x 1TB & 2x 2TB WD My Book Studio II, via FW800 to Mac Pro
      • Graphics card(s):
      • ATI Radeon HD 2600 XT 256MB (two dual-link DVI ports / Mac Pro)
      • PSU:
      • Misc.
      • Case:
      • Misc.
      • Operating System:
      • Mac OS X 10.5 (Mac Pro) / Mac OS X 10.4.11 (others)
      • Monitor(s):
      • Apple 23" Cinema HD / Dell FPW2408 / iMac 24" display
      • Internet:
      • 2mbps ADSL (Mac Pro) / 512kbps WiMax (Wifi/MacBook Pro)
    With either gcc-4.01 and 4.1.1 this is the erroring portion of the compile. Please note, there's a screen load of text before all this,

    Code:
    -o /Users/michaeldesilva/crosstool/crosstool-0.42/build/arm-unknown-linux-gnu/gcc-4.0.1-glibc-2.3.2/build-glibc/math/s_isinf.os
    ../sysdeps/ieee754/dbl-64/s_isinf.c:29: error: 'isinf' aliased to undefined symbol '__isinf'
    ../sysdeps/ieee754/dbl-64/s_isinf.c:31: error: '__isinfl' aliased to undefined symbol '__isinf'
    ../sysdeps/ieee754/dbl-64/s_isinf.c:32: error: 'isinfl' aliased to undefined symbol '__isinf'
    make[2]: *** [/Users/michaeldesilva/crosstool/crosstool-0.42/build/arm-unknown-linux-gnu/gcc-4.0.1-glibc-2.3.2/build-glibc/math/s_isinf.os] Error 1
    make[1]: *** [math/subdir_lib] Error 2
    make: *** [all] Error 2

  3. #3
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    could you actually explain the problem ?

    At what point are you getting this error.

    look at the arch your building for arm-unknown-linux-gnu
    have you checked the compatability of both the package versions your building against binutils/glibc/gcc are very fussy about what they build and cross-compiling is even more complex.

    Have you checked that those versions are compatible with your target arch (one of the reasons I say look at what your target arch is detected as).

    If you're having real problems with this, drop me a PM and I'll walk this through with you, but lets check the basics.
    It is Inevitable.....


  4. #4
    Senior Member
    Join Date
    Sep 2003
    Location
    Bath, Somerset, UK
    Posts
    209
    Thanks
    1
    Thanked
    1 time in 1 post
    The main problem is your trying to build gLibC for ARM on Mac OSX (not going to happen, building gLibC on there is a PITA just like it is with mSys on Windows for example).

    The easiest way is to Canadian cross the gLibC part on a Linux box (or Cygwin) and use that with crosstool for the rest of the build.

    What version of gLibC do you need? Just a normal ARM target or thumb enabled setup?

    Out of interest, anything interesting your doing, I have an OSX GCC 4 ARM tool-chain somewhere but there tweaked for the targets I use (ARM920t/940t).
    "John Willis is a toaster that talks! - It knows your name.".

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calling the gurus of linux hackery
    By directhex in forum Software
    Replies: 0
    Last Post: 13-12-2003, 09:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •