Mips-rtems-binutils version 2.18 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    mips-rtems-binutils  most recent diff


    version 2.18

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


      The mips-rtems-binutils Portfile 57375 2009-09-10 08:16:41Z ryandesign macports.org $

      PortSystem 1.0

      Name: mips-rtems-binutils
      Version: 2.18

      # Parameters for this port.
      set crossgcc-target mips-rtems
      set rtemsversion 4.9

      Description: FSF Binutils for mips-rtems cross development
      Long Description: Free Software Foundation development toolchain ("binutils") for mips-rtems cross development (MIPS ISA Levels 1 and above for 32 and 64 bit CPU models)
      Platform: darwin
      Category: cross devel
      Maintainers: kallisys.net:pguyot openmaintainer
      Homepage: http://www.gnu.org/software/binutils/binutils.html
      Master Sites: gnu:binutils:binutils http://www.rtems.com/ftp/pub/rtems/SOURCES/${rtemsversion}/:rtems ftp://ftp.rtems.com/pub/rtems/SOURCES/${rtemsversion}/:rtems macports:pguyot:rtems
      distname binutils-${version}
      distfiles binutils-${version}.tar.bz2:binutils
      use_bzip2 yes
      Checksums: md5 e26e2e06b6e4bf3acf1dc8688a94c0d1 sha1 a557686eef68362ea31a3aa41ce274e3eeae1ef0 rmd160 3995d7ed97f115e76ce55b4c1f5256d53559c84f
      Checksums: binutils-${version}.tar.bz2 md5 9d22ee4dafa3a194457caf4706f9cf01 sha1 fdec92e9dfc6c32155869f3910f47041c78e2277 rmd160 78d07475667c55ecbf9068dbb90362a3445b2a99 binutils-${version}-rtems${rtemsversion}-20080211.diff md5 5417bb3ff14da49c87c05a881a405166 sha1 ddc5236c3c627596df2426b78c770ae958fbb4c7 rmd160 73c6a64b322fcd35ff13a0254b416dce19428c8b
      Patch Files: binutils-${version}-rtems${rtemsversion}-20080211.diff:rtems
      patch.pre_args -p1

      depends_lib port:gettext

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

      # Download everything to binutils/
      dist_subdir binutils

      # Build in a different directory, as advised in the README file.
      pre-configure { system "cd ${workpath} && mkdir -p build"}
      configure.dir ${workpath}/build
      configure.cmd ${worksrcpath}/configure
      configure.cc "cc -no-cpp-precomp"
      configure.args --infodir='${prefix}/share/info' --target=${crossgcc-target} --program-prefix=${crossgcc-target}- --mandir='${prefix}/share/man'
      build.dir ${workpath}/build

      # We don't want the etc module.
      post-extract {
      system "rm -rf ${worksrcpath}/etc"
      }

      post-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
      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}

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

      # Rename the source
      file rename ${worksrcpath}/${path}/${name}.${suffix} ${worksrcpath}/${path}/${crossgcc-target}-${name}.${suffix}

      # 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}-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"
      }
      }

      # gas/doc/as.texinfo
      crossgcc::fixinfo gas/doc/ gas/doc/Makefile.in as texinfo

      # bfd/doc/bfd.texinfo
      crossgcc::fixinfo bfd/doc/ bfd/doc/Makefile.in bfd texinfo

      # binutils/doc/binutils.texi
      crossgcc::fixinfo binutils/doc/ binutils/doc/Makefile.in binutils texi

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

      # ld/ld.texinfo
      crossgcc::fixinfo ld/ ld/Makefile.in ld texinfo

      # gettext stuff.
      crossgcc::fixgettext bfd
      crossgcc::fixgettext binutils
      crossgcc::fixgettext gas
      crossgcc::fixgettext gprof
      crossgcc::fixgettext ld
      crossgcc::fixgettext opcodes
      }

      post-destroot {
      # Installing (host) libiberty was a mistake.
      file delete "${destroot}/${prefix}/lib/libiberty.a"
      }

      livecheck.type freshmeat
      livecheck.name binutils

    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/mips-rtems-binutils
      % sudo port install mips-rtems-binutils
      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 mips-rtems-binutils
      ---> Verifying checksum for mips-rtems-binutils
      ---> Extracting mips-rtems-binutils
      ---> Configuring mips-rtems-binutils
      ---> Building mips-rtems-binutils with target all
      ---> Staging mips-rtems-binutils into destroot
      ---> Installing mips-rtems-binutils
    - 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 mips-rtems-binutils with these commands:
      %  man mips-rtems-binutils
      % apropos mips-rtems-binutils
      % which mips-rtems-binutils
      % locate mips-rtems-binutils

     Where to find more information:

    Darwin Ports



    Lightbox this page.