New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 81280


Ignore:
Timestamp:
07/28/11 14:50:17 (4 years ago)
Author:
takeshi@…
Message:

chapel: modified to ensure UsingTheRightCompiler, to respect build_arch and support +universal. closing #30376

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/chapel/Portfile

    r81041 r81280  
    66name                chapel 
    77version             1.3.0  
     8revision            1 
    89categories          lang parallel science 
    910platforms           darwin 
    10 maintainers         takeshi 
     11maintainers         takeshi openmaintainer 
    1112description         parallel programming language 
    1213long_description \ 
     
    2324 
    2425worksrcdir          ${distname}/${name} 
     26 
    2527use_configure       no 
    2628use_parallel_build  no 
     29 
     30# chapel builds with llvm-gcc by removing -use-gold-plugin 
     31# in ${worksrcpath}/make/compiler/Makefile.llvm-gcc and 
     32# chpl can be made to work by setting CHPL_TARGET_COMPILER 
     33# but gives warnings on linking different triples. 
     34# 
     35# chapel does not build with clang. 
     36if {![string match *-gcc-* ${configure.compiler}]} { 
     37    pre-configure { 
     38        ui_error "${name} requires configure.compiler=*-gcc-*." 
     39        return -code error 
     40    } 
     41} 
     42configure.compiler  gcc-4.2 
     43 
     44configure.optflags  -O3 
     45if {[variant_isset universal]} { 
     46    set archflags "${configure.universal_ldflags}" 
     47} else { 
     48    set archflags "${configure.cc_archflags}" 
     49} 
     50build.env           CHPL_HOST_COMPILER=gnu \ 
     51                    CHPL_TARGET_COMPILER=gnu \ 
     52                    LDFLAGS="${archflags}" 
     53post-configure { 
     54    reinplace "s|CXX = g++|CXX = ${configure.cxx}|" ${worksrcpath}/make/compiler/Makefile.gnu 
     55    reinplace "s|CC = gcc|CC = ${configure.cc}|" ${worksrcpath}/make/compiler/Makefile.gnu 
     56    reinplace "s|-O3|${configure.optflags} ${archflags}|" ${worksrcpath}/make/compiler/Makefile.gnu 
     57    reinplace "s|\$(ARCH)|${archflags}|g" ${worksrcpath}/make/compiler/Makefile.gnu 
     58} 
    2759 
    2860destroot { 
     
    3567} 
    3668 
     69variant universal {} 
     70 
    3771notes \ 
    3872    " set CHPL_HOME to ${prefix}/lib/${name}\n\ 
Note: See TracChangeset for help on using the changeset viewer.