package/guile: New package
cover package/guile: New package
This patch adds a couple of things:
- bdwgc: A garbage collector library for C/C++
- Guile: A progamming language similar to Lisp.
bdwgc was the last requirement needed by Guile that was not included by buildroot. Could you please check the LICENSE type for this library since I didn't find a clear/specific reference to it?
Guile needs a host Guile for building, so it first builds host-guile and then guile for the target with its respective patches.
Thanks.
Pedro Aguilar (2):
Add package bdwgc: A garbage collector for C and C++. The
Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C 'malloc' or C++ 'new'.
Add guile programming language: Guile is an interpreter and compiler
for the Scheme programming language, a clean and elegant dialect of Lisp.
package/Config.in | 2 ++ package/bdwgc/Config.in | 9 +++++++ package/bdwgc/bdwgc.mk | 18 ++++++++++++++ package/guile/Config.in | 14 +++++++++++ package/guile/guile-001-fix_arm_endianness.patch | 13 ++++++++++ .../guile/guile-002-calculate-csqrt_manually.patch | 11 +++++++++ .../guile-003-undef_use_gnu_local_locale_api.patch | 11 +++++++++ package/guile/guile.mk | 28 ++++++++++++++++++++++ 8 files changed, 106 insertions(+) create mode 100644 package/bdwgc/Config.in create mode 100644 package/bdwgc/bdwgc.mk create mode 100644 package/guile/Config.in create mode 100644 package/guile/guile-001-fix_arm_endianness.patch create mode 100644 package/guile/guile-002-calculate-csqrt_manually.patch create mode 100644 package/guile/guile-003-undef_use_gnu_local_locale_api.patch create mode 100644 package/guile/guile.mk
Signature · 1 line
1.9.1
PATCH 1/2 Add package bdwgc: A garbage collector for C and C++. The Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C 'malloc' or C++ 'new'.
--- package/Config.in | 1 + package/bdwgc/Config.in | 9 +++++++++ package/bdwgc/bdwgc.mk | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 package/bdwgc/Config.in create mode 100644 package/bdwgc/bdwgc.mk
package/Config.in +1 -0
@@ -942,6 +942,7 @@ endmenu menu "Miscellaneous" source "package/aespipe/Config.in" source "package/bc/Config.in" + source "package/bdwgc/Config.in" source "package/clamav/Config.in" source "package/collectd/Config.in" source "package/empty/Config.in"
package/bdwgc/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_BDWGC + bool "bdwgc" + help + The Boehm-Demers-Weiser conservative garbage collector can + be used as a garbage collecting replacement for C 'malloc' + or C++ 'new'. + + http://www.hboehm.info/gc/ +
package/bdwgc/bdwgc.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# bdwgc +# +################################################################################ + +BDWGC_VERSION = 7.2f +BDWGC_SOURCE = gc-$(BDWGC_VERSION).tar.gz +BDWGC_SITE = http://www.hboehm.info/gc/gc_source +BDWGC_INSTALL_STAGING = YES +BDWGC_LICENSE = GPL compatible +BDWGC_LICENSE_FILES = README +BDWGC_LIBTOOL_PATCH = NO + +BDWGC_DEPENDENCIES = host-bdwgc + +$(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.9.1
PATCH 1/2 Add package bdwgc: A garbage collector for C and C++. The Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C 'malloc' or C++ 'new'.
Pedro, All,
The commit log should be formatted as specified in the manual, which follows standard practive to format git commit logs, especially chapter 21.5.2. Patch revision changelog:
http://nightly.buildroot.org/#submitting-patches
which would give something like the following for this patch:
bdwgc: new package
bdwgc is a garbage collector for C and C++. The Boehm-Demers-Weiser conservative garbage collector can be used as a garbage collecting replacement for C 'malloc' or C++ 'new'.
Otherwise, git will not recognise the subject of the patch, and mangles the commit log into an ugly mail subject, as you may notice here. ;-)
On 2014-11-02 16:15 +0100, Pedro Aguilar spake thusly:
Quoted 15 lines
Signed-off-by Pedro Aguilar <[email protected]>--- package/Config.in | 1 + package/bdwgc/Config.in | 9 +++++++++ package/bdwgc/bdwgc.mk | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 package/bdwgc/Config.in create mode 100644 package/bdwgc/bdwgc.mkpackage/bdwgc/Config.in new file +0
-0
package/bdwgc/Config.in line 3
Quoted 3 lines
package/bdwgc/Config.in new file +3
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_BDWGC + bool "bdwgc" + help
Indentation for kconfig keywords is: one tab. You have one tab followed by one extra space.
Also, it seems it depends on libatomics_ops, so you should have:
depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS # libatomic_ops select BR2_PACKAGE_LIBATOMIC_OPS
It bundles its own version of libatomic_ops, but I'd prefer we disable the bundled one, and use the one already packaged in Buildroot, which seems the default if an external one is found; from configure.ac:
[...]
# Do we want to use an external libatomic_ops? By default use it if it's # found.
AC_ARG_WITH([libatomic-ops],
[AS_HELP_STRING([--with-libatomic-ops[=yes|no|check]],
[Use a external libatomic_ops? (default: check)])],
[], [with_libatomic_ops=check])
# Check for an external libatomic_ops if the answer was yes or check. If not # found, fail on yes, and convert check to no.
[...]
package/bdwgc/Config.in line 8
Quoted 5 lines
package/bdwgc/Config.in new file +5
-0+ The Boehm-Demers-Weiser conservative garbage collector can + be used as a garbage collecting replacement for C 'malloc' + or C++ 'new'. + + http://www.hboehm.info/gc/
Indentation for the help text itself is: one tab and two spaces. You have 6 spaces.
Quoted 7 lines
package/bdwgc/bdwgc.mk new file +1
-0@@ -0,0 +1,18 @@ +################################################################################
package/bdwgc/bdwgc.mk line 11
Quoted 10 lines
package/bdwgc/bdwgc.mk new file +10
-0+# +# bdwgc +# +################################################################################ + +BDWGC_VERSION = 7.2f +BDWGC_SOURCE = gc-$(BDWGC_VERSION).tar.gz +BDWGC_SITE = http://www.hboehm.info/gc/gc_source +BDWGC_INSTALL_STAGING = YES +BDWGC_LICENSE = GPL compatible
My. What a mess of a license... :-(
From what I understand:
- bdwgc itself is using its own license, not unlike MIT, but not MIT
- it uses some GPL-licensed parts with exceptions
- the license of the build files (autostuff) is irrelevant, since they do not end up in the target
So I would just say something like: bdwgc license
and let the user decide by himself.
package/bdwgc/bdwgc.mk line 15
Quoted 4 lines
package/bdwgc/bdwgc.mk new file +4
-0+BDWGC_LICENSE_FILES = README +BDWGC_LIBTOOL_PATCH = NO + +BDWGC_DEPENDENCIES = host-bdwgc
You also need: libatomic_ops
Host variant will automatically catch the dependency on host-libatomic_ops, so no need to specify it explicitly.
Regards,
Yann E. MORIN.
Quoted 9 lines
package/bdwgc/bdwgc.mk new file +2
-0+$(eval $(autotools-package)) +$(eval $(host-autotools-package))Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 Add guile programming language: Guile is an interpreter and compiler for the Scheme programming language, a clean and elegant dialect of Lisp.
In reply to Pedro Aguilar--- package/Config.in | 1 + package/guile/Config.in | 14 +++++++++++ package/guile/guile-001-fix_arm_endianness.patch | 13 ++++++++++ .../guile/guile-002-calculate-csqrt_manually.patch | 11 +++++++++ .../guile-003-undef_use_gnu_local_locale_api.patch | 11 +++++++++ package/guile/guile.mk | 28 ++++++++++++++++++++++ 6 files changed, 78 insertions(+) create mode 100644 package/guile/Config.in create mode 100644 package/guile/guile-001-fix_arm_endianness.patch create mode 100644 package/guile/guile-002-calculate-csqrt_manually.patch create mode 100644 package/guile/guile-003-undef_use_gnu_local_locale_api.patch create mode 100644 package/guile/guile.mk
package/Config.in +1 -0
@@ -393,6 +393,7 @@ endmenu menu "Interpreter languages and scripting" source "package/enscript/Config.in" source "package/erlang/Config.in" + source "package/guile/Config.in" source "package/haserl/Config.in" source "package/jamvm/Config.in" source "package/jimtcl/Config.in"
package/guile/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_GUILE + bool "guile" + select BR2_PACKAGE_LIBUNINSTRING + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBGMP + select BR2_PACKAGE_BDWGC + select BR2_PACKAGE_FLEX + select BR2_PACKAGE_LIBTOOL + help + Guile is an interpreter and compiler for the Scheme + programming language, a clean and elegant dialect of Lisp. + + http://www.gnu.org/software/guile +
package/guile/guile-001-fix_arm_endianness.patch new file +13 -0
@@ -0,0 +1,13 @@ +--- guile-2.0.11.orig/module/system/base/target.scm 2013-02-28 09:42:45.000000000 +0100 ++++ guile-2.0.11/module/system/base/target.scm 2014-11-01 21:23:15.301242749 +0100 +@@ -70,7 +70,9 @@ + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) + (endianness big)) +- ((string-match "^arm.*el" cpu) ++ ((string-match "^arm.*eb" cpu) ++ (endianness big)) ++ ((string-match "^arm.*" cpu) + (endianness little)) + (else + (error "unknown CPU endianness" cpu)))))
package/guile/guile-002-calculate-csqrt_manually.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- guile-2.0.11.orig/libguile/numbers.c 2014-03-12 14:24:54.000000000 +0100 ++++ guile-2.0.11/libguile/numbers.c 2014-11-01 21:07:20.301263587 +0100 +@@ -10260,8 +10260,6 @@ + { + #if defined HAVE_COMPLEX_DOUBLE && defined HAVE_USABLE_CSQRT \ + && defined SCM_COMPLEX_VALUE +- return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (z))); +-#else + double re = SCM_COMPLEX_REAL (z); + double im = SCM_COMPLEX_IMAG (z); + return scm_c_make_polar (sqrt (hypot (re, im)),
package/guile/guile-003-undef_use_gnu_local_locale_api.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- guile-2.0.11.orig/libguile/i18n.c 2014-01-21 22:25:11.000000000 +0100 ++++ guile-2.0.11/libguile/i18n.c 2014-11-01 21:59:29.001195319 +0100 +@@ -54,7 +54,7 @@ + Specifications Issue 7'' (aka. "POSIX 2008"): + + http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html */ +-# define USE_GNU_LOCALE_API ++# undef USE_GNU_LOCALE_API + #endif + + #include "libguile/posix.h" /* for `scm_i_locale_mutex' */
package/guile/guile.mk new file +28 -0
@@ -0,0 +1,28 @@ +################################################################################ +# +# guile +# +################################################################################ + +GUILE_VERSION = 2.0.11 +GUILE_SOURCE = guile-$(GUILE_VERSION).tar.xz +GUILE_SITE = ftp://ftp.gnu.org/pub/gnu/guile +GUILE_INSTALL_STAGING = YES +GUILE_LICENSE = LGPLv3 +GUILE_LICENSE_FILES = LICENSE +GUILE_DEPENDENCIES = host-guile + +HOST_GUILE_DEPENDENCIES = host-intltool host-libffi host-gmp host-bdwgc + +PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config + +GUILE_CONF_ENV += GUILE_FOR_BUILD=$(HOST_DIR)/usr/bin/guile \ + LIBFFI_CFLAGS="-I$(TARGET_DIR)/usr/include" \ + LIBFFI_LIBS="-L$(TARGET_DIR)/usr/lib -lffi" \ + BDW_GC_CFLAGS="-I$(TARGET_DIR)/usr/include" \ + BDW_GC_LIBS="-L$(TARGET_DIR)/usr/lib -lgc" \ + CFLAGS+="-DHAVE_GC_SET_FINALIZER_NOTIFIER -DHAVE_GC_GET_HEAP_USAGE_SAFE -DHAVE_GC_GET_FREE_SPACE_DIVISOR -DHAVE_GC_SET_FINALIZE_ON_DEMAND" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) +
Signature · 1 line
1.9.1
PATCH 2/2 Add guile programming language: Guile is an interpreter and compiler for the Scheme programming language, a clean and elegant dialect of Lisp.
Pedro, All,
On 2014-11-02 16:15 +0100, Pedro Aguilar spake thusly:
Quoted 1 line
Signed-off-by Pedro Aguilar <[email protected]>
As for the previous patch, the commit log should be formatted as specified in the manual.
package/guile/Config.in line 4
Quoted 10 lines
package/guile/Config.in new file +4
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_GUILE + bool "guile" + select BR2_PACKAGE_LIBUNINSTRING + select BR2_PACKAGE_LIBFFI
libffi depends on threads, so you have to propagate the dependency to guile, too:
depends on BR2_TOOLCHAIN_HAS_THREADS # libffi
Also, that's BR2_PACKAGE_LIBUNISTRING (extra 'N' after 'UNI').
package/guile/Config.in line 5
Quoted 1 line
package/guile/Config.in new file +1
-0+ select BR2_PACKAGE_LIBGMP
The package is clled just 'gmp', not 'libgmp', so this should be:
select BR2_PACKAGE_GMP
package/guile/Config.in line 13
Quoted 8 lines
package/guile/Config.in new file +8
-0+ select BR2_PACKAGE_BDWGC + select BR2_PACKAGE_FLEX + select BR2_PACKAGE_LIBTOOL + help + Guile is an interpreter and compiler for the Scheme + programming language, a clean and elegant dialect of Lisp. + + http://www.gnu.org/software/guile
And then add a comment stating the dependencies:
comment "guile needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
package/guile/guile-001-fix_arm_endianness.patch
Quoted 6 lines
package/guile/guile-001-fix_arm_endianness.patch new file +0
-0@@ -0,0 +1,13 @@
Patches should have a description and a Signed-off-by line, too. Se the manual, section 18.1. Providing patches:
http://nightly.buildroot.org/#patch-policy
package/guile/guile-002-calculate-csqrt_manually.patch
Quoted 19 lines
package/guile/guile-001-fix_arm_endianness.patch new file +13
-0+--- guile-2.0.11.orig/module/system/base/target.scm 2013-02-28 09:42:45.000000000 +0100 ++++ guile-2.0.11/module/system/base/target.scm 2014-11-01 21:23:15.301242749 +0100 +@@ -70,7 +70,9 @@ + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) + (endianness big)) +- ((string-match "^arm.*el" cpu) ++ ((string-match "^arm.*eb" cpu) ++ (endianness big)) ++ ((string-match "^arm.*" cpu) + (endianness little)) + (else + (error "unknown CPU endianness" cpu)))))package/guile/guile-002-calculate-csqrt_manually.patch new file +0
-0@@ -0,0 +1,11 @@
Ditto.
package/guile/guile-003-undef_use_gnu_local_locale_api.patch
Quoted 17 lines
package/guile/guile-002-calculate-csqrt_manually.patch new file +11
-0+--- guile-2.0.11.orig/libguile/numbers.c 2014-03-12 14:24:54.000000000 +0100 ++++ guile-2.0.11/libguile/numbers.c 2014-11-01 21:07:20.301263587 +0100 +@@ -10260,8 +10260,6 @@ + { + #if defined HAVE_COMPLEX_DOUBLE && defined HAVE_USABLE_CSQRT \ + && defined SCM_COMPLEX_VALUE +- return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (z))); +-#else + double re = SCM_COMPLEX_REAL (z); + double im = SCM_COMPLEX_IMAG (z); + return scm_c_make_polar (sqrt (hypot (re, im)),package/guile/guile-003-undef_use_gnu_local_locale_api.patch new file +0
-0@@ -0,0 +1,11 @@
Ditto.
Quoted 18 lines
package/guile/guile-003-undef_use_gnu_local_locale_api.patch new file +11
-0+--- guile-2.0.11.orig/libguile/i18n.c 2014-01-21 22:25:11.000000000 +0100 ++++ guile-2.0.11/libguile/i18n.c 2014-11-01 21:59:29.001195319 +0100 +@@ -54,7 +54,7 @@ + Specifications Issue 7'' (aka. "POSIX 2008"): + + http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html */ +-# define USE_GNU_LOCALE_API ++# undef USE_GNU_LOCALE_API + #endif + + #include "libguile/posix.h" /* for `scm_i_locale_mutex' */package/guile/guile.mk new file +1
-0@@ -0,0 +1,28 @@ +################################################################################
package/guile/guile.mk line 11
Quoted 10 lines
package/guile/guile.mk new file +10
-0+# +# guile +# +################################################################################ + +GUILE_VERSION = 2.0.11 +GUILE_SOURCE = guile-$(GUILE_VERSION).tar.xz +GUILE_SITE = ftp://ftp.gnu.org/pub/gnu/guile +GUILE_INSTALL_STAGING = YES +GUILE_LICENSE = LGPLv3
This is an "or later", so: LGPLv3+
package/guile/guile.mk line 12
Quoted 1 line
package/guile/guile.mk new file +1
-0+GUILE_LICENSE_FILES = LICENSE
You should also include COPYING and COPYING.LESSER.
package/guile/guile.mk line 13
Quoted 1 line
package/guile/guile.mk new file +1
-0+GUILE_DEPENDENCIES = host-guile
You also need: libunistring libffi gmp bdwgc flex libtool
package/guile/guile.mk line 15
Quoted 1 line
package/guile/guile.mk new file +1
-0+HOST_GUILE_DEPENDENCIES = host-intltool host-libffi host-gmp host-bdwgc
And I guess you need the host variants of all the target dependencies as well.
package/guile/guile.mk line 17
Quoted 1 line
package/guile/guile.mk new file +1
-0+PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config
No, that's already set by the pkg-conf package.
package/guile/guile.mk line 21
Quoted 3 lines
package/guile/guile.mk new file +3
-0+GUILE_CONF_ENV += GUILE_FOR_BUILD=$(HOST_DIR)/usr/bin/guile \ + LIBFFI_CFLAGS="-I$(TARGET_DIR)/usr/include" \ + LIBFFI_LIBS="-L$(TARGET_DIR)/usr/lib -lffi" \
The LIBFFI_CFLAGS and LIBFFI_LIBS should not be necessary, they should be found by ./configure automatically.
package/guile/guile.mk line 23
Quoted 2 lines
package/guile/guile.mk new file +2
-0+ BDW_GC_CFLAGS="-I$(TARGET_DIR)/usr/include" \ + BDW_GC_LIBS="-L$(TARGET_DIR)/usr/lib -lgc" \
Ditto.
package/guile/guile.mk line 24
Quoted 1 line
package/guile/guile.mk new file +1
-0+ CFLAGS+="-DHAVE_GC_SET_FINALIZER_NOTIFIER -DHAVE_GC_GET_HEAP_USAGE_SAFE -DHAVE_GC_GET_FREE_SPACE_DIVISOR -DHAVE_GC_SET_FINALIZE_ON_DEMAND"
You should add a comment explaining why those flags are required, since it is not obvious what they mean and why they are needed.
Regards,
Yann E. MORIN.
Quoted 10 lines
package/guile/guile.mk new file +3
-0+$(eval $(autotools-package)) +$(eval $(host-autotools-package)) +Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'