Index | Thread | Search

From:
Miod Vallat <miod@online.fr>
Subject:
Re: [PATCH] makefiles: Introduce `NOLIBSHARED`
To:
John Ericson <git@johnericson.me>
Cc:
tech@openbsd.org
Date:
Sat, 29 Jun 2024 21:07:51 +0000

Download raw body.

Thread
> This forces the build system to only produce static archives. This is
> intended to be the counterpart of the (already existing) `NOLIBSTATIC`,
> which does the opposite.
> 
> N.B. There is already a `NOPIC` which also disables shared objects, but
> in addition furthermore turns of position-independent-code. Now, `NOPIC`
> implies `NOLIBSHARED` instead, and only directly concerns itself with
> disabling position-independent-code.

What would be a use case for NOLIBSHARED that NOPIC does not cover?

> diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
> index acde59a95c1..d267c78099c 100644
> --- a/share/mk/bsd.own.mk
> +++ b/share/mk/bsd.own.mk
> @@ -68,6 +68,10 @@ BUILD_LLDB?=no
>  STATICPIE?=-pie
>  .endif
>  
> +.ifdef defined(NOPIC)

I don't think this line does what you intend it to do.