20 Dec, 2013

2 commits

  • Adding global QUIET_CC_FPIC build output variable and getting rid of
    local print_fpic_compile and print_plugin_obj_compile.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1387460527-15030-6-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Moving QUIET_(CLEAN|INSTAL) variables into:

    tools/scripts/Makefile.include

    to be usable by other tools. The change to use them in libtraceevent is
    in following patches.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1387460527-15030-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

11 Oct, 2013

2 commits

  • The various build lines from libtraceevent and perf mix up during a
    parallel build and produce unaligned output like:

    CC builtin-buildid-list.o
    CC builtin-buildid-cache.o
    CC builtin-list.o
    CC FPIC trace-seq.o
    CC builtin-record.o
    CC FPIC parse-filter.o
    CC builtin-report.o
    CC builtin-stat.o
    CC FPIC parse-utils.o
    CC FPIC kbuffer-parse.o
    CC builtin-timechart.o
    CC builtin-top.o
    CC builtin-script.o
    BUILD STATIC LIB libtraceevent.a
    CC builtin-probe.o
    CC builtin-kmem.o
    CC builtin-lock.o

    To solve this, harmonize all the build message alignments to be similar
    to the kernel's kbuild output: prefixed by two spaces and 11-char wide.

    After the patch the output looks pretty tidy, even if output lines get
    mixed up:

    CC builtin-annotate.o
    FLAGS: * new build flags or cross compiler
    CC builtin-bench.o
    AR liblk.a
    CC bench/sched-messaging.o
    CC FPIC event-parse.o
    CC bench/sched-pipe.o
    CC FPIC trace-seq.o
    CC bench/mem-memcpy.o
    CC bench/mem-memset.o
    CC FPIC parse-filter.o
    CC builtin-diff.o
    CC builtin-evlist.o
    CC builtin-help.o

    Signed-off-by: Ingo Molnar
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1381312169-17354-3-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     
  • 'make clean' used to show all the rm lines, which isn't really
    informative in any way and spams the console.

    Implement summary output:

    comet:~/tip/tools/perf> make clean
    CLEAN libtraceevent
    CLEAN liblk
    CLEAN config
    CLEAN core-objs
    CLEAN core-progs
    CLEAN core-gen
    CLEAN Documentation
    CLEAN python

    'make clean V=1' will still show the old, detailed output.

    Signed-off-by: Ingo Molnar
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1381312169-17354-2-git-send-email-mingo@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

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