Gcc43 version 4.3.4 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 4.3.4

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


      # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
      The gcc43 Portfile 57794 2009-09-16 18:09:03Z jmr macports.org $

      PortSystem 1.0

      Name: gcc43
      Version: 4.3.4
      Platform: darwin
      Category: lang
      Maintainers: mww
      license GPLv3
      Description: The GNU compiler collection
      Long Description: The GNU compiler collection, including front ends for C, C++, Objective-C, Objective-C++, Java and Fortran95.

      Homepage: http://gcc.gnu.org/
      Master Sites: ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ gnu:/gcc/gcc-${version}

      set dcore gcc-core-${version}.tar.bz2
      set dfort gcc-fortran-${version}.tar.bz2
      set dcxx gcc-g++-${version}.tar.bz2
      set djava gcc-java-${version}.tar.bz2
      set dobjc gcc-objc-${version}.tar.bz2
      distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}

      Checksums: ${dcore} sha1 5aae071fc542ee17dadfd8f22eaf79611fd175ba ${dfort} sha1 69c8ae8127c14ca0d4f81482b485c67414cbef93 ${dcxx} sha1 95cfa7567837ff56d33d63164d4af947b62004a2 ${djava} sha1 c2417e30a52b148447f6321a079081f8aeb9600d ${dobjc} sha1 5cedffe7a371ed7659e88a5e3e2d2c3195c7e9e3

      use_bzip2 yes

      # gmp and mpfr are not universal
      universal_variant no

      depends_lib port:gmp port:mpfr port:libiconv

      Patch Files: Make-lang.in.diff
      patch.dir ${workpath}/gcc-${version}

      set major 4.3

      worksrcdir build

      post-extract {
      file mkdir ${worksrcpath}
      }

      # the generated compiler doesn't accept -arch
      if {[info exists build_arch] && ${os.platform} == "darwin"} {
      configure.cc_archflags
      configure.cxx_archflags
      configure.objc_archflags
      configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
      }

      configure.cmd ../gcc-${version}/configure
      configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran --libdir=${prefix}/lib/${name} --includedir=${prefix}/include/${name} --infodir=${prefix}/share/info --mandir=${prefix}/share/man --with-local-prefix=${prefix} --with-system-zlib --disable-nls --program-suffix=-mp-${major} --with-gxx-include-dir=${prefix}/include/${name}/c++/ --with-gmp=${prefix} --with-mpfr=${prefix}
      # do NOT use MacPorts binutils -- they do not work
      configure.env-append AR_FOR_TARGET=/usr/bin/ar AS_FOR_TARGET=/usr/bin/as LD_FOR_TARGET=/usr/bin/ld NM_FOR_TARGET=/usr/bin/nm OBJDUMP_FOR_TARGET=/usr/bin/objdump RANLIB_FOR_TARGET=/usr/bin/ranlib STRIP_FOR_TARGET=/usr/bin/strip

      use_parallel_build yes

      destroot.target install install-info-host
      # install-info # errors on objc-info files

      post-destroot {
      # move manuals to gcc43-specific directory
      xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
      xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
      eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7
      eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info
      # install/copy ffitarget.h only if we have it
      if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
      file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
      }
      # install select file for gcc_select
      xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
      xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/
      }

      platform darwin 7 {
      depends_build-append port:gmake
      build.cmd gmake
      # configure.cflags-append -force_cpusubtype_ALL
      # configure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
      # build.args-append XCFLAGS=-force_cpusubtype_ALL
      }

      platform powerpc {
      configure.args-append --disable-multilib
      }

      # Java support does not compile on 10.4/x86
      platform darwin 8 i386 {
      configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran
      configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
      }

      # odcctools currently do not compile for x64 - move to variant for the time being
      #variant odcctools # description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
      # depends_lib-append port:odcctools
      # patch {
      # reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" # ${workpath}/gcc-${version}/gcc/config/darwin.h
      # }
      # configure.args-append --with-as=${prefix}/bin/odas # --with-ld=${prefix}/bin/odld # --with-ar=${prefix}/bin/odar
      #}

      livecheck.type regex
      livecheck.url http://gcc.gnu.org/gcc-4.3/
      livecheck.regex GCC (4\\.3\\.\[0-9\])


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

     Where to find more information:

    Darwin Ports



    Lightbox this page.