On Wed, Nov 27, 2013 at 11:43:23PM +0100, Jiri Olsa wrote:
> On Wed, Nov 27, 2013 at 05:16:34PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Jean Pihet <[email protected]>
> > 
> > Use the per-feature check flags for the unwinding feature in order to
> > correctly compile the libunwind and libunwind-debug-frame feature
> > checks.
> > 
> > Tested on ARMv7 and ARMv8 with 'make DEBUG=1 LIBUNWIND_DIR=/usr/local -C
> > tools/perf'
> 
> this one makes my build fail:
> 
> [jolsa@krava perf]$ make
>   BUILD:   Doing 'make -j4' parallel build
> 
> Auto-detecting system features:
> ...                     backtrace: [ on  ]
> ...                         dwarf: [ on  ]
> ...                fortify-source: [ on  ]
> ...                         glibc: [ on  ]
> ...                          gtk2: [ on  ]
> ...                  gtk2-infobar: [ on  ]
> ...                      libaudit: [ on  ]
> ...                        libbfd: [ on  ]
> ...                        libelf: [ on  ]
> ...             libelf-getphdrnum: [ on  ]
> ...                   libelf-mmap: [ on  ]
> ...                       libnuma: [ on  ]
> ...                       libperl: [ on  ]
> ...                     libpython: [ on  ]
> ...             libpython-version: [ on  ]
> ...                      libslang: [ on  ]
> ...                     libunwind: [ OFF ]
> ...                       on-exit: [ on  ]
> ...                stackprotector: [ on  ]
> ...            stackprotector-all: [ on  ]
> ...                       timerfd: [ on  ]
> 
> config/Makefile:335: No libunwind found, disabling post unwind support. 
> Please install libunwind-dev[el] >= 1.1
> 
> ...
> 
>   LINK     perf
> /bin/ld: cannot find -lunwind
> /bin/ld: cannot find -lunwind-x86_64
> collect2: error: ld returned 1 exit status
> make[1]: *** [perf] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [all] Error 2
> 
> 
> I haven't checked this one.. will do tomorrow


we need to plug libunwind flags/libs only if
the $(feature-libunwind) is enabled..

NO_LIBUNWIND - user's decision not to link with libunwind or
               architecture that does not support it

$(feature-libunwind) - if it's actually installed

attached change fixies that for me, feel free to use/merge it

jirka

---
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 80ea6d8..5f531db 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -345,12 +345,12 @@ ifndef NO_LIBUNWIND
       # non-ARM has no dwarf_find_debug_frame() function:
       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
     endif
-  endif
 
-  CFLAGS += -DHAVE_LIBUNWIND_SUPPORT
-  EXTLIBS += $(LIBUNWIND_LIBS)
-  CFLAGS += $(LIBUNWIND_CFLAGS)
-  LDFLAGS += $(LIBUNWIND_LDFLAGS)
+    CFLAGS += -DHAVE_LIBUNWIND_SUPPORT
+    CFLAGS += $(LIBUNWIND_CFLAGS)
+    EXTLIBS += $(LIBUNWIND_LIBS)
+    LDFLAGS += $(LIBUNWIND_LDFLAGS)
+  endif # ifneq ($(feature-libunwind), 1)
 endif
 
 ifndef NO_LIBAUDIT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to