All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2] kbuild: fix ld-option function
Date: Mon, 08 Apr 2013 11:59:49 +0200	[thread overview]
Message-ID: <51629515.4000702@suse.cz> (raw)
In-Reply-To: <1365000153-8318-1-git-send-email-antonynpavlov@gmail.com>

On 3.4.2013 16:42, Antony Pavlov wrote:
> The kbuild's ld-option function is broken because
> the command
>   $(CC) /dev/null -c -o "$$TMPO"
> does not create object file!
> 
> I have used a relatively old mips gcc 3.4.6 cross-compiler
> and a relatively new gcc 4.7.2 to check this fact
> but the results are the same.
> 
> EXAMPLE:
>   $ rm /tmp/1.o
>   $ mips-linux-gcc /dev/null -c -o /tmp/1.o
>   mips-linux-gcc: /dev/null: linker input file unused because linking not done
>   $ ls -la /tmp/1.o
>   ls: cannot access /tmp/1.o: No such file or directory
> 
> We can easily fix the problem by adding
> the '-x c' compiler option.
> 
> EXAMPLE:
>   $ rm /tmp/1.o
>   $ mips-linux-gcc -x c /dev/null -c -o /tmp/1.o
>   $ ls -la /tmp/1.o
>   -rw-r--r-- 1 antony antony 778 Apr  2 20:40 /tmp/1.o
> 
> Also fix wrong ld-option example.
> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  Documentation/kbuild/makefiles.txt |    2 +-
>  scripts/Kbuild.include             |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to kbuild.git#kbuild, thanks.

Michal

      reply	other threads:[~2013-04-08  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 14:42 [PATCH v2] kbuild: fix ld-option function Antony Pavlov
2013-04-08  9:59 ` Michal Marek [this message]

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=51629515.4000702@suse.cz \
    --to=mmarek@suse.cz \
    --cc=antonynpavlov@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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.