Skip to content

Commit

Permalink
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent build fixes for certain distro environments, from Arnaldo Carvalho de Melo:

  * Problem on recent gcc on x86-32 related to strict alias issue for
    find_first_bit (Jiri Olsa).

  * OpenSuSE: BFD detection problems related to not explicitely listing all
    required libraries (Andi Kleen)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Mar 1, 2014
2 parents b6e53f3 + b39c2a5 commit af76815
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/perf/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ else
endif

ifeq ($(feature-libbfd), 1)
EXTLIBS += -lbfd
EXTLIBS += -lbfd -lz -liberty
endif

ifdef NO_DEMANGLE
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/config/feature-checks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test-libpython-version.bin:
$(BUILD) $(FLAGS_PYTHON_EMBED)

test-libbfd.bin:
$(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl

test-liberty.bin:
$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
Expand Down
4 changes: 3 additions & 1 deletion tools/perf/util/include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ static __always_inline unsigned long __ffs(unsigned long word)
return num;
}

typedef const unsigned long __attribute__((__may_alias__)) long_alias_t;

/*
* Find the first set bit in a memory region.
*/
static inline unsigned long
find_first_bit(const unsigned long *addr, unsigned long size)
{
const unsigned long *p = addr;
long_alias_t *p = (long_alias_t *) addr;
unsigned long result = 0;
unsigned long tmp;

Expand Down

0 comments on commit af76815

Please sign in to comment.