|
Message-ID: <20241129122902.pbtifxnc6quivf3g@devuan>
Date: Fri, 29 Nov 2024 13:29:02 +0100
From: Alejandro Colomar <alx@...nel.org>
To: Jeffrey Walton <noloader@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: sgetspent(3) on musl
Hi Jeffrey,
On Fri, Nov 29, 2024 at 01:35:06AM -0500, Jeffrey Walton wrote:
> On Fri, Nov 29, 2024 at 1:12 AM Rich Felker <dalias@...c.org> wrote:
> >
> > [...]
> > FWIW though I don't generally expect spurious declarations like this
> > to do any harm -- detection should be via a compile-and-link test not
> > just looking for a declaration. Is there a build system these days
> > that's doing purely declaration-based detection?
>
> I don't know about build systems, but I generally avoid build systems
> for my projects. I would not wish Autotools on an enemy.
+1
> Instead I use a non-anemic make, like GNU Make.
I agree, and use only GNU Make for my own software projects.
<https://git.kernel.org/pub/scm/libs/liba2i/liba2i.git/tree/GNUmakefile>
<https://git.kernel.org/pub/scm/libs/liba2i/liba2i.git/tree/share/mk>
Here's an example of feature testing in my makefiles:
CC_HAS_FFAT_LTO_OBJECTS := \
$(shell \
$(CC) -Werror -ffat-lto-objects -S -x c -o /dev/null /dev/null $(HIDE_ERR) \
&& $(ECHO) yes \
|| $(ECHO) no; \
)
<https://git.kernel.org/pub/scm/libs/liba2i/liba2i.git/tree/share/mk/configure/build-depends/gcc/cc.mk#n30>
> GNU Make is all that
> is needed to test header files for #defines.
Yep. However, when testing for a libc function, I think I would most
likely run CC without flags asking to only compile but not assemble or
link. I would just do the full compilation, and see if it works.
Although, I can consider that if some make(1)-based build system wants
to save a small amount of time, it might cut on these.
>
> Jeff
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es/>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.