[Barrelfish-users] CC variable

Zeus Gómez Marmolejo zeus.gomez at bsc.es
Fri Aug 26 19:40:54 CEST 2011


Hi Georgios,

Before we developed our own gcc backend, what I was usually doing -to try
the compilation step- is to substitute the .o object generated by my own
objects (compiled using the other compiler) and then remake, as the
resulting object has a greater timestamp it will only link, but using my
objects.

The problem that I see is when compiling with a different compiler is all
the GNU extensions that are added to struct definitions, functions, etc...
that could be probably included (like __attribute__ (...), these are not
portable). But if your program is not using many barrelfish structs or
functions, you can probably skip these header files.

Good luck!
zeus.



2011/8/26 Timothy Roscoe <troscoe at inf.ethz.ch>

> Hi Georgios,
>
> Actually, source-to-source translators are much easier, since you can
> write rules to do the translation and which implicitly add the generated
> files to the list of C files to compile as normal.  What's a little more
> tricky is a different C -> object file translation step.
>
> It's good that it's not urgent, and we should probably add custom C
> compilers to the wishlist next time we fiddle with Hake a bit more.
>
>  -- Mothy
>
> On 08/26/2011 11:22 AM, Georgios Varisteas wrote:
> > Hi Mothy,
> >
> > My usage for this feature is twofold. First, I require to have custom
> > source-to-source compilers (as front-ends) for the various task-based
> > programming models I'm working with (i.e. Cilk, Wool). Moreover, I
> > plan to try out Continuation-passing-style (like Cilk does) for my
> > own runtime, which requires a custom code-generator to not use the
> > stack. The purpose for CPS is to allow task-migration between threads
> > of different cores.
> >
> > This feature is not urgent since I'm only now starting the
> > implementation, but it's good to know that it's doable. Since almost
> > all of my research requires it though, I think I'll select the first
> > and proper solution.
> >
> >
> > -Georgios
> >
> > ________________________________________ From: Timothy Roscoe
> > [troscoe at inf.ethz.ch] Sent: Friday, August 26, 2011 11:07 To:
> > barrelfish-users at lists.inf.ethz.ch Subject: Re: [Barrelfish-users] CC
> > variable
> >
> > Hi Georgios,
> >
> > We made an early decision to bury the binding of the C compiler
> > fairly deep down in Hake's architecture abstractions.  If there
> > really is a pressing need to specify the C compiler differently for
> > different modules in the same build architecture, we would need to
> > add the compiler name to the (ever-expanding) Opts record.  This is
> > doable, but it's a bit of work.
> >
> > One alternative is to explicitly compile the C files by writing
> > low-level Hake combinators in your Hakefile.  Hake won't compile (or
> > calculate dependencies for) any C files which you don't explicitly
> > hand it, so you can treat any C file specially if you're prepared to
> > forego the convenience of the "build library" or "build application"
> > functions. This might be the easiest way forward for a small module
> > (how big is it?).
> >
> > This does require a bit more understanding of how Hake works, but
> > most of what you need should be in the Technical Note.
> >
> > Hope this helps a bit...
> >
> > -- Mothy
> >
> > On 08/26/2011 10:19 AM, Georgios Varisteas wrote:
> >> Hi Simon,
> >>
> >> Thanks for the quick reply. Setting the compiler in ./hake/
> >> anywhere would be "too" permanent. What I would prefer is to use a
> >> custom compiler just for one module. Ideally there would be a
> >> CC-equivalent option in the hakefile. Could I try and add such a
> >> feature in hake?
> >>
> >> I can always have the compiler to be a wrapper script that invokes
> >> the correct compiler according to arguments (default being gcc).
> >> But this is a hassle for portability since I wont be able to have a
> >> variable for default_compiler to be passed to the wrapper script.
> >>
> >>
> >> -Georgios
> >>
> >>
> >> ________________________________________ From: Simon Peter
> >> [speter at inf.ethz.ch] Sent: Friday, August 26, 2011 10:03 To:
> >> Georgios Varisteas Cc: barrelfish-users at lists.inf.ethz.ch Subject:
> >> Re: [Barrelfish-users] CC variable
> >>
> >> Hi Georgios,
> >>
> >> We don't really do this, but it's probably to set the compiler
> >> variable in hake/X86_64.hs (for example) to something else.
> >>
> >> Hope this helps, Simon
> >>
> >> On 26.08.2011 09:58, Georgios Varisteas wrote:
> >>> Hi,
> >>>
> >>> What's the best way to setup hake to use a different compiler for
> >>> a specific module?
> >>>
> >>>
> >>> Best regards, Georgios Varisteas
> >>> _______________________________________________ Barrelfish-users
> >>> mailing list Barrelfish-users at lists.inf.ethz.ch
> >>> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
> >>
> >>
> >> _______________________________________________ Barrelfish-users
> >> mailing list Barrelfish-users at lists.inf.ethz.ch
> >> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
> >
> > _______________________________________________ Barrelfish-users
> > mailing list Barrelfish-users at lists.inf.ethz.ch
> > https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
> >
> > _______________________________________________ Barrelfish-users
> > mailing list Barrelfish-users at lists.inf.ethz.ch
> > https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>
> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>



-- 
Zeus Gómez Marmolejo
Barcelona Supercomputing Center
PhD student
http://www.bsc.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20110826/c764dbe3/attachment.html 


More information about the Barrelfish-users mailing list