From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>,
Peter Harris <git@peter.is-a-geek.org>
Subject: Re: [PATCH 4/4] Makefile: Don't pass $(ALL_CFLAGS) to the linker
Date: Wed, 30 Jun 2010 20:40:23 +0100 [thread overview]
Message-ID: <4C2B9DA7.9000902@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20100626181945.GA13070@burratino>
Jonathan Nieder wrote:
> That does make sense. Perhaps “traditionally” was not the right word;
> I was just looking at common practice. I’ve just never seen -O put
> into LDFLAGS, for example, and I think most people would expect
> setting CFLAGS=-O0 to affect the linker, too.
[This is now a bit off-topic, see below, but what version of gcc are
you using that passes -O to the linker (well, collect2 anyway)?
Do you have to pass -flto? For example "gcc -v -g -O2 hello.o -o hello"
seems to show (for both gcc 3.4.4 and gcc 4.4.0) that neither -g or -O2
is passed to collect2.
Hmmm, the output from gcc 4.4.0 adds a line like:
COLLECT_GCC_OPTIONS='-v' '-g' '-O2' '-o' 'hello.exe' '-mtune=i386'
so, does this imply this is a env. var exported to collect2?
dunno ;-P ]
> I suspect the problem comes from my unfamiliarity with MSVC.
Heh, I'm not an expert user of msvc either!
> Maybe clink.pl should use “cl.exe /link” instead of “link.exe” and this
> problem would go away.
I tried this *very* quickly and it didn't work. (It's quite possible
that I could spend some time and get it to work, but ...)
The patch that Peter sent seems like the way to go, since it does not
affect the regular (non-msvc) build - and it works! ;-)
So we can drop this patch. Thanks for your time.
ATB,
Ramsay Jones
next prev parent reply other threads:[~2010-06-30 20:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 19:48 [PATCH 4/4] Makefile: Don't pass $(ALL_CFLAGS) to the linker Ramsay Jones
2010-06-23 21:08 ` Jonathan Nieder
2010-06-26 17:59 ` Ramsay Jones
2010-06-26 18:19 ` Jonathan Nieder
2010-06-30 19:40 ` Ramsay Jones [this message]
2010-06-30 21:16 ` Andreas Schwab
2010-06-27 9:44 ` Bernhard R. Link
2010-06-24 15:30 ` Peter Harris
2010-06-25 20:24 ` Ramsay Jones
2010-06-27 20:45 ` Peter Harris
2010-06-30 19:52 ` Ramsay Jones
2010-07-01 21:27 ` Peter Harris
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=4C2B9DA7.9000902@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@peter.is-a-geek.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.