gcc 4.8.1 made it to Debian Sid

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jul 11 07:40:35 PDT 2013


On Thu, Jul 11, 2013 at 08:09:33AM +0100, Iain Buclaw wrote:
> On Jul 11, 2013 1:28 AM, "H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote:
[...]
> >   The trouble with this case is that currently gdmd always compiles
> >   each source file separately (following the behaviour of the old
> >   Perl
> 
> Are you sure on that?  :-)

Heh, you're right, I misread the Perl script (or rather, didn't pay
attention to that little flag named $combine). The original script does
indeed compile everything all at once. I'll have to change my new
version to do the same. :)


> My memory might be bad in this respect, but I seem to recall the
> script explicitly set the output program / object file name. (See
> below for why that matters ).

I've set up the new version to always specify output filenames too. But
I missed the part where separate compilation *isn't* the default. :)


> >   script), so we can't just rename the default test.o to prog.o.
> >   Also, IME, running gdc with too many .d files at once can
> >   sometimes cause memory problems, so doing it one at a time seems
> >   preferable.
> >
> 
> Running dmd with too many .d files causes the same memory problems,
> but they tend to be short lived due to the speed of the compilation.

I'll have to experiment with that one a little bit more. I have a
particular project that appears to use a combination of templates that
causes the old gdc-4.6 to crash / produce wrong results when compiled
all together, but I haven't tried it with gdc-4.8 yet.


> The difference between single and multiple file compilation is very
> subtle in gdc since the switch to LTO.
> 
> gdc foo.d bar.d.   # compiled separately.
> gdc foo.d bar.d -o exe   # compiled together.
> 
> People from a dmd background I found expected the latter, and separate
> compilation also comes with its own quirks that don't occur during
> single compilation of all sources (the most common suggested work
> around for this being -femit-templates, though should give the switch
> -fonly some lovin' someday).
[...]

You're right, I'll have to rewrite gdmd.compile() to do everything in
one go instead of compiling separately, as I have it now.


T

-- 
English has the lovely word "defenestrate", meaning "to execute by
throwing someone out a window", or more recently "to remove Windows from
a computer and replace it with something useful". :-) -- John Cowan


More information about the D.gnu mailing list