All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Niestroj <m.niestroj@grinn-global.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] package/turbolua: new package
Date: Wed, 6 Apr 2016 21:15:26 +0200	[thread overview]
Message-ID: <5705604E.9090703@grinn-global.com> (raw)
In-Reply-To: <20160404204746.615ebd59@free-electrons.com>

Hi,

On 04.04.2016 20:47, Thomas Petazzoni wrote:
> 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.
>

I had a look on these issues trying to debug them. It is not clear
that it is an issue with Turbolua. Now I think that it is rather
LuaJIT bug, than Turbolua. It also doesn't happen in all
configurations. For example this is not reproducible when we enable
-fstack-protector-all (with -fstack-protector-strong it is still
reproducible).

So I think the best will be to remove this dependency.

>
>> +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 ?

Thanks for hints! I will fix it and repost patch.

>
> Best regards,
>
> Thomas
>

-- 
Marcin Niestroj

      reply	other threads:[~2016-04-06 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  9:54 [Buildroot] [PATCH v2 0/1] package/turbolua: new package Marcin Niestroj
2016-04-04  9:54 ` [Buildroot] [PATCH v2 1/1] " Marcin Niestroj
2016-04-04 18:47   ` Thomas Petazzoni
2016-04-06 19:15     ` Marcin Niestroj [this message]

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=5705604E.9090703@grinn-global.com \
    --to=m.niestroj@grinn-global.com \
    --cc=buildroot@busybox.net \
    /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.