Re: Produce Linux object files under Windows

2018-05-16 Thread Steve Hill
For anyone who is interested, I've continued this thread in the ISPC 
developers group 
.

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ispc-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Produce Linux object files under Windows

2018-05-14 Thread Steve Hill
OK, having dug a bit deeper, I now have a feel for what these extra files 
are. More importantly, I see that builtins.c has a dependency on the target 
OS in __num_cores(). This suggests that the target (without extensive work) 
does need to be specified at ISPC compile time - not just run-time. Hence, 
I will build the 1.9.2 of ISPC from source and then make minimal changes to 
target GCC/Linux and rebuild. Fingers crossed it will all be good!

Thanks again!

Steve.

On Monday, 14 May 2018 08:23:41 UTC+1, Steve Hill wrote:
>
> Thanks for this. I've taken a look at your branch and I don't believe that 
> most of the changes would be needed in my case, since I'm only changing the 
> object file format, not defining a new CPU type. I am currently thinking of 
> adding a command-line option to specify the default target triple to use 
> (dropping back to llvm::sys::getDefaultTargetTriple() if not specified). 
> The only thing that I'm not clear on is the compilation of builtins.c and 
> gen-stdlib-mask*.cpp. I see that these are built in ispc.vcxproj and the 
> target triple is provided to the command. I'm not sure quite what these are 
> and whether it is possible to achieve what I am attempting (that is, a 
> single ispc.exe capable to generating both MSVC and GCC object files 
> depending on the invocation).
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ispc-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Produce Linux object files under Windows

2018-05-14 Thread Steve Hill
Hi Dmitry,

Thanks for this. I've taken a look at your branch and I don't believe that 
most of the changes would be needed in my case, since I'm only changing the 
object file format, not defining a new CPU type. I am currently thinking of 
adding a command-line option to specify the default target triple to use 
(dropping back to llvm::sys::getDefaultTargetTriple() if not specified). 
The only thing that I'm not clear on is the compilation of builtins.c and 
gen-stdlib-mask*.cpp. I see that these are built in ispc.vcxproj and the 
target triple is provided to the command. I'm not sure quite what these are 
and whether it is possible to achieve what I am attempting (that is, a 
single ispc.exe capable to generating both MSVC and GCC object files 
depending on the invocation).

If you could provide any more help and thoughts, I would be very grateful.

Cheers,

Steve.

On Saturday, 12 May 2018 09:52:31 UTC+1, Dmitry Babokin wrote:
>
> Hi,
>
> You've got it pretty much right, you need to define target triple to the 
> target platform that you need and you are almost done. But there are other 
> minor issues. We are building PS4 target, which is Windows cross compiler 
> targeting FreeBSD. You can have a look at this branch 
> https://github.com/dbabokin/ispc/tree/jaguar_v192 for more details.
>
> Looks like it's the time add a How To page about building cross compilers.
>
> Dmitry.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ispc-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Produce Linux object files under Windows

2018-05-12 Thread Dmitry Babokin
Hi,

You've got it pretty much right, you need to define target triple to the
target platform that you need and you are almost done. But there are other
minor issues. We are building PS4 target, which is Windows cross compiler
targeting FreeBSD. You can have a look at this branch
https://github.com/dbabokin/ispc/tree/jaguar_v192 for more details.

Looks like it's the time add a How To page about building cross compilers.

Dmitry.

On Wed, May 9, 2018 at 8:01 AM, Steve Hill  wrote:

> Hi,
>
> I've started having a play with ISPC and have been very impressed with the
> results. However, we build everything under Windows, using a GCC cross
> compiler/linker when targetting Linux. I've determined that the object
> files produced under Linux can be linked by our cross linker but what I
> need to to have the Windows ISPC emit Linux object files. From what I can
> see, the triple used by ISPC under Windows is 'x86_64-pc-windows-msvc' so I
> guess that I need this to be changed to 'x86_64-pc-Linux-GCC'? Is there a
> way of overriding this in the stock build of ISPC? Failing that, I guess
> that I can build LLVM from source with a different default target and then
> build ISPC to use that build of LLVM?
>
> Any advice, thoughts, comments gratefully received!
>
> Cheers,
>
> S.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ispc-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ispc-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.