All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] package/swipl: new package
Date: Tue, 6 Aug 2024 19:43:40 +0200	[thread overview]
Message-ID: <20240806194340.2e542192@windsurf> (raw)
In-Reply-To: <20240207225100.1320837-1-ju.o@free.fr>

Hello Julien,

On Wed,  7 Feb 2024 23:51:00 +0100
Julien Olivain <ju.o@free.fr> wrote:

> SWI-Prolog offers a comprehensive free Prolog environment. Since its
> start in 1987, SWI-Prolog development has been driven by the needs of
> real world applications. SWI-Prolog is widely used in research and
> education as well as commercial applications.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

I've finally applied, with some minor changes.

> diff --git a/package/Config.in b/package/Config.in
> index 91a6f1de00..b1a9d74af1 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1443,6 +1443,7 @@ endmenu
>  endif
>  	source "package/quickjs/Config.in"
>  	source "package/ruby/Config.in"
> +	source "package/swipl/Config.in"
>  	source "package/tcl/Config.in"
>  if BR2_PACKAGE_TCL
>  menu "Tcl libraries/modules"
> diff --git a/package/swipl/Config.in b/package/swipl/Config.in
> new file mode 100644
> index 0000000000..f0fb2d786d
> --- /dev/null
> +++ b/package/swipl/Config.in
> @@ -0,0 +1,38 @@
> +# swipl supports arch for which libc fenv.h provides all four macros:
> +# FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD
> +# See for example in glibc https://sourceware.org/git/glibc.git
> +# git grep -E '^[[:space:]]*#[[:space:]]*define[[:space:]]+FE_(TONEAREST|UPWARD|DOWNWARD|TOWARDZERO)' sysdeps/
> +config BR2_PACKAGE_SWIPL_ARCH_SUPPORTS
> +	bool
> +	default y if BR2_aarch64 || BR2_aarch64_be
> +	default y if BR2_arceb || BR2_arcle
> +	default y if BR2_arm || BR2_armeb
> +	default y if BR2_i386
> +	default y if BR2_m68k
> +	# BR2_microblaze has only FE_TONEAREST
> +	default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +	# BR2_nios2 has only FE_TONEAREST
> +	default y if BR2_or1k
> +	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
> +	default y if BR2_riscv
> +	default y if BR2_s390x
> +	# BR2_sh has only FE_{TONEAREST,TOWARDZERO}
> +	default y if BR2_sparc || BR2_sparc64
> +	default y if BR2_x86_64
> +	# BR2_xtensa supports only uclibc which does not have fenv.h
> +
> +config BR2_PACKAGE_SWIPL
> +	bool "SWI-Prolog"
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # __has_attribute()
> +	depends on BR2_PACKAGE_SWIPL_ARCH_SUPPORTS
> +	# swipl needs fenv.h which is not provided by uclibc
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC
> +	select BR2_PACKAGE_ZLIB
> +	help
> +	  SWI-Prolog offers a comprehensive free Prolog
> +	  environment. Since its start in 1987, SWI-Prolog development
> +	  has been driven by the needs of real world
> +	  applications. SWI-Prolog is widely used in research and
> +	  education as well as commercial applications.
> +
> +	  https://www.swi-prolog.org

The Config.in comment here was missing, about the gcc >= 5 dependency
and the glibc or musl dependency, so I added it.


> +# swipl uses cmake macros try_run() and check_c_source_runs(), which
> +# are not suitable for cross compilation. We add results in cache to
> +# avoid running those tests. The SWIPL_NATIVE_FRIEND variable, is
> +# meant to point to build directory of a host native swipl, rather
> +# than the binary itself. The Cmake macro will append "src/swipl" to
> +# the path set to this variable. Therefore, we cannot use the host
> +# "swipl" binary installed in $(HOST_DIR)/usr/bin.
> +SWIPL_CONF_OPTS = \
> +	-DBUILD_PDF_DOCUMENTATION=OFF \
> +	-DHAVE_WEAK_ATTRIBUTE=1 \
> +	-DLLROUND_OK=1 \
> +	-DMODF_OK=1 \
> +	-DQSORT_R_GNU=1 \
> +	-DSWIPL_NATIVE_FRIEND=$(BUILD_DIR)/host-swipl-$(SWIPL_VERSION) \

I've used $(HOST_SWIPL_SRCDIR) instead.

Applied with those changes. Thanks!

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

  reply	other threads:[~2024-08-06 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 22:51 [Buildroot] [PATCH v2 1/1] package/swipl: new package Julien Olivain
2024-08-06 17:43 ` Thomas Petazzoni via buildroot [this message]
2024-08-06 19:33   ` Julien Olivain
2024-08-06 20:20     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240806194340.2e542192@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.