Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency
@ 2020-10-16 20:19 Fabrice Fontaine
  2020-10-16 20:19 ` [Buildroot] [PATCH 2/2] package/mpdecimal: fix static build Fabrice Fontaine
  2020-10-17 12:32 ` [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Yann E. MORIN
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-10-16 20:19 UTC (permalink / raw)
  To: buildroot

Version 2.5.0 enables the new libmpdec++ library by default:
http://www.bytereef.org/mpdecimal/changelog.html#version-2-5-0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mpdecimal/mpdecimal.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk
index 00aa98e693..fa310a2274 100644
--- a/package/mpdecimal/mpdecimal.mk
+++ b/package/mpdecimal/mpdecimal.mk
@@ -22,4 +22,10 @@ MPDECIMAL_CONF_ENV += MACHINE=ansi32
 endif
 endif
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+MPDECIMAL_CONF_OPTS += --enable-cxx
+else
+MPDECIMAL_CONF_OPTS += --disable-cxx
+endif
+
 $(eval $(autotools-package))
-- 
2.28.0

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

* [Buildroot] [PATCH 2/2] package/mpdecimal: fix static build
  2020-10-16 20:19 [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Fabrice Fontaine
@ 2020-10-16 20:19 ` Fabrice Fontaine
  2020-10-17 12:32 ` [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-10-16 20:19 UTC (permalink / raw)
  To: buildroot

Update patch to take into account the new libmpdec++ library

Fixes:
 - http://autobuild.buildroot.org/results/40e50ffd00dacbaa697cde67846e0fc570069f56

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ort-for-enable-disable-shared-static.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
index 4b60013840..60d6b4bb02 100644
--- a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
+++ b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
@@ -9,6 +9,8 @@ that building the shared library can be disabled in pure static
 library contexts.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Fabrice: update for 2.5.0 (add libmpdec++)]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
  Makefile.in          |  6 ++++++
  configure.ac         | 13 +++++++++++++
@@ -42,6 +44,20 @@ index 2c91891..0c44f36 100644
  	$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
  	cp -R doc/* $(DESTDIR)$(docdir)
  
+@@ -74,9 +80,13 @@ install_libcxx: install_lib
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
+ 	$(INSTALL) -m 644 libmpdec++/decimal.hh $(DESTDIR)$(includedir)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
++ifeq ($(BUILD_STATIC),yes)
+ 	$(INSTALL) -m 644 libmpdec++/$(LIBSTATIC_CXX) $(DESTDIR)$(libdir)
++endif
++ifeq ($(BUILD_SHARED),yes)
+ 	$(INSTALL) -m 755 libmpdec++/$(LIBSHARED_CXX) $(DESTDIR)$(libdir)
+ 	cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED_CXX) $(LIBSONAME_CXX) && ln -sf $(LIBSHARED_CXX) $(LIBNAME_CXX)
++endif
+ 	cp -R doc/libmpdec++ $(DESTDIR)$(docdir)
+ 
+ 
 diff --git a/configure.ac b/configure.ac
 index 7ee8f86..2b3e505 100644
 --- a/configure.ac
@@ -96,6 +112,36 @@ index d9619a3..985c73c 100644
  
  
  OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \
+diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
+index d9619a3..985c73c 100644
+--- a/libmpdec++/Makefile.in
++++ b/libmpdec++/Makefile.in
+@@ -13,6 +13,8 @@ LIBSTATIC_CXX = @LIBSTATIC_CXX@
+ LIBNAME_CXX = @LIBNAME_CXX@
+ LIBSONAME_CXX = @LIBSONAME_CXX@
+ LIBSHARED_CXX = @LIBSHARED_CXX@
++BUILD_SHARED = @BUILD_SHARED@
++BUILD_STATIC = @BUILD_STATIC@
+ 
+ CXX = @CXX@
+ LDXX = @LDXX@
+@@ -39,8 +41,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
+   MPD_LDXXFLAGS += $(MPD_PUSE)
+ endif
+ 
++ifeq ($(BUILD_SHARED),yes)
++TARGETS += $(LIBSHARED_CXX)
++endif
++
++ifeq ($(BUILD_STATIC),yes)
++TARGETS += $(LIBSTATIC_CXX)
++endif
+ 
+-default: $(LIBSTATIC_CXX) $(LIBSHARED_CXX)
++default: $(TARGETS)
+ 
+ 
+ OBJS := decimal.o
 -- 
 2.1.0
 
-- 
2.28.0

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

* [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency
  2020-10-16 20:19 [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Fabrice Fontaine
  2020-10-16 20:19 ` [Buildroot] [PATCH 2/2] package/mpdecimal: fix static build Fabrice Fontaine
@ 2020-10-17 12:32 ` Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-10-17 12:32 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-10-16 22:19 +0200, Fabrice Fontaine spake thusly:
> Version 2.5.0 enables the new libmpdec++ library by default:
> http://www.bytereef.org/mpdecimal/changelog.html#version-2-5-0
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

I however melt the two patches into one: indeed, if one enables C++ and
static, then this first patch alone is not enough. The C++ + static fix
belongs to this patch.

Regards,
Yann E. MORIN.

> ---
>  package/mpdecimal/mpdecimal.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk
> index 00aa98e693..fa310a2274 100644
> --- a/package/mpdecimal/mpdecimal.mk
> +++ b/package/mpdecimal/mpdecimal.mk
> @@ -22,4 +22,10 @@ MPDECIMAL_CONF_ENV += MACHINE=ansi32
>  endif
>  endif
>  
> +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
> +MPDECIMAL_CONF_OPTS += --enable-cxx
> +else
> +MPDECIMAL_CONF_OPTS += --disable-cxx
> +endif
> +
>  $(eval $(autotools-package))
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2020-10-17 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 20:19 [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Fabrice Fontaine
2020-10-16 20:19 ` [Buildroot] [PATCH 2/2] package/mpdecimal: fix static build Fabrice Fontaine
2020-10-17 12:32 ` [Buildroot] [PATCH 1/2] package/mpdecimal: add optional C++ dependency Yann E. MORIN

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