[erlang-questions] Cross-compiling tests with quoted ENV vars

Lukas Larsson <>
Thu Sep 19 09:23:00 CEST 2013


Hello Matt,

As you have guessed the cross compile support for tests is indeed a very
lightly-used path and also quite new.

Right now we run nightly cross-compile tests for x86_64-saf-linux-gnu and
powerpc-dso-linux-gnu (from Linux x86) and have not attempted to get it to
work on any other.

As neither of these use quoted CFLAGS, that specific option has slipped
through and what you have found is indeed a bug. A patch that fixes this
would be very appreciated!

Lukas


On Wed, Sep 18, 2013 at 1:33 AM, Matt Lewandowsky <>wrote:

> Hello,
>
> I am attempting to cross-compile OTP for a new platform, with a new
> $ERL_TOP/xcomp/erl-xcomp-*.conf file. Unfortunately, I've hit an
> interesting
> issue and it appears the only other xcomp platform which would encounter
> it is
> VxWorks, which I do not have access to.
>
> In my xcomp conf file, I use quoted values for CFLAGS and other environment
> variables. These get re-double-quoted by ts_install.erl as such:
>
> Env: [{"CFLAGS",
>        "\"-mcpu=cortex-a9 -Wno-psabi -fstack-protector-all
> -D_FORTIFY_SOURCE=2
>  -O2 -Wformat -Wformat-security -Werror=format-security\""},
>
> As the VxWorks target also has quoted variables, how do the tests get
> compiled
> for that platform since the documented procedure in the "Testing the cross
> compiled system" section of the User's Guide *should* fail, per the results
> I'm seeing? Are tests not cross-compiled by anyone, ever, for that
> platform?
> Is there some undocumented magic I'm missing? Is this a legitimate bug I
> should fix while I trod down this obviously lightly-used path?
>
> Thanks,
>
> --Matt
>
> P.S. As there doesn't seem to be any naming convention for configuration
> files
> in the xcomp directory and not much to work from, are there recommendations
> for the configuration file I'm working on? The host triplet is long, so
> would
> "something appropriate" be a good enough choice? I expect a > 40 character
> filename would be balked at. :)
>
> --
> Matt Lewandowsky
> Big Geek
> Greenviolet
>  http://www.greenviolet.net
> +1 415 578 5782 (US) +44 844 484 8254 (UK)
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130919/78f7dfc4/attachment.html>


More information about the erlang-questions mailing list