Em Sat, Jun 27, 2009 at 11:44:01AM -0400, Samuel Bronson escreveu:
> Speaking of the REDHAT/FEDORA conditional,
>
> (a) why doesn't it have a comment explaining what it's for? -- that
> is, what is different on redhat/fedora, and what it does to compensate
> for them
>
> (b) why is it *after* the check for the "dwfl_module_build_id"
> symbol, so that the REDHAT/FEDORA stuff can't fix up the missing
> variables and allow the symbol check a chance to run?
Just added comments for both cases, please take a look and see if it
makes it clear for you:
commit f96099b4c519e83ab2421c2e7660e132f63ddec7
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Date: Sat Jun 27 13:32:20 2009 -0300
cmake: Add comments explaining build_id and fedora/rh detection
Suggested-by: Samuel Bronson <naesten@xxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
diff --git a/cmake/modules/FindDWARF.cmake b/cmake/modules/FindDWARF.cmake
index 76cdb3f..f4feec4 100644
--- a/cmake/modules/FindDWARF.cmake
+++ b/cmake/modules/FindDWARF.cmake
@@ -47,6 +47,10 @@ if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AN
set(DWARF_LIBRARIES ${DWARF_LIBRARY} ${ELF_LIBRARY} ${EBL_LIBRARY})
set(CMAKE_REQUIRED_LIBRARIES ${DWARF_LIBRARIES})
+ # check if libdw have the dwfl_module_build_id routine, i.e. if it supports the buildid
+ # mechanism to match binaries to detached debug info sections (the -debuginfo packages
+ # in distributions such as fedora). We do it against libelf because, IIRC, some distros
+ # include libdw linked statically into libelf.
check_library_exists(elf dwfl_module_build_id "" HAVE_DWFL_MODULE_BUILD_ID)
else (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AND EBL_LIBRARY)
set(DWARF_FOUND FALSE)
@@ -63,6 +67,9 @@ if (DWARF_FOUND)
endif (NOT DWARF_FIND_QUIETLY)
else (DWARF_FOUND)
if (DWARF_FIND_REQUIRED)
+ # Check if we are in a Red Hat (RHEL) or Fedora system to tell
+ # exactly which packages should be installed. Please send
+ # patches for other distributions.
find_path(FEDORA fedora-release /etc)
find_path(REDHAT redhat-release /etc)
if (FEDORA OR REDHAT)
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]