[erlang-questions] Cross-compiling tests with quoted ENV vars
Matt Lewandowsky
matt@REDACTED
Sat Sep 21 11:17:59 CEST 2013
Thanks for the reply, Lukas.
I have fixed the problem with quoted CFLAGS in my local tree (and a few other things which trying to build the tests exposed). Unfortunately, I'm now stuck in ts_erl_config.erl.
It appears to use OsType extensively, which wouldn't be much of a problem so far except for the fact that my target system doesn't use -lpthread for POSIX threads. I can't just add a new case there because since because I'm cross-compiling from Linux for not-Linux, it will always match the {unix,_} case. I'm not finding any way to actually determine the cross-compilation OS type there. I expect this is more of not quite understanding just how the pieces of the cross compile support are supposed to mesh with the tests than anything else.
I'll continue poking at it over the weekend, but if you (or anyone else) have any pointers which would speed this up, I'd be greatly appreciative. It feels like I must be almost done with this step of the process since it's trying to link.
For what it's worth, I've already used Erlang on the target platform (including verifying that os:type() is what I expected it to be), so the tests really are just a method for me to validate that the result is correct.
--Matt
--
Matt Lewandowsky
Big Geek
Greenviolet
matt@REDACTED http://www.greenviolet.net
+1 415 578 5782 (US) +44 844 484 8254 (UK)
________________________________
> Date: Thu, 19 Sep 2013 09:23:00 +0200
> Subject: Re: [erlang-questions] Cross-compiling tests with quoted ENV vars
> From: lukas@REDACTED
> To: matt@REDACTED
> CC: erlang-questions@REDACTED
>
> 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
> <matt@REDACTED<mailto:matt@REDACTED>> 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
> matt@REDACTED<mailto:matt@REDACTED> http://www.greenviolet.net
> +1 415 578 5782 (US) +44 844 484 8254 (UK)
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED<mailto:erlang-questions@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
More information about the erlang-questions
mailing list