mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] fio: select ZLIB
@ 2021-05-04 20:35 Lucas Stach
  2021-05-21  7:28 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas Stach @ 2021-05-04 20:35 UTC (permalink / raw)
  To: ptxdist

fio uses zlib when it is found, make the dependency explicit to
get stable build results.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 rules/fio.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/fio.in b/rules/fio.in
index 66d37d273ab9..c1d0c6ce2440 100644
--- a/rules/fio.in
+++ b/rules/fio.in
@@ -3,5 +3,6 @@
 config FIO
 	tristate
 	prompt "fio"
+	select ZLIB
 	help
 	  Flexible I/O tester
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] fio: select ZLIB
  2021-05-04 20:35 [ptxdist] [PATCH] fio: select ZLIB Lucas Stach
@ 2021-05-21  7:28 ` Michael Olbrich
  2021-05-21  7:28   ` [ptxdist] [PATCH 1/2] wrapper: add package variable to blacklist compiler flags Michael Olbrich
  2021-05-21  7:28   ` [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2021-05-21  7:28 UTC (permalink / raw)
  To: ptxdist, Lucas Stach; +Cc: Michael Olbrich

Hi,

On Tue, May 04, 2021 at 10:35:06PM +0200, Lucas Stach wrote:
> fio uses zlib when it is found, make the dependency explicit to
> get stable build results.
>·
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

So I tested this and immediately found another dependency like that to
libaio :-/. Probably uncovered by the changing build order.

So I think I'll make it possible to prevent the dependency with something
like this.

Michael

Michael Olbrich (2):
  wrapper: add package variable to blacklist compiler flags
  fio: don't try to use zlib or aio

 doc/ref_make_variables.rst             | 8 ++++++++
 rules/fio.make                         | 4 ++++
 rules/post/ptxd_make_world_common.make | 1 +
 scripts/wrapper/libwrapper.sh          | 6 ++++++
 4 files changed, 19 insertions(+)

-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 1/2] wrapper: add package variable to blacklist compiler flags
  2021-05-21  7:28 ` Michael Olbrich
