[MacPorts] #70789: legacysupport PG trips up GCC C compiler with -nostdinc++

MacPorts noreply at macports.org
Wed Sep 18 22:31:54 UTC 2024


#70789: legacysupport PG trips up GCC C compiler with -nostdinc++
--------------------+---------------------------
 Reporter:  RJVB    |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  legacysupport
--------------------+---------------------------
 Trying to build `port:vte` with macports-gcc-12, I get:

 {{{
 meson.build:142:0: ERROR: Assert failed: option -std=gnu11 not supported
 by gcc

 A full log can be found at ${build.dir}/meson-logs/meson-log.txt
 }}}

 and that log file shows that the C compiler is invoked (to determine if it
 supports the gnu11 C dialect) with `-nostdinc++`.

 That argument is inserted by the legacysupport-1.1 PG into the CPPFLAGS
 when `use_mp_libcxx` is set. That is an anomaly which happens to be
 tolerated by the clang C compiler but not by GCC, which rightfully points
 out that the argument is valid only for C++ and ObjC++.

 Adding an additional `ls_cache_cxxflags` variable to the PG which inserts
 into `configure.cxxflags` fixes the issue.

-- 
Ticket URL: <https://trac.macports.org/ticket/70789>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list