09 Jul, 2013

1 commit


16 Mar, 2013

2 commits

  • It looks at O= and adjusts the $(OUTPUT) variable based on what the
    output directory will be. However, when O is defined but empty, it
    wrongly becomes the user's $HOME dir which is not what we want. So check
    it is not empty before working with it further.

    Signed-off-by: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1361374353-30385-4-git-send-email-bp@alien8.de
    Signed-off-by: Arnaldo Carvalho de Melo

    Borislav Petkov
     
  • We need to hand down parallel build options like the internal make
    --jobserver-fds one so that parallel builds can also happen when
    building perf from the toplevel directory.

    Make it so #1!

    Signed-off-by: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1361374353-30385-3-git-send-email-bp@alien8.de
    Signed-off-by: Arnaldo Carvalho de Melo

    Borislav Petkov
     

20 Nov, 2012

3 commits

  • Fixing:

    [acme@sandy linux]$ cd tools
    [acme@sandy tools]$ make clean
    DESCEND power/cpupower
    CC lib/cpufreq.o
    CC lib/sysfs.o
    LD libcpupower.so.0.0.0
    CC utils/helpers/amd.o
    utils/helpers/amd.c:7:21: error: pci/pci.h: No such file or directory
    In file included from utils/helpers/amd.c:9:
    ./utils/helpers/helpers.h:137: warning: ‘struct pci_access’ declared inside parameter list
    ./utils/helpers/helpers.h:137: warning: its scope is only this definition or declaration, which is probably not what you want
    ./utils/helpers/helpers.h:139: warning: ‘struct pci_access’ declared inside parameter list
    utils/helpers/amd.c: In function ‘amd_pci_get_num_boost_states’:
    utils/helpers/amd.c:120: warning: passing argument 1 of ‘pci_slot_func_init’ from incompatible pointer type
    ./utils/helpers/helpers.h:138: note: expected ‘struct pci_access **’ but argument is of type ‘struct pci_access **’
    utils/helpers/amd.c:125: warning: implicit declaration of function ‘pci_read_byte’
    utils/helpers/amd.c:132: warning: implicit declaration of function ‘pci_cleanup’
    make[1]: *** [utils/helpers/amd.o] Error 1
    make: *** [cpupower_clean] Error 2
    [acme@sandy tools]$

    Reported-by: Arnaldo Carvalho de Melo
    Signed-off-by: David Howells
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/n/tip-tviyimq6x6nm77sj5lt4t19f@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    David Howells
     
  • Honour the O= flag that was passed to a higher level Makefile and then passed
    down as part of a tool build.

    To make this work, the top-level Makefile passes the original O= flag and
    subdir=tools to the tools/Makefile, and that in turn passes
    subdir=$(O)/$(subdir)/foodir when building tool foo in directory
    $(O)/$(subdir)/foodir (where the intervening slashes aren't added if an
    element is missing).

    For example, take perf. This is found in tools/perf/. Assume we're building
    into directory ~/zebra/, so we pass O=~/zebra to make. Dependening on where
    we run the build from, we see:

    make run in dir $(OUTPUT) dir
    ======================= ==================
    linux ~/zebra/tools/perf/
    linux/tools ~/zebra/perf/
    linux/tools/perf ~/zebra/

    and if O= is not set, we get:

    make run in dir $(OUTPUT) dir
    ======================= ==================
    linux linux/tools/perf/
    linux/tools linux/tools/perf/
    linux/tools/perf linux/tools/perf/

    The output directories are created by the descend function if they don't
    already exist.

    Signed-off-by: David Howells
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1378.1352379110@warthog.procyon.org.uk
    Signed-off-by: Arnaldo Carvalho de Melo

    David Howells
     
  • Define a Makefile function that can be called with $(call ...) to wrap
    the subdir make invocations in tools/Makefile.

    This will allow us in the next patch to insert bits in there to honour
    O= flags when called from the top-level Makefile.

    Signed-off-by: David Howells
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1378.1352379110@warthog.procyon.org.uk
    Signed-off-by: Arnaldo Carvalho de Melo

    David Howells
     

17 Aug, 2012

1 commit

  • When I did a compile of perf using a relative path for the output
    directory, the build failed when it tried to compile libtraceevent. This
    is because it continues to use the same relative path when the new
    working directory is in a different path.

    SUBDIR ../lib/traceevent/
    /bin/sh: line 0: cd: ../../../nobackup/perf/: No such file or directory
    Makefile:74: *** output directory "../../../nobackup/perf/" does not exist. Stop.
    make: *** [../../../nobackup/perf///libtraceevent.a] Error 2

    Make the path used an absolute path when building perf with O=.

    Boris:

    Teach Makefile to check whether the supplied O= directory exists and
    bail out if not. Reportedly, kernel dudes are idiots and need to be
    guarded so as not to shoot themselves in the foot when playing in the
    sandbox.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Steven Rostedt
    Acked-by: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120815163923.GD15989@aftab.osrc.amd.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Steven Rostedt
     

25 Apr, 2012

1 commit

  • Have building perf also build libtraceevent.a. Currently, perf does
    not use the code within libtraceevent.a, but it soon will.

    Signed-off-by: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Steven Rostedt
    Cc: Borislav Petkov
    Cc: Jiri Olsa
    Cc: Arun Sharma
    Cc: Namhyung Kim
    Signed-off-by: Frederic Weisbecker

    Steven Rostedt
     

12 Apr, 2012

2 commits

  • Use += instead of the bash syntax, as Sam Ravnborg suggests. Also, sort
    the -W options alphabetically and (... keep them sorted).

    Suggested-by: Sam Ravnborg
    Signed-off-by: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Link: http://lkml.kernel.org/r/1334162178-17152-3-git-send-email-bp@amd64.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Borislav Petkov
     
  • Put generic enough build settings which could be reused by other tools
    into a common Makefile.include file.

    This commit reintroduces QUIET_SUBDIR{0,1} (see a3d1ee10d1bf) which are
    going to be used in the following patches.

    Signed-off-by: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Link: http://lkml.kernel.org/r/1334162178-17152-2-git-send-email-bp@amd64.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Borislav Petkov