1. 02 10月, 2014 1 次提交
  2. 08 8月, 2014 1 次提交
  3. 30 3月, 2014 1 次提交
  4. 14 2月, 2014 1 次提交
  5. 08 4月, 2013 1 次提交
    • A
      kbuild: fix ld-option function · 5b83df2b
      Antony Pavlov 提交于
      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: NAntony Pavlov <antonynpavlov@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      5b83df2b
  6. 06 10月, 2012 1 次提交
  7. 03 10月, 2012 1 次提交
    • J
      kbuild: Fix gcc -x syntax · b1e0d8b7
      Jean Delvare 提交于
      The correct syntax for gcc -x is "gcc -x assembler", not
      "gcc -xassembler". Even though the latter happens to work, the former
      is what is documented in the manual page and thus what gcc wrappers
      such as icecream do expect.
      
      This isn't a cosmetic change. The missing space prevents icecream from
      recognizing compilation tasks it can't handle, leading to silent kernel
      miscompilations.
      
      Besides me, credits go to Michael Matz and Dirk Mueller for
      investigating the miscompilation issue and tracking it down to this
      incorrect -x parameter syntax.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Cc: Bernhard Walle <bernhard@bwalle.de>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      b1e0d8b7
  8. 25 3月, 2012 1 次提交
    • B
      scripts/Kbuild.include: Fix portability problem of "echo -e" · 875de986
      Bernhard Walle 提交于
      "echo -e" is a GNU extension. When cross-compiling the kernel on a
      BSD-like operating system (Mac OS X in my case), this doesn't work.
      
      One could install a GNU version of echo, put that in the $PATH before
      the system echo and use "/usr/bin/env echo", but the solution with
      printf is simpler.
      
      Since it is no disadvantage on Linux, I hope that gets accepted even if
      cross-compiling the Linux kernel on another Unix operating system is
      quite a rare use case.
      Signed-off-by: NBernhard Walle <bernhard@bwalle.de>
      Andreas Bießmann <andreas@biessmann.de>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      875de986
  9. 10 6月, 2011 1 次提交
  10. 16 5月, 2011 1 次提交
    • M
      kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o · c4d5ee13
      Michal Marek 提交于
      Based on a patch by Rabin Vincent.
      
      Fix building with KBUILD_NOCMDDEP=1, which currently does not work
      because it does not build built-in.o with no dependencies:
      
        LD      fs/notify/built-in.o
      ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory
      ld: cannot find fs/notify/inotify/built-in.o: No such file or directory
      ld: cannot find fs/notify/fanotify/built-in.o: No such file or directory
      Reported-and-tested-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      c4d5ee13
  11. 03 5月, 2011 1 次提交
  12. 20 4月, 2011 1 次提交
  13. 12 12月, 2009 1 次提交
    • M
      kbuild: generate modules.builtin · bc081dd6
      Michal Marek 提交于
      To make it easier for module-init-tools and scripts like mkinitrd to
      distinguish builtin and missing modules, install a modules.builtin file
      listing all builtin modules. This is done by generating an additional
      config file (tristate.conf) with tristate options set to uppercase 'Y'
      or 'M'. If we source that config file, the builtin modules appear in
      obj-Y.
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      bc081dd6
  14. 12 10月, 2009 1 次提交
  15. 20 9月, 2009 3 次提交
  16. 04 12月, 2008 3 次提交
  17. 10 9月, 2008 1 次提交
  18. 12 2月, 2008 1 次提交
    • S
      kbuild: fix make V=1 · fab1e310
      Sam Ravnborg 提交于
      When make -s support were added to filechk to
      combination created with make V=1 were not
      covered.
      Fix it by explicitly cover this case too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Mike Frysinger <vapier@gentoo.org>
      fab1e310
  19. 09 2月, 2008 1 次提交
  20. 20 10月, 2007 1 次提交
    • S
      kbuild: introduce cc-cross-prefix · 910b4046
      Sam Ravnborg 提交于
      cc-cross-prefix is useful for the architecture that like
      to provide a default CROSS_COMPILE value,
      but may have several to select between.
      
      Sample usage:
      
      ifneq ($(SUBARCH),$(ARCH))
              ifeq ($(CROSS_COMPILE),)
                     CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
              endif
      endif
      
      Actual usage by the different archs will taken care of later.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      910b4046
  21. 16 10月, 2007 1 次提交
    • S
      kbuild: enable 'make AFLAGS=...' to add additional options to AS · 222d394d
      Sam Ravnborg 提交于
      The variable AFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of AFLAGS with KBUILD_AFLAGS all over
      the tree.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      222d394d
  22. 15 10月, 2007 1 次提交
    • S
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg 提交于
      The variable CFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
      tree and enabling one to use:
      make CFLAGS=...
      to specify additional gcc commandline options.
      
      One usecase is when trying to find gcc bugs but other
      use cases has been requested too.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k
      
      Test was simple to do a defconfig build, apply the patch and check
      that nothing got rebuild.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  23. 17 7月, 2007 1 次提交
  24. 10 2月, 2007 1 次提交
  25. 09 2月, 2007 1 次提交
  26. 08 2月, 2007 2 次提交
  27. 07 2月, 2007 1 次提交
  28. 11 12月, 2006 1 次提交
  29. 26 9月, 2006 2 次提交
    • J
      [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder · adf14236
      Jan Beulich 提交于
      Current gcc generates calls not jumps to noreturn functions. When that happens the
      return address can point to the next function, which confuses the unwinder.
      
      This patch works around it by marking asynchronous exception
      frames in contrast normal call frames in the unwind information.  Then teach
      the unwinder to decode this.
      
      For normal call frames the unwinder now subtracts one from the address which avoids
      this problem.  The standard libgcc unwinder uses the same trick.
      
      It doesn't include adjustment of the printed address (i.e. for the original
      example, it'd still be kernel_math_error+0 that gets displayed, but the
      unwinder wouldn't get confused anymore.
      
      This only works with binutils 2.6.17+ and some versions of H.J.Lu's 2.6.16
      unfortunately because earlier binutils don't support .cfi_signal_frame
      
      [AK: added automatic detection of the new binutils and wrote description]
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      adf14236
    • A
      [PATCH] x86: Detect CFI support in the assembler at runtime · e2414910
      Andi Kleen 提交于
      ... instead of using a CONFIG option. The config option still controls
      if the resulting executable actually has unwind information.
      
      This is useful to prevent compilation errors when users select
      CONFIG_STACK_UNWIND on old binutils and also allows to use
      CFI in the future for non kernel debugging applications.
      
      Cc: jbeulich@novell.com
      Cc: sam@ravnborg.org
      Signed-off-by: NAndi Kleen <ak@suse.de>
      e2414910
  30. 25 9月, 2006 2 次提交
    • S
      kbuild: make V=2 tell why a target is rebuild · 45d506bd
      Sam Ravnborg 提交于
      tell why a a target got build
         enabled by make V=2
            Output (listed in the order they are checked):
               (1) - due to target is PHONY
               (2) - due to target missing
               (3) - due to: file1.h file2.h
               (4) - due to command line change
               (5) - due to missing .cmd file
               (6) - due to target not in $(targets)
      (1) We always build PHONY targets
      (2) No target, so we better build it
      (3) Prerequisite is newer than target
      (4) The command line stored in the file named dir/.target.cmd
          differed from actual command line. This happens when compiler
          options changes
      (5) No dir/.target.cmd file (used to store command line)
      (6) No dir/.target.cmd file and target not listed in $(targets)
          This is a good hint that there is a bug in the kbuild file
      
      This patch is inspired by a patch from: Milton Miller <miltonm@bga.com>
      
      Cc: Milton Miller <miltonm@bga.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      45d506bd
    • S
      kbuild: consistently decide when to rebuild a target · 48f1f058
      Sam Ravnborg 提交于
      Consistently decide when to rebuild a target across all of
      if_changed, if_changed_dep, if_changed_rule.
      PHONY targets are now treated alike (ignored) for all targets
      
      While add it make Kbuild.include almost readable by factoring out a few
      bits to some common variables and reuse this in Makefile.build.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      48f1f058
  31. 01 8月, 2006 2 次提交
    • S
      kbuild: always use $(CC) for $(call cc-version) · 8eb3afe0
      Sam Ravnborg 提交于
      The possibility to specify an optional parameter did not work out as
      expected and it was not used - so remove the possibility.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      8eb3afe0
    • R
      [PATCH] vDSO hash-style fix · 0b0bf7a3
      Roland McGrath 提交于
      The latest toolchains can produce a new ELF section in DSOs and
      dynamically-linked executables.  The new section ".gnu.hash" replaces
      ".hash", and allows for more efficient runtime symbol lookups by the
      dynamic linker.  The new ld option --hash-style={sysv|gnu|both} controls
      whether to produce the old ".hash", the new ".gnu.hash", or both.  In some
      new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu
      to the linker, so that a standard invocation of "gcc -shared" results in
      producing a DSO with only ".gnu.hash".  The new ".gnu.hash" sections need
      to be dealt with the same way as ".hash" sections in all respects; only the
      dynamic linker cares about their contents.  To work with older dynamic
      linkers (i.e.  preexisting releases of glibc), a binary must have the old
      ".hash" section.  The --hash-style=both option produces binaries that a new
      dynamic linker can use more efficiently, but an old dynamic linker can
      still handle.
      
      The new section runs afoul of the custom linker scripts used to build vDSO
      images for the kernel.  On ia64, the failure mode for this is a boot-time
      panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed.
      
      This patch addresses the problem in two ways.
      
      First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash".
       This produces correct vDSO images with --hash-style=sysv (or old tools),
      with --hash-style=gnu, or with --hash-style=both.
      
      Second, it passes the --hash-style=sysv option when building the vDSO
      images, so that ".gnu.hash" is not actually produced.  This is the most
      conservative choice for compatibility with any old userland.  There is some
      concern that some ancient glibc builds (though not any known old production
      system) might choke on --hash-style=both binaries.  The optimizations
      provided by the new style of hash section do not really matter for a DSO
      with a tiny number of symbols, as the vDSO has.  If someone wants to use
      =gnu or =both for their vDSO builds and worry less about that
      compatibility, just change the option and the linker script changes will
      make any choice work fine.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0b0bf7a3
  32. 01 7月, 2006 1 次提交
    • S
      kbuild: fix ia64 breakage after introducing make -rR · 5e8d780d
      Sam Ravnborg 提交于
      kbuild used $¤(*F to get filename of target without extension.
      This was used in several places all over kbuild, but introducing
      make -rR broke his for all cases where we specified full path to
      target/prerequsite. It is assumed that make -rR disables old style
      suffix-rules which is why is suddenly failed.
      
      ia64 was impacted by this change because several div* routines in
      arch/ia64/lib are build using explicit paths and then kbuild failed.
      
      Thanks to David Mosberger-Tang <David.Mosberger@acm.org> for an explanation
      what was the root-cause and for testing on ia64.
      
      This patch also fixes two uses of $(*F) in arch/um
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      5e8d780d