qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Peter Hjalmarsson" <xake@rymdraket.net>
To: qemu-devel@nongnu.org
Cc: Xake <xake@rymdraket.net>
Subject: [Qemu-devel] [PATCH] Add *CFLAGS to LINK in rules.mak
Date: Sat, 24 Oct 2009 11:34:02 +0200	[thread overview]
Message-ID: <1256376842-8298-1-git-send-email-xake@rymdraket.net> (raw)

Sometimes when linking with gcc to get a predictable result you are suggested to also apply the compiler flags to the linker command.

For reference, please read:
http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Link-Options.html
---
 rules.mak |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rules.mak b/rules.mak
index fa8bb6f..5d7e8bb 100644
--- a/rules.mak
+++ b/rules.mak
@@ -22,7 +22,7 @@ QEMU_CFLAGS += -MMD -MP -MT $@
 %.o: %.m
 	$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
 
-LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(1) $(ARLIBS_BEGIN) $(ARLIBS) $(ARLIBS_END) $(LIBS),"  LINK  $(TARGET_DIR)$@")
+LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(1) $(ARLIBS_BEGIN) $(ARLIBS) $(ARLIBS_END) $(LIBS),"  LINK  $(TARGET_DIR)$@")
 
 %$(EXESUF): %.o
 	$(call LINK,$^)
-- 
1.6.5.1

                 reply	other threads:[~2009-10-24  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1256376842-8298-1-git-send-email-xake@rymdraket.net \
    --to=xake@rymdraket.net \
    --cc=qemu-devel@nongnu.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).