pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: boost-libs on macOS Ventura (13.x)



On 5/22/23 11:16, Jason Bacon wrote:
On 5/22/23 06:42, Greg Troxel wrote:
Jason Bacon <jtocino%gmx.com@localhost> writes:

On 5/21/23 17:41, Joerg Sonnenberger wrote:
On Sat, May 20, 2023 at 07:29:19AM -0500, Jason Bacon wrote:
Since it's not showing in the make output, I wonder if the pkgsrc wrapper is
inserting it.

It is.

Joerg

Maybe the wrapper should check the filename extension before doing that,
and leave it (-std=*++*) out for ".c" files.

That sounds like a kludge.  The pkgsrc doctrine is that invoking a C++
compiler for building a C file is a bug.  Can you fix the makefile(heh)
to have it call CC instead of CXX?

I certainly could, but I suspect upstream will argue that

clang++ -x c file.c

is perfectly valid, and we'll have to keep the patch around
indefinitely.  Even if they agree to change it, this may pop up in other
packages, and someone will have to spend time solving this problem again.

Question is what's more of a burden, dealing with patches like this one,
or another if check in the wrapper code?


Here's the boost-libs patch if we want to go that route, but again, I think a wrappers tweak is a more permanent solution.

$NetBSD$

# -x c is incompatible with --std=c++14, inserted by clang++ wrapper

--- tools/build/src/tools/clang-darwin.jam.orig 2023-05-22 16:20:45.402463121 +0000
+++ tools/build/src/tools/clang-darwin.jam
@@ -116,7 +116,7 @@ rule compile.c++ ( targets * : sources *

 actions compile.c bind PCH_FILE
 {
- "$(CONFIG_COMMAND)" -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" $(.include-pch)"$(PCH_FILE)" -c -o "$(<)" "$(>)" + "$(CONFIG_COMMAND)" $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" $(.include-pch)"$(PCH_FILE)" -c -o "$(<)" "$(>)"
 }

 actions compile.c++ bind PCH_FILE



Home | Main Index | Thread Index | Old Index