* [Buildroot] [git commit] openssl: change sed expression delimiter
@ 2015-09-23 21:27 Peter Korsgaard
2015-09-24 9:58 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2015-09-23 21:27 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=35495daed39933db06dcc62a335fff89836d1853
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Switch from : to # since CFLAGS can include :'s spilled in from
BR2_TARGET_OPTIMIZATION, for example:
BR2_TARGET_OPTIMIZATION="-Wl,-rpath,/lib:/usr/lib" would cause the sed
expression to fail thus breaking the build.
Changed all of the SEDs to # for consistency.
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/openssl/openssl.mk | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index c1fc420..cad8d0c 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -65,7 +65,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS
shared \
zlib-dynamic \
)
- $(SED) "s:-O[0-9]:$(HOST_CFLAGS):" $(@D)/Makefile
+ $(SED) "s#-O[0-9]#$(HOST_CFLAGS)#" $(@D)/Makefile
endef
define OPENSSL_CONFIGURE_CMDS
@@ -87,15 +87,15 @@ define OPENSSL_CONFIGURE_CMDS
$(if $(BR2_STATIC_LIBS),zlib,zlib-dynamic) \
$(if $(BR2_STATIC_LIBS),no-dso) \
)
- $(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(@D)/Makefile
- $(SED) "s:-O[0-9]:$(OPENSSL_CFLAGS):" $(@D)/Makefile
- $(SED) "s: build_tests::" $(@D)/Makefile
+ $(SED) "s#-march=[-a-z0-9] ##" -e "s#-mcpu=[-a-z0-9] ##g" $(@D)/Makefile
+ $(SED) "s#-O[0-9]#$(OPENSSL_CFLAGS)#" $(@D)/Makefile
+ $(SED) "s# build_tests##" $(@D)/Makefile
endef
# libdl is not available in a static build, and this is not implied by no-dso
ifeq ($(BR2_STATIC_LIBS),y)
define OPENSSL_FIXUP_STATIC_MAKEFILE
- $(SED) 's/-ldl//g' $(@D)/Makefile
+ $(SED) 's#-ldl##g' $(@D)/Makefile
endef
OPENSSL_POST_CONFIGURE_HOOKS += OPENSSL_FIXUP_STATIC_MAKEFILE
endif
@@ -125,9 +125,9 @@ endef
# libdl has no business in a static build
ifeq ($(BR2_STATIC_LIBS),y)
define OPENSSL_FIXUP_STATIC_PKGCONFIG
- $(SED) 's/-ldl//' $(STAGING_DIR)/usr/lib/pkgconfig/libcrypto.pc
- $(SED) 's/-ldl//' $(STAGING_DIR)/usr/lib/pkgconfig/libssl.pc
- $(SED) 's/-ldl//' $(STAGING_DIR)/usr/lib/pkgconfig/openssl.pc
+ $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/libcrypto.pc
+ $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/libssl.pc
+ $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/openssl.pc
endef
OPENSSL_POST_INSTALL_STAGING_HOOKS += OPENSSL_FIXUP_STATIC_PKGCONFIG
endif
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [git commit] openssl: change sed expression delimiter
2015-09-23 21:27 [Buildroot] [git commit] openssl: change sed expression delimiter Peter Korsgaard
@ 2015-09-24 9:58 ` Thomas Petazzoni
2015-09-24 10:40 ` Gustavo Zacarias
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-09-24 9:58 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 23 Sep 2015 23:27:42 +0200, Peter Korsgaard wrote:
> commit: http://git.buildroot.net/buildroot/commit/?id=35495daed39933db06dcc62a335fff89836d1853
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>
> Switch from : to # since CFLAGS can include :'s spilled in from
> BR2_TARGET_OPTIMIZATION, for example:
>
> BR2_TARGET_OPTIMIZATION="-Wl,-rpath,/lib:/usr/lib" would cause the sed
> expression to fail thus breaking the build.
Actually, I am wondering of -Wl,-rpath,/lib:/usr/lib is the legal of
doing things, and if it shouldn't be -Wl,-rpath,/lib
-Wl,-rpath,/usr/lib. The first solution makes the assumption that ':'
is the RPATH separator, while the latter does not make such assumption.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [git commit] openssl: change sed expression delimiter
2015-09-24 9:58 ` Thomas Petazzoni
@ 2015-09-24 10:40 ` Gustavo Zacarias
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2015-09-24 10:40 UTC (permalink / raw)
To: buildroot
On 24/09/15 06:58, Thomas Petazzoni wrote:
> Actually, I am wondering of -Wl,-rpath,/lib:/usr/lib is the legal of
> doing things, and if it shouldn't be -Wl,-rpath,/lib
> -Wl,-rpath,/usr/lib. The first solution makes the assumption that ':'
> is the RPATH separator, while the latter does not make such assumption.
Hi, they're equivalent, if you build a dummy C program:
gcc -Wl,-rpath,/lib -Wl,-rpath,/usr/lib -o x1 x.c
And:
gcc -Wl,-rpath,/lib:/usr/lib -o x2 x.c
They result in the same RPATH entry in the binary (actually even the
same sha256sum).
There are other gcc options that might go bad with : like using
-std=iso9899:2011 instead of -std=c11.
With # only -### comes to mind which would hardly be useful in a real
project.
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-24 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23 21:27 [Buildroot] [git commit] openssl: change sed expression delimiter Peter Korsgaard
2015-09-24 9:58 ` Thomas Petazzoni
2015-09-24 10:40 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox