Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56605 closed defect (fixed)

wrong detection of g++ compiler in portconfigure.tcl

Reported by: devernay (Frédéric Devernay) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone: MacPorts 2.5.2
Component: base Version: 2.5.1
Keywords: Cc: devernay (Frédéric Devernay)
Port:

Description

At two places in portconfigure.tcl, MacPorts uses string match *g++-mp-* to determine if GCC is being used as a C++ compiler, but this expression also matches *clang++-mp-* !

The consequence is that the global setting of cxx_stdlib in macports.conf is ignored when using a clang++ compiler.

This totally breaks when ompiling macports with libc++ on older systems.

I fixed it by adding a slash, like this, though I don't know if it's a good fix: string match */g++-mp-*

MacPorts 2.5.2 should be released to fix this.

Change History (5)

comment:1 Changed 6 years ago by devernay (Frédéric Devernay)

Cc: devernay added
Component: portsbase
Version: 2.5.1

comment:2 Changed 6 years ago by kencu (Ken)

Thank you Fred for helping me sort out why my ports now seem to be building against macports-libstdc++ instead of libc++ on 10.6.8 / libc++

comment:3 Changed 6 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.5.2

comment:4 Changed 6 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 3e430f195647b0f34004eca6fb96dbf8028717a9/macports-base (master):

Fix matching of configure.cxx

Fixes: #56605

comment:5 Changed 6 years ago by jmroot (Joshua Root)

In 0eac98bae29e90d4dac39831ad6d34eb1829b63a/macports-base (release-2.5):

Fix matching of configure.cxx

Fixes: #56605
(cherry picked from commit 3e430f195647b0f34004eca6fb96dbf8028717a9)

Note: See TracTickets for help on using tickets.