1. 27 Jan, 2016 1 commit
  2. 25 Jan, 2016 1 commit
  3. 10 Dec, 2015 1 commit
  4. 17 Nov, 2015 1 commit
  5. 12 Nov, 2015 9 commits
  6. 11 Nov, 2015 13 commits
  7. 01 Oct, 2015 1 commit
  8. 29 Sep, 2015 2 commits
  9. 31 Aug, 2015 1 commit
  10. 28 Aug, 2015 1 commit
    • Brian Norris's avatar
      autogenerated dependency files are not being utilized properly · a2f50d4a
      Brian Norris authored
      
      
      TL;DR
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      
      =====
      
      Auto-generated dependency rules are not being written correctly, so
      changes to dependent files (e.g., headers) do not actually trigger
      rebuilds.
      
      The problem
      ===========
      
      It appears that when a dependency generation flag is passed directly to
      the preprocessor (with '-Wp,...'), it loses information about the output
      path. So, it just makes up the output name as $(basename).o, with no
      path information. This yields .*.c.dep files that look like this:
      
        flash_lock.o: flash_lock.c /usr/include/stdc-predef.h flash_unlock.c \
         (...)
      
      and
      
        nanddump.o: nanddump.c /usr/include/stdc-predef.h /usr/include/ctype.h \
         (...)
         include/libmtd.h
      
      This is the case for both in-tree *and* out-of-tree builds. Naturally,
      this is a problem for out-of-tree builds. But it is also a problem for
      in-tree builds, because we use rules like this for builds:
      
        $(BUILDDIR)/%.o: %.c
      
      and make doesn't recognize $(BUILDDIR)/%.o as the same as %.o even when
      $(BUILDDIR) == $(PWD).
      
      Example failures
      ================
      
        ## Rebuilding after touching common header doesn't recompile anything
        $ make
        (...)
        $ touch include/libmtd.h
        $ make
          CHK     include/version.h
      
        ## Same for out-of-tree builds
        $ BUILDDIR=test make
        (...)
        $ touch include/libmtd.h
        $ BUILDDIR=test make
          CHK     include/version.h
      
      I noticed this when seeing that flash_lock would not get rebuilt when
      modifying flash_unlock.c (where 99% of the source code lies):
      
        $ make
        (...)
        $ touch flash_unlock.c
        $ make
          CHK     include/version.h
          CC      flash_unlock.o
          LD      flash_unlock
      
      The fix
      =======
      
      Just pass -MD straight to the compiler, and make sure to specify the
      output file for the dependency info with -MF.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: David Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      a2f50d4a
  11. 19 Aug, 2015 1 commit
  12. 03 Aug, 2015 1 commit
  13. 25 Jul, 2015 2 commits
  14. 06 Jul, 2015 5 commits