libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] macOS, gnu gcc, -no-cpp-precomp


From: Chris Guiney
Subject: [libmicrohttpd] macOS, gnu gcc, -no-cpp-precomp
Date: Tue, 21 Jun 2022 05:06:50 +0000

I've been being vexed by the configure script using -no-cpp-precomp as a CFLAG if the host is found to be macOS


This flag has been removed from gcc, and according to the maintainers, hasn't been needed for many years


I'm hoping that I can either persuade a maintainer to remove it, or provide instruction on how I might remove it -- I've never had to contribute to a GNU project, or contribute to a autoconf/automake build.

I find that if I do remove it, and run autoreconf, it's able to configure and compile cleanly.


It manifests as an error indicating that it can't find a suitable threading library:

CC=/opt/homebrew/bin/gcc-11 ./configure --prefix=/usr/local
... many lines of configure output ...
checking for pthread-config... no
checking for threading lib to use with libmicrohttpd (auto)... configure: error: No threading lib is available. Consider installing pthreads


but after viewing the config.log, one can find:
configure:21066: checking for target host OS
configure:21075: result: Darwin
configure:22010: checking whether /opt/homebrew/bin/gcc-11 is Clang
configure:22037: result: no
configure:22102: checking whether pthreads work with "-pthread" and "-lpthread"
configure:22213: /opt/homebrew/bin/gcc-11 -o conftest -no-cpp-precomp -fno-common -g -O2 -pthread   conftest.c -lpthread  >&5
gcc-11: error: unrecognized command-line option '-no-cpp-precomp'


For posterity, the output of gcc --version:
/opt/homebrew/bin/gcc-11 --version        
gcc-11 (Homebrew GCC 11.3.0_2) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I should also note that it does build with clang -- I'm intentionally trying to use gcc

Any help is appreciated,
Chris


reply via email to

[Prev in Thread] Current Thread [Next in Thread]