kdesupport/strigi [POSSIBLY UNSAFE]
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Mon Mar 19 12:06:07 GMT 2007
Von: Dirk Mueller <mueller at kde.org>
> On Monday, 19. March 2007, Christian Ehrlicher wrote:
>
> > As I said in the other mail - the check was used from
> > FindKDE4Internal.cmake - maybe something is wrong there too?
>
> The check in FindKDE4Internal.cmake looks like this:
>
> # visibility support
> check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_GCC_VISIBILITY)
>
> # get the gcc version
> exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE
> _gcc_version_info)
>
> string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
> _gcc_version "${_gcc_version_info}")
> # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
> patch
> level, handle this here:
> if (NOT _gcc_version)
> string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
> _gcc_version "${_gcc_version_info}")
> endif (NOT _gcc_version)
>
> macro_ensure_version("4.1.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_1)
> macro_ensure_version("4.2.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_2)
>
> set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE)
> if (GCC_IS_NEWER_THAN_4_1)
> exec_program(${CMAKE_C_COMPILER} ARGS -v OUTPUT_VARIABLE
> _gcc_alloc_info)
> string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)"
> _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}")
> endif (GCC_IS_NEWER_THAN_4_1)
>
> if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT
> _GCC_COMPILED_WITH_BAD_ALLOCATOR)
> set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
> set (KDE4_C_FLAGS "-fvisibility=hidden")
>
> if (GCC_IS_NEWER_THAN_4_2)
> set
> (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
> endif (GCC_IS_NEWER_THAN_4_2)
> else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT
> _GCC_COMPILED_WITH_BAD_ALLOCATOR)
> set (__KDE_HAVE_GCC_VISIBILITY 0)
> endif (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT
> _GCC_COMPILED_WITH_BAD_ALLOCATOR)
>
>
>
> The check in strigi looks like this:
>
> check_cxx_compiler_flag(-fvisibility=hidden
> __STRIGI_HAVE_GCC_VISIBILITY)
>
>
Ok, then really something is missing. Maybe this check should be moved into an own file to avoid duplicating the code.
Christian
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the kde-core-devel
mailing list