Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/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>
This commit is contained in:
Ingo Molnar
2014-03-01 10:13:25 +01:00
3 changed files with 5 additions and 3 deletions

View File

@@ -478,7 +478,7 @@ else
endif endif
ifeq ($(feature-libbfd), 1) ifeq ($(feature-libbfd), 1)
EXTLIBS += -lbfd EXTLIBS += -lbfd -lz -liberty
endif endif
ifdef NO_DEMANGLE ifdef NO_DEMANGLE

View File

@@ -121,7 +121,7 @@ test-libpython-version.bin:
$(BUILD) $(FLAGS_PYTHON_EMBED) $(BUILD) $(FLAGS_PYTHON_EMBED)
test-libbfd.bin: test-libbfd.bin:
$(BUILD) -DPACKAGE='"perf"' -lbfd -ldl $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
test-liberty.bin: test-liberty.bin:
$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty

View File

@@ -87,13 +87,15 @@ static __always_inline unsigned long __ffs(unsigned long word)
return num; return num;
} }
typedef const unsigned long __attribute__((__may_alias__)) long_alias_t;
/* /*
* Find the first set bit in a memory region. * Find the first set bit in a memory region.
*/ */
static inline unsigned long static inline unsigned long
find_first_bit(const unsigned long *addr, unsigned long size) 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 result = 0;
unsigned long tmp; unsigned long tmp;