linux-sg2042/Documentation/kbuild
Antony Pavlov 5b83df2b46 kbuild: fix ld-option function
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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-04-08 11:47:41 +02:00
..
00-INDEX kbuild: document environment variables 2009-01-02 20:43:25 +01:00
kbuild.txt kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux 2012-05-05 21:19:33 +02:00
kconfig-language.txt Revert "kconfig-language: add to hints" 2012-12-06 11:34:55 +01:00
kconfig.txt kconfig: document use of CONFIG_ environment variable 2012-12-25 23:40:07 +01:00
makefiles.txt kbuild: fix ld-option function 2013-04-08 11:47:41 +02:00
modules.txt doc: fix quite a few typos within Documentation 2012-11-19 14:28:24 +01:00