diff mbox

[1/2] openssl: support building the binary without MMU

Message ID 1434711274-49716-1-git-send-email-benoit@wsystem.com
State Accepted
Headers show

Commit Message

Benoît Thébaudeau June 19, 2015, 10:54 a.m. UTC
The commit 720893b62510438237b9923d744dd079ddb4f67d "openssl: disable
apps for NOMMU" prevented the openssl binary from being built without
MMU in order to fix a build failure without fork(). However, openssl is
designed to support the lack of fork() with -DHAVE_FORK=0, so allow the
openssl binary to be enabled without MMU thanks to this option.

Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
---
 package/openssl/Config.in  | 3 ---
 package/openssl/openssl.mk | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni June 21, 2015, 4:45 a.m. UTC | #1
Dear Benoît Thébaudeau,

On Fri, 19 Jun 2015 12:54:33 +0200, Benoît Thébaudeau wrote:
> The commit 720893b62510438237b9923d744dd079ddb4f67d "openssl: disable
> apps for NOMMU" prevented the openssl binary from being built without
> MMU in order to fix a build failure without fork(). However, openssl is
> designed to support the lack of fork() with -DHAVE_FORK=0, so allow the
> openssl binary to be enabled without MMU thanks to this option.
> 
> Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>

Hum. But then it means that we have propagated the MMU dependency to
all reverse dependencies of openssl (i.e packages that depend on
openssl), but they may no longer need this dependency anymore.

There is a fairly huge list of packages that "select
BR2_PACKAGE_OPENSSL". How can we find out which ones will now build
fine without MMU support ?

By the way, do you have a specific need for openssl on no-MMU
platforms? If so, on which platform? We don't have many no-MMU users,
so it's good when they speak up :-)

Thanks,

Thomas
Arnout Vandecappelle June 21, 2015, 12:34 p.m. UTC | #2
On 06/21/15 06:45, Thomas Petazzoni wrote:
> Dear Benoît Thébaudeau,
> 
> On Fri, 19 Jun 2015 12:54:33 +0200, Benoît Thébaudeau wrote:
>> The commit 720893b62510438237b9923d744dd079ddb4f67d "openssl: disable
>> apps for NOMMU" prevented the openssl binary from being built without
>> MMU in order to fix a build failure without fork(). However, openssl is
>> designed to support the lack of fork() with -DHAVE_FORK=0, so allow the
>> openssl binary to be enabled without MMU thanks to this option.
>>
>> Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
> 
> Hum. But then it means that we have propagated the MMU dependency to
> all reverse dependencies of openssl (i.e packages that depend on
> openssl), but they may no longer need this dependency anymore.

 This is only about BR2_PACKAGE_OPENSSL_BIN, which is not selected by any package.


 Regards,
 Arnout

> 
> There is a fairly huge list of packages that "select
> BR2_PACKAGE_OPENSSL". How can we find out which ones will now build
> fine without MMU support ?
> 
> By the way, do you have a specific need for openssl on no-MMU
> platforms? If so, on which platform? We don't have many no-MMU users,
> so it's good when they speak up :-)
> 
> Thanks,
> 
> Thomas
>
Benoît Thébaudeau June 21, 2015, 2:07 p.m. UTC | #3
Dear Arnout Vandecappelle, Thomas Petazzoni,

On Sun, Jun 21, 2015 at 2:34 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 06/21/15 06:45, Thomas Petazzoni wrote:
>> Dear Benoît Thébaudeau,
>>
>> On Fri, 19 Jun 2015 12:54:33 +0200, Benoît Thébaudeau wrote:
>>> The commit 720893b62510438237b9923d744dd079ddb4f67d "openssl: disable
>>> apps for NOMMU" prevented the openssl binary from being built without
>>> MMU in order to fix a build failure without fork(). However, openssl is
>>> designed to support the lack of fork() with -DHAVE_FORK=0, so allow the
>>> openssl binary to be enabled without MMU thanks to this option.
>>>
>>> Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
>>
>> Hum. But then it means that we have propagated the MMU dependency to
>> all reverse dependencies of openssl (i.e packages that depend on
>> openssl), but they may no longer need this dependency anymore.
>
>  This is only about BR2_PACKAGE_OPENSSL_BIN, which is not selected by any package.

It's indeed only about the binary, not about the library.

>> There is a fairly huge list of packages that "select
>> BR2_PACKAGE_OPENSSL". How can we find out which ones will now build
>> fine without MMU support ?
>>
>> By the way, do you have a specific need for openssl on no-MMU
>> platforms? If so, on which platform? We don't have many no-MMU users,
>> so it's good when they speak up :-)

Actually, no. To make the full story short, I was comparing Buildroot
2011.08 to the current master, and I noticed that openssl.cnf and some
other files had disappeared in the built target files (see 2/2), and
the investigation led me to the commit
720893b62510438237b9923d744dd079ddb4f67d, which led to 1/2 here.

Best regards,
Benoît
Thomas Petazzoni June 30, 2015, 2:44 p.m. UTC | #4
Arnout,

On Sun, 21 Jun 2015 14:34:51 +0200, Arnout Vandecappelle wrote:

> > Hum. But then it means that we have propagated the MMU dependency to
> > all reverse dependencies of openssl (i.e packages that depend on
> > openssl), but they may no longer need this dependency anymore.
> 
>  This is only about BR2_PACKAGE_OPENSSL_BIN, which is not selected by any package.

I obviously missed that. Thanks for noticing.

Thomas
Thomas Petazzoni June 30, 2015, 2:44 p.m. UTC | #5
Dear Benoît Thébaudeau,

On Fri, 19 Jun 2015 12:54:33 +0200, Benoît Thébaudeau wrote:
> The commit 720893b62510438237b9923d744dd079ddb4f67d "openssl: disable
> apps for NOMMU" prevented the openssl binary from being built without
> MMU in order to fix a build failure without fork(). However, openssl is
> designed to support the lack of fork() with -DHAVE_FORK=0, so allow the
> openssl binary to be enabled without MMU thanks to this option.
> 
> Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
> ---
>  package/openssl/Config.in  | 3 ---
>  package/openssl/openssl.mk | 4 ++++
>  2 files changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Thomas
diff mbox

Patch

diff --git a/package/openssl/Config.in b/package/openssl/Config.in
index 07859ca..d147c07 100644
--- a/package/openssl/Config.in
+++ b/package/openssl/Config.in
@@ -13,15 +13,12 @@  if BR2_PACKAGE_OPENSSL
 
 config BR2_PACKAGE_OPENSSL_BIN
 	bool "openssl binary"
-	# uses fork()
-	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	help
 	  Install the openssl binary to the target file system. This is a
 	  command line tool for doing various crypthographic stuff.
 
 comment "openssl binary needs a toolchain w/ dynamic library"
-	depends on BR2_USE_MMU
 	depends on BR2_STATIC_LIBS
 
 config BR2_PACKAGE_OPENSSL_ENGINES
diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index fd8904d..34a9830 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -22,6 +22,10 @@  endef
 OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS
 endif
 
+ifeq ($(BR2_USE_MMU),)
+OPENSSL_CFLAGS += -DHAVE_FORK=0
+endif
+
 ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
 OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
 OPENSSL_DEPENDENCIES += cryptodev-linux