Index | Thread | Search

From:
"John Ericson" <git@JohnEricson.me>
Subject:
Re: [PATCH] makefiles: Introduce `NOLIBSHARED`
To:
"Miod Vallat" <miod@online.fr>
Cc:
tech@openbsd.org
Date:
Sat, 29 Jun 2024 17:50:11 -0400

Download raw body.

Thread
On Sat, Jun 29, 2024, at 5:07 PM, Miod Vallat wrote:
> > 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?

Producing statically-linked position executables, and only those.

> 
> > 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.

Oh oops, that indeed does not. I will submit a new revision