@ 2021-05-21  7:28   ` Michael Olbrich
  2021-05-21  7:28   ` [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2021-05-21  7:28 UTC (permalink / raw)
  To: ptxdist, Lucas Stach; +Cc: Michael Olbrich

Another option to prevent unwanted implicit dependencies.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 doc/ref_make_variables.rst             | 8 ++++++++
 rules/post/ptxd_make_world_common.make | 1 +
 scripts/wrapper/libwrapper.sh          | 6 ++++++
 3 files changed, 15 insertions(+)

diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
index b770b1b49f18..674acdcea982 100644
--- a/doc/ref_make_variables.rst
+++ b/doc/ref_make_variables.rst
@@ -308,6 +308,14 @@ Build Environment for all Stages
   flags. Adding them via environment variables or ``make`` arguments can
   have unexpected side effects, such as as overwriting existing defaults.
 
+``<PKG>_FLAGS_BLACKLIST``
+  A list of arbitrary flags. If any one of these flags is found as an
+  argument to the compiler, preprocessor or linker then the call will fail.
+  This is useful to prevent implicit dependencies: Many packages try to
+  link to libraries at configure time and use them if it works. Adding
+  '-l<lib>' to the blacklist makes it possible to prevent such a detection
+  and explicitly avoid the dependency.
+
 ``<PKG>_WRAPPER_BLACKLIST``
   PTXdist has several options in the platformconfig that inject options in
   the compiler command line. This is used, for example, to add hardening
diff --git a/rules/post/ptxd_make_world_common.make b/rules/post/ptxd_make_world_common.make
index 172f4c3296af..e5cf50214e9c 100644
--- a/rules/post/ptxd_make_world_common.make
+++ b/rules/post/ptxd_make_world_common.make
@@ -94,6 +94,7 @@ world/env/impl = \
 	pkg_build_dir="$(call ptx/escape,$($(1)_BUILD_DIR))"			\
 										\
 	pkg_wrapper_blacklist="$(call ptx/escape,$($(1)_WRAPPER_BLACKLIST))"	\
+	pkg_flags_blacklist="$(call ptx/escape,$($(1)_FLAGS_BLACKLIST))"	\
 										\
 	pkg_cppflags="$(call ptx/escape,$($(1)_CPPFLAGS))"			\
 	pkg_cflags="$(call ptx/escape,$($(1)_CFLAGS))"				\
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index 0a970638a859..a7cdbeac05dd 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -103,6 +103,12 @@ cc_check_args() {
 				COMPILING=true
 				;;
 		esac
+		case " ${pkg_flags_blacklist} " in
+			*" ${ARG} "*)
+				echo "wrapper: found blacklisted flag '${ARG}'" >&2
+				exit 1
+				;;
+		esac
 	done
 	# Used e.g. by the kernel to get the compiler version. Adding
 	# linker options confuses gcc because there is nothing to link.
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio
  2021-05-21  7:28 ` Michael Olbrich
  2021-05-21  7:28   ` [ptxdist] [PATCH 1/2] wrapper: add package variable to blacklist compiler flags Michael Olbrich
@ 2021-05-21  7:28   ` Michael Olbrich
  2021-05-21  8:19     ` Lucas Stach
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2021-05-21  7:28 UTC (permalink / raw)
  To: ptxdist, Lucas Stach; +Cc: Michael Olbrich

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 rules/fio.make | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rules/fio.make b/rules/fio.make
index b52555e291e2..6c40524f1f28 100644
--- a/rules/fio.make
+++ b/rules/fio.make
@@ -46,6 +46,10 @@ FIO_CONF_OPT	:= \
 	--disable-libzbc \
 	--disable-tcmalloc \
 
+FIO__FLAGS_BLACKLIST := \
+	-lz \
+	-laio
+
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio
  2021-05-21  7:28   ` [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio Michael Olbrich
@ 2021-05-21  8:19     ` Lucas Stach
  2021-05-21 10:47       ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas Stach @ 2021-05-21  8:19 UTC (permalink / raw)
  To: Michael Olbrich, ptxdist

Am Freitag, dem 21.05.2021 um 09:28 +0200 schrieb Michael Olbrich:
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
>  rules/fio.make | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/rules/fio.make b/rules/fio.make
> index b52555e291e2..6c40524f1f28 100644
> --- a/rules/fio.make
> +++ b/rules/fio.make
> @@ -46,6 +46,10 @@ FIO_CONF_OPT	:= \
>  	--disable-libzbc \
>  	--disable-tcmalloc \
>  
> +FIO__FLAGS_BLACKLIST := \

This shouldn't be a double underscore, right?

> +	-lz \
> +	-laio
> +
>  # ----------------------------------------------------------------------------
>  # Target-Install
>  # ----------------------------------------------------------------------------



_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio
  2021-05-21  8:19     ` Lucas Stach
@ 2021-05-21 10:47       ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2021-05-21 10:47 UTC (permalink / raw)
  To: Lucas Stach; +Cc: ptxdist

On Fri, May 21, 2021 at 10:19:53AM +0200, Lucas Stach wrote:
> Am Freitag, dem 21.05.2021 um 09:28 +0200 schrieb Michael Olbrich:
> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> > ---
> >  rules/fio.make | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/rules/fio.make b/rules/fio.make
> > index b52555e291e2..6c40524f1f28 100644
> > --- a/rules/fio.make
> > +++ b/rules/fio.make
> > @@ -46,6 +46,10 @@ FIO_CONF_OPT	:= \
> >  	--disable-libzbc \
> >  	--disable-tcmalloc \
> >  
> > +FIO__FLAGS_BLACKLIST := \
> 
> This shouldn't be a double underscore, right?

Yes, of course. Fixed.

Michael

> > +	-lz \
> > +	-laio
> > +
> >  # ----------------------------------------------------------------------------
> >  # Target-Install
> >  # ----------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-21 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 20:35 [ptxdist] [PATCH] fio: select ZLIB Lucas Stach
2021-05-21  7:28 ` Michael Olbrich
2021-05-21  7:28   ` [ptxdist] [PATCH 1/2] wrapper: add package variable to blacklist compiler flags Michael Olbrich
2021-05-21  7:28   ` [ptxdist] [PATCH 2/2] fio: don't try to use zlib or aio Michael Olbrich
2021-05-21  8:19     ` Lucas Stach
2021-05-21 10:47       ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox