Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#47553 closed enhancement (fixed)

compilers portgroup: add option for gcc5

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: eborisch (Eric A. Borisch), cooljeanius (Eric Gallager), mamoll (Mark Moll)
Port: compilers

Description

The compilers portgroup needs to add an option for gcc5, and in the future gcc6.

This points out a defect in the portgroup, in which the gcc_versions variable assumes the first digit of the version number is "4", and similarly that the clang_versions variable assumes the first digit is "3".

Change History (12)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Also, please add clang 3.6.

comment:2 Changed 10 years ago by seanfarley (Sean Farley)

Yep, agreed.

comment:3 Changed 10 years ago by eborisch (Eric A. Borisch)

Cc: eborisch@… added

Cc Me!

comment:4 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 10 years ago by mamoll (Mark Moll)

Cc: mmoll@… added

Cc Me!

comment:6 Changed 10 years ago by eborisch (Eric A. Borisch)

Here's a braindead patch to support this. Any thoughts?

  • compilers-1.0.tcl

     
    7272    set cdb(gcc4$v,f90)      ${prefix}/bin/gfortran-mp-4.$v
    7373}
    7474
     75# build database of gcc {5..6} compiler attributes
     76set gccN_versions {5 6}
     77foreach v ${gccN_versions} {
     78    lappend compilers.gcc_variants gcc$v
     79    set cdb(gcc$v,variant)  gcc$v
     80    set cdb(gcc$v,compiler) macports-gcc-$v
     81    set cdb(gcc$v,descrip)  "MacPorts gcc $v"
     82    set cdb(gcc$v,depends)  port:gcc$v
     83    set cdb(gcc$v,dependsl) path:lib/libgcc/libgcc_s.1.dylib:libgcc
     84    set cdb(gcc$v,dependsd) port:g95
     85    set cdb(gcc$v,dependsa) gcc$v
     86    set cdb(gcc$v,conflict) "gfortran g95"
     87    set cdb(gcc$v,cc)       ${prefix}/bin/gcc-mp-$v
     88    set cdb(gcc$v,cxx)      ${prefix}/bin/g++-mp-$v
     89    set cdb(gcc$v,cpp)      ${prefix}/bin/cpp-mp-$v
     90    set cdb(gcc$v,objc)     ${prefix}/bin/gcc-mp-$v
     91    set cdb(gcc$v,fc)       ${prefix}/bin/gfortran-mp-$v
     92    set cdb(gcc$v,f77)      ${prefix}/bin/gfortran-mp-$v
     93    set cdb(gcc$v,f90)      ${prefix}/bin/gfortran-mp-$v
     94}
     95
    7596set clang_versions {0 1 2 3 4 5}
    7697foreach v ${clang_versions} {
    7798    lappend compilers.clang_variants clang3$v

comment:7 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Can't there be just a single block that deals with all versions of gcc?

comment:8 Changed 10 years ago by seanfarley (Sean Farley)

Thanks for the patch. I will really try to look at this today.

comment:9 in reply to:  7 Changed 10 years ago by seanfarley (Sean Farley)

Replying to ryandesign@…:

Can't there be just a single block that deals with all versions of gcc?

I assume because the logic of converting '49' -> '4.9' is annoying :-) I've made it one block and will push after running some tests.

comment:10 Changed 10 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Pushed as r136118.

comment:11 Changed 10 years ago by mamoll (Mark Moll)

You probably need to make corresponding changes in the openmpi-* ports. For example, port install arrack +gcc5 +openmpi won't work currently. Should I file a separate ticket for that?

comment:12 in reply to:  11 Changed 10 years ago by seanfarley (Sean Farley)

Replying to mmoll@…:

You probably need to make corresponding changes in the openmpi-* ports. For example, port install arrack +gcc5 +openmpi won't work currently. Should I file a separate ticket for that?

I was waiting on #47541 to complete, then I'd copy Eric's work into openmpi :-)

Note: See TracTickets for help on using tickets.