[Buildroot] [PATCH v2 1/1] package/turbolua: new package

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Apr 4 18:47:46 UTC 2016


Hello,

On Mon,  4 Apr 2016 11:54:42 +0200, Marcin Niestroj wrote:

> diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in
> new file mode 100644
> index 0000000..a742097
> --- /dev/null
> +++ b/package/turbolua/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_TURBOLUA
> +	bool "turbolua"
> +	depends on BR2_PACKAGE_LUAJIT
> +	# Turbolua program within thumb2 system receives "Illegal
> +	# instruction" and "Segmentation fault" errors.
> +	depends on !BR2_ARM_INSTRUCTIONS_THUMB2

Ok, so there is probably no inherent problem, it's just that it happens
to not work. What I dislike a bit with such dependency is that you
probably don't have tested on the full range of architectures that are
supported in Buildroot. So I generally prefer when we add such
dependencies when the software can really technically not work on the
architecture, not when there is some random bug that prevents it.

But oh well, I won't oppose to this dependency being added.


> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +SSL = openssl
> +else
> +SSL = none
> +endif

The namespace of variables is global, so SSL is not a good variable
named, it should be TURBOLUA_SSL.

> +define TURBOLUA_BUILD_CMDS
> +	$(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" \
> +		LUAJIT_VERSION="$(LUAJIT_VERSION)" -C $(@D) all
> +endef
> +
> +define TURBOLUA_INSTALL_TARGET_CMDS
> +	$(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" LDCONFIG=true \
> +		LUAJIT_VERSION="$(LUAJIT_VERSION)" \
> +		PREFIX="$(TARGET_DIR)/usr" -C $(@D) install
> +endef

What about defining:

TURBOLUA_MAKE_OPTS = \
	$(TARGET_CONFIGURE_OPTS) \
	SSL=$(if $(BR2_PACKAGE_OPENSSL),openssl,none) \
	LUAJIT_VERSION="$(LUAJIT_VERSION)"

and use it in the build and install steps ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list