All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mbedtls: use pre-configure, not post-patch, hooks to configure
@ 2022-08-28 19:54 Yann E. MORIN
  2022-09-18 10:20 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2022-08-28 19:54 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E. MORIN, Fabrice Fontaine

Currently, we use post-patch hooks to apply our configuration settings.
This works, but this is semantically wrong; post-patch hooks are there
to amend the source code to actually fix it (i.e. because it can't be
done with a patch for example).

Configuring the package, on the other hand, belong to the configure
step, and if we need to tweak the source code for configuration
purposes, this should be done in pre-configure hooks.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mbedtls/mbedtls.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/mbedtls/mbedtls.mk b/package/mbedtls/mbedtls.mk
index 1a888e8c67..49ea7886f6 100644
--- a/package/mbedtls/mbedtls.mk
+++ b/package/mbedtls/mbedtls.mk
@@ -25,7 +25,7 @@ define MBEDTLS_ENABLE_THREADING
 	$(SED) "s://#define MBEDTLS_THREADING_PTHREAD:#define MBEDTLS_THREADING_PTHREAD:" \
 		$(@D)/include/mbedtls/config.h
 endef
-MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_THREADING
+MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_THREADING
 ifeq ($(BR2_STATIC_LIBS),y)
 MBEDTLS_CONF_OPTS += -DLINK_WITH_PTHREAD=ON
 endif
@@ -49,7 +49,7 @@ define MBEDTLS_ENABLE_ZLIB
 	$(SED) "s://#define MBEDTLS_ZLIB_SUPPORT:#define MBEDTLS_ZLIB_SUPPORT:" \
 		$(@D)/include/mbedtls/config.h
 endef
-MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_ZLIB
+MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_ZLIB
 else
 MBEDTLS_CONF_OPTS += -DENABLE_ZLIB_SUPPORT=OFF
 endif
@@ -77,7 +77,7 @@ define MBEDTLS_ENABLE_DTLS_SRTP
 	$(SED) "s://#define MBEDTLS_SSL_DTLS_SRTP:#define MBEDTLS_SSL_DTLS_SRTP:" \
 		$(@D)/include/mbedtls/config.h
 endef
-MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_DTLS_SRTP
+MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_DTLS_SRTP
 endif
 
 $(eval $(cmake-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/mbedtls: use pre-configure, not post-patch, hooks to configure
  2022-08-28 19:54 [Buildroot] [PATCH] package/mbedtls: use pre-configure, not post-patch, hooks to configure Yann E. MORIN
@ 2022-09-18 10:20 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2022-09-18 10:20 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Fabrice Fontaine, buildroot

On Sun, 28 Aug 2022 21:54:45 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Currently, we use post-patch hooks to apply our configuration settings.
> This works, but this is semantically wrong; post-patch hooks are there
> to amend the source code to actually fix it (i.e. because it can't be
> done with a patch for example).
> 
> Configuring the package, on the other hand, belong to the configure
> step, and if we need to tweak the source code for configuration
> purposes, this should be done in pre-configure hooks.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/mbedtls/mbedtls.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-09-18 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28 19:54 [Buildroot] [PATCH] package/mbedtls: use pre-configure, not post-patch, hooks to configure Yann E. MORIN
2022-09-18 10:20 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.