Changeset 80265


Ignore:
Timestamp:
Jul 8, 2011, 6:54:53 AM (9 years ago)
Author:
jeremyhu@…
Message:

apple-gcc42: Use our preferred compiler to build our stage1 compiler

Location:
trunk/dports/lang/apple-gcc42
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/apple-gcc42/Portfile

    r80247 r80265  
    3636# prefix.patch             : Fix hardcoded instances of /usr
    3737# suffix.patch             : Make binaries end in -apple-4.2
     38# stage1-cc.patch          : Use $CC for our stage1 compiler
    3839# makeinfo.patch           : Fix version detection for makeinfo in configure scripts
    3940# werror-*.patch           : Fix compilation errors when building for x86_64
     
    4445        suffix.patch \
    4546        makeinfo.patch \
     47        stage1-cc.patch \
    4648        werror-c-incpath.patch \
    4749        werror-local-alloc.patch
     
    5355        # arch returns i386 even when we want x86_64
    5456        reinplace "/^BUILD=/ s:arch:echo ${build_arch}:" ${worksrcpath}/build_gcc
    55 
    56         # Use our CC
    57         # TODO: This seems insufficient as "gcc" is still being used
    58         reinplace "/^unset CC/ s:^:#:" ${worksrcpath}/build_gcc
    5957
    6058        # ppc not tested, but it should hopefully work...
     
    6866                reinplace "/^PPC_SYSROOT=/ s:=.*$:=${developer_dir}/SDKs/MacOSX10.3.9.sdk:" ${worksrcpath}/build_gcc
    6967        }
     68
     69        # Disable -Werror for our bootstrap gcc
     70        if {${configure.compiler} == "clang" ||
     71            ${configure.compiler} == "macports-clang"} {
     72                reinplace "s:--enable-werror : :" ${worksrcpath}/build_gcc
     73        }
    7074}
    7175
    7276# TODO: Use MacPorts dependencies
    7377build.env \
    74         CC="${configure.cc}" \
    75         LIBRARY_PATH="/usr/lib" \
    76         CPATH="/usr/include" \
     78        LIBRARY_PATH="/usr/lib" \
     79        CPATH="/usr/include" \
    7780        PATH="/bin:/usr/bin:/sbin:/usr/sbin"
    7881
     
    8083
    8184build.args-append \
     85        CC="${configure.cc} -std=gnu89" \
    8286        PREFIX="${prefix}" \
    8387        SRCROOT="${srcroot}" \
Note: See TracChangeset for help on using the changeset viewer.