linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Oleg Verych <olecom@gmail.com>
Cc: linux-embedded <linux-embedded@vger.kernel.org>,
	linux-kbuild@vger.kernel.org, segher@kernel.crashing.org
Subject: Re: about size optimizations (Re: Not as much ccache win as I expected)
Date: Sat, 14 Jun 2008 11:05:17 +0100	[thread overview]
Message-ID: <1213437917.26255.335.camel@pmac.infradead.org> (raw)
In-Reply-To: <8499950a0806140256o45d3696o505c02b2f34d90db@mail.gmail.com>

On Sat, 2008-06-14 at 10:56 +0100, Oleg Verych wrote:
> I saw that. My point is pure text processing. But as it seems doing
> `make` is a lot more fun than to do `sh` && `sed`.

The problem is that it _isn't_ pure text processing. There's more to
building with --combine than that, and we really do want the compiler to
do it.

_Sometimes_ you can just append C files together and they happen to
work. But not always. A simple case where it fails would be when you
have a static variable with the same name in two different files.

The compiler will do the right thing there., while naïve concatenation
of C files will not.

Of course, it's _possible_ to have external text processing cope with
this case somehow -- you'd probably feed it through the preprocessor,
then look at the output of the preprocessor and make the variable names
unique, perhaps? And then move on to the next case which is already
handled in gcc...

But really, I'd rather just leave it to the compiler. And it's not
because I have some masochistic fascination with makefiles :)

-- 
dwmw2

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-06-14 10:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 21:52 about size optimizations (Re: Not as much ccache win as I expected) Oleg Verych
2008-06-14  7:43 ` David Woodhouse
2008-06-14  9:48   ` Adrian Bunk
2008-06-14  9:56   ` Oleg Verych
2008-06-14 10:05     ` David Woodhouse [this message]
2008-06-14 10:27       ` Oleg Verych
2008-06-15 16:00       ` Jamie Lokier
2008-06-15 16:56         ` Oleg Verych

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213437917.26255.335.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=olecom@gmail.com \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).