Arm-none-linux-gnueabi-gcc version 2005q3-2 - How to Download and Install on Mac OS X
Friday the 20th of November, 2009

    arm-none-linux-gnueabi-gcc  most recent diff


    version 2005q3-2

      View the most recent changes for the arm-none-linux-gnueabi-gcc port at: arm-none-linux-gnueabi-gcc.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for arm-none-linux-gnueabi-gcc.
      The raw portfile for arm-none-linux-gnueabi-gcc 2005q3-2 is located here:
      http://arm-none-linux-gnueabi-gcc.darwinports.com/dports/cross/arm-none-linux-gnueabi-gcc/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/arm-none-linux-gnueabi-gcc


      The arm-none-linux-gnueabi-gcc Portfile 50984 2009-05-14 21:08:43Z and.damore macports.org $

      PortSystem 1.0
      Name: arm-none-linux-gnueabi-gcc
      Version: 2005q3-2

      # Parameters for this port.
      set gccversion 2005q3
      set scratchboxversion 1.0.5
      set crossgcc-target arm-none-linux-gnueabi
      set default-languages --enable-languages="c,c++,objc"

      Description: gcc 3.x cross-compilers for arm-none-linux-gnueabi.
      Long Description: gnu compilers collection version 3.x (including c++ and objc) for arm-none-linux-gnueabi, Nokia Internet Tablet version from Code Sourcery
      Homepage: http://www.codesourcery.com/gnu_toolchains/arm
      Platform: darwin
      Category: cross devel
      Maintainers: kallisys.net:pguyot
      Master Sites: macports:pguyot
      distfiles gcc-${version}.tar.bz2
      worksrcdir gcc-${gccversion}
      Checksums: gcc-${version}.tar.bz2 md5 8fb231e1d8573b9e14e4d518a1c781a2 sha1 99334733b0e0b2befd7f5eb9c6fac407a71f563e rmd160 8d08aa976a84e9058ae95616c25e2c5a00ac9b4c

      # All cross ports violate the mtree layout.
      destroot.violate_mtree yes

      # Download everything to gcc/
      dist_subdir gcc

      depends_lib bin:${crossgcc-target}-ar:${crossgcc-target}-binutils bin:${crossgcc-target}-as:${crossgcc-target}-binutils bin:${crossgcc-target}-ld:${crossgcc-target}-binutils bin:${crossgcc-target}-nm:${crossgcc-target}-binutils bin:${crossgcc-target}-ranlib:${crossgcc-target}-binutils port:${crossgcc-target}-runtime
      depends_build bin:msgfmt:gettext

      use_bzip2 yes

      # Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform
      # program names as gcc's name (add -${version} with ${version} being the version of gcc).
      # But it won't work because binutils binaries don't have the ${version} suffix, and even if they
      # had, they would actually have the binutils' version suffix (and not gcc's version).
      # So let's tell gcc's Makefile not to do that mistake.

      set environment [list AR_FOR_TARGET=${crossgcc-target}-ar AS_FOR_TARGET=${crossgcc-target}-as LD_FOR_TARGET=${crossgcc-target}-ld NM_FOR_TARGET=${crossgcc-target}-nm RANLIB_FOR_TARGET=${crossgcc-target}-ranlib]

      # Build in a different directory, as advised in the README file.
      pre-configure {
      file mkdir "${workpath}/build"
      }
      configure.dir ${workpath}/build
      configure.cmd ${worksrcpath}/configure
      configure.cc "cc -no-cpp-precomp"
      configure.env ${environment}
      configure.args --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' --target=${crossgcc-target} --program-prefix=${crossgcc-target}- --program-suffix=-${gccversion} --with-included-gettext --with-headers=${prefix}/${crossgcc-target}/usr/include --with-libs=${prefix}/${crossgcc-target}/usr/lib --enable-shared --enable-threads --disable-checking --enable-symvers=gnu --enable-__cxa_atexit --disable-libssp --disable-libstdcxx-pch --with-cpu= --enable-interwork --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/ ${default-languages}

      build.dir ${workpath}/build

      build.args ${environment}
      destroot.args ${environment}

      # Variant to include java tools.
      # I'm not exactly sure what the interest of this variant is except to measure
      # the speed of your Xserve G5 farm. Or your patience if you don't have such
      # a farm.
      Variant: java {
      configure.args-delete ${default-languages}
      }

      patch {
      namespace eval crossgcc {}

      # Fix the info pages and related stuff.
      #
      # path: path to the doc directory (e.g. gas/doc/)
      # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)
      # name: name of the info page (e.g. as)
      # suffix: suffix of the souce page (texinfo or texi)
      proc crossgcc::fixinfo { path makefile name suffix } {
      global crossgcc-target worksrcpath

      # Fix the source
      if { [ file exists ${worksrcpath}/${path}/${name}.${suffix} ] } {
      reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" ${worksrcpath}/${path}/${name}.${suffix}
      reinplace "s|(${name})|(${crossgcc-target}-${name})|g" ${worksrcpath}/${path}/${name}.${suffix}
      reinplace "s| file{${name}}| file{${crossgcc-target}-${name}}|g" ${worksrcpath}/${path}/${name}.${suffix}
      # Rename the source
      file rename ${worksrcpath}/${path}/${name}.${suffix} ${worksrcpath}/${path}/${crossgcc-target}-${name}.${suffix}
      }

      # Fix the Makefile
      reinplace "s| ${name}.info| ${crossgcc-target}-${name}.info|g" ${worksrcpath}/${makefile}
      reinplace "s|/${name}.info|/${crossgcc-target}-${name}.info|g" ${worksrcpath}/${makefile}
      reinplace "s|/${name}.1|/${crossgcc-target}-${name}.1|g" ${worksrcpath}/${makefile}
      reinplace "s|^${name}.info|${crossgcc-target}-${name}.info|g" ${worksrcpath}/${makefile}
      reinplace "s| ${name}.pod| ${crossgcc-target}-${name}.pod|g" ${worksrcpath}/${makefile}
      reinplace "s|/${name}.pod|/${crossgcc-target}-${name}.pod|g" ${worksrcpath}/${makefile}
      reinplace "s|^${name}.pod|${crossgcc-target}-${name}.pod|g" ${worksrcpath}/${makefile}
      reinplace "s| ${name}.${suffix}| ${crossgcc-target}-${name}.${suffix}|g" ${worksrcpath}/${makefile}
      reinplace "s|/${name}.${suffix}|/${crossgcc-target}-${name}.${suffix}|g" ${worksrcpath}/${makefile}
      reinplace "s|^${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" ${worksrcpath}/${makefile}

      # Fix install-info's dir.
      # (note: this may be effectless if there was no info dir to be fixed)
      reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgcc-target}-gcc-dir|g" "${worksrcpath}/${makefile}"
      }

      # Fix the gettext files and related stuff.
      #
      # module: name of the module (e.g. gas)
      proc crossgcc::fixgettext { module } {
      global crossgcc-target worksrcpath

      if { [ file exists "${worksrcpath}/${module}/Makefile.in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/Makefile.in"
      }
      if { [ file exists "${worksrcpath}/${module}/doc/Makefile.in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/doc/Makefile.in"
      }
      if { [ file exists "${worksrcpath}/${module}/po/Make-in" ] } {
      reinplace "s| PACKAGE |${crossgcc-target}- PACKAGE |g" "${worksrcpath}/${module}/po/Make-in"
      }
      }

      # gcc/doc/cpp.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cpp texi

      # gcc/doc/cppinternals.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cppinternals texi

      # gcc/doc/gcc.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gcc texi
      crossgcc::fixinfo gcc/cp/ gcc/cp/Make-lang.in gcc texi
      crossgcc::fixinfo gcc/cp/ gcc/cp/Make-lang.in g++ texi

      # gcc/doc/gccint.texi
      crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccint texi

      # gcc/f/g77.texi
      crossgcc::fixinfo gcc/f/ gcc/f/Make-lang.in g77 texi

      # gcc/java/gcj.texi
      crossgcc::fixinfo gcc/java/ gcc/java/Make-lang.in gcj texi

      # fastjar/fastjar.texi
      crossgcc::fixinfo fastjar/ fastjar/Makefile.in fastjar texi

      # gettext stuff.
      crossgcc::fixgettext gcc
      crossgcc::fixgettext fastjar
      }

      pre-destroot {
      # gcc needs the cross directory structure to be present
      # in order to fill it during installation.
      file mkdir "${destroot}/${prefix}/${crossgcc-target}/bin"
      file mkdir "${destroot}/${prefix}/${crossgcc-target}/lib"
      }

      post-destroot {
      namespace eval crossgcc {}

      # Rename a man page if it exists.
      #
      # section: section of the man page (e.g. 1)
      # manpage: name of the man page (e.g. cpp)
      proc crossgcc::rename_man_page { section manpage } {
      global crossgcc-target destroot prefix

      set manpage_path "${destroot}/${prefix}/share/man/man${section}/${manpage}.${section}"
      if { [ file exists ${manpage_path} ] } {
      file rename ${manpage_path} "${destroot}/${prefix}/share/man/man${section}/${crossgcc-target}-${manpage}.${section}"
      }
      }

      # Stuff I don't want (either because they're in the system
      # or because they would conflict with other FSF ports)
      # (it's easier for maintainability purposes to fix things here)

      # aliases for locales (should be on the system)
      file delete "${destroot}/${prefix}/share/locale/locale.alias"

      # FSF propaganda (should already be there or would conflict)
      file delete -force "${destroot}/${prefix}/share/man/man7"

      # (host) libiberty
      file delete "${destroot}/${prefix}/lib/libiberty.a"

      # aliases for charsets (should already be there)
      file delete "${destroot}/${prefix}/lib/charset.alias"

      # Remove man pages for tools that are not built as part of cross-gcc
      file delete "${destroot}/${prefix}/share/man/man1/rmic.1"
      file delete "${destroot}/${prefix}/share/man/man1/rmiregistry.1"
      file delete "${destroot}/${prefix}/share/man/man1/jv-convert.1"
      file delete "${destroot}/${prefix}/share/man/man1/gij.1"

      # For some reason, some man pages are not prefixed while they should have been
      # (to avoid conflicting).
      crossgcc::rename_man_page 1 cpp
      crossgcc::rename_man_page 1 gcjh
      crossgcc::rename_man_page 1 gcov
      crossgcc::rename_man_page 1 jcf-dump
      crossgcc::rename_man_page 1 jv-scan

      # There is a bug in gcc/Makefile::install-driver
      # For cross compilers, $(GCC_INSTALL_NAME) is equal to
      # $(target_noncanonical)-gcc-$(version)
      # and hence the driver isn't installed.
      xinstall -c "${workpath}/build/gcc/xgcc" "${destroot}/${prefix}/bin/${crossgcc-target}-gcc-${version}"
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/arm-none-linux-gnueabi-gcc
      % sudo port install arm-none-linux-gnueabi-gcc
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching arm-none-linux-gnueabi-gcc
      ---> Verifying checksum for arm-none-linux-gnueabi-gcc
      ---> Extracting arm-none-linux-gnueabi-gcc
      ---> Configuring arm-none-linux-gnueabi-gcc
      ---> Building arm-none-linux-gnueabi-gcc with target all
      ---> Staging arm-none-linux-gnueabi-gcc into destroot
      ---> Installing arm-none-linux-gnueabi-gcc
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using arm-none-linux-gnueabi-gcc with these commands:
      %  man arm-none-linux-gnueabi-gcc
      % apropos arm-none-linux-gnueabi-gcc
      % which arm-none-linux-gnueabi-gcc
      % locate arm-none-linux-gnueabi-gcc

     Where to find more information:

    Darwin Ports



    Lightbox this page.