Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Cross-compiling Paho C libraries

Hi Frank,

See this page for some details:
https://dev.eclipse.org/mhonarc/lists/paho-dev/msg01167.html

Cheers,

Roger

On Wed, Mar 26, 2014 at 2:21 PM, Frank Pagliughi
<fpagliughi@xxxxxxxxxxxxxx> wrote:
> This is the first time that I've heard the word "gerrit", but I'll have a
> look.
>
> Frank
>
>
> On 03/25/2014 06:59 PM, Ian Craggs wrote:
>
> Hi Frank,
>
> sounds reasonable.  I'll open a bug for tracking (and doing).  You could
> submit a patch via gerrit, if you feel inclined.
>
> Ian
>
> On 03/24/2014 04:58 PM, Frank Pagliughi wrote:
>
> Hello Ian and All,
>
> I was just looking into cross-compiling the C libraries for an ARM/Linux
> target. It looks like it could work pretty easily, but the problem is that
> the Makefile is forcing the CC variable to "gcc" in all instances. What we
> want is to be able to use a cross-compiling variant, like "arm-linux-gcc",
> "arm-none-linux-gnueabi-gcc", or similar, as the user desires.
>
> What looks to be simple and easy it to introduce a CROSS_COMPILE Make
> variable, which would normally resolve to an empty string for a host build,
> but could be set on the command line to specify a GCC prefix. In the
> Makefile, just assign all of the tools that are used to respect the prefix,
> like:
>
> CC = $(CROSS_COMPILE)gcc
> AR = $(CROSS_COMPILE)ar
> LD = $(CROSS_COMPILE)ld
>
>  I would then, probably also want to direct the output to a specific
> location for this build. Maybe use the prefix to name a specific build
> directory. Something like:
>
> ifndef blddir
>   blddir = build/$(CROSS_COMPILE)output
> endif
>
> And then the library can be cross-compiled with:
>
> $ make CROSS_COMPILE=arm-linux-
>
> I tried this and it works nicely, but I was also cross-compiling from a
> Linux host. I assume that we would also need to set the target OS. Can that
> already be done by setting the TARGET_PLATFORM variable as well?
>
> Thanks,
> Frank
>
>
>
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/paho-dev
>
>
> --
> Ian Craggs
> icraggs@xxxxxxxxxx                 IBM United Kingdom
> Committer on Paho, Mosquitto
>
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/paho-dev
>
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/paho-dev
>


Back to the top