[x265] [PATCH 2 of 2] Always use -DPIC/-fPIC when targetting x64
Steve Borho
steve at borho.org
Fri Sep 6 18:52:51 CEST 2013
On Fri, Sep 6, 2013 at 9:13 AM, <funman at videolan.org> wrote:
> # HG changeset patch
> # User Rafaël Carré <funman at videolan.org>
> # Date 1378476609 -7200
> # Node ID ae8499191c12af840d47def2654b79a4e886c96b
> # Parent 63364b91b72a183ed18d2e9d22a4e7070b3bae60
> Always use -DPIC/-fPIC when targetting x64
>
> Fix link failure when making a shared object on Linux
>
queued, thanks
> diff -r 63364b91b72a -r ae8499191c12 source/CMakeLists.txt
> --- a/source/CMakeLists.txt Fri Sep 06 01:45:16 2013 -0500
> +++ b/source/CMakeLists.txt Fri Sep 06 16:10:09 2013 +0200
> @@ -13,6 +13,7 @@
> if ("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
> set(X64 1)
> add_definitions(-DX86_64=1)
> + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
> endif()
>
> # Enforce coding standards. Full warnings and warnings as errors
> diff -r 63364b91b72a -r ae8499191c12
> source/cmake/CMakeASM_YASMInformation.cmake
> --- a/source/cmake/CMakeASM_YASMInformation.cmake Fri Sep 06
> 01:45:16 2013 -0500
> +++ b/source/cmake/CMakeASM_YASMInformation.cmake Fri Sep 06
> 16:10:09 2013 +0200
> @@ -2,9 +2,9 @@
> set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
>
> if(X64)
> - set(ASM_FLAGS "-DARCH_X86_64=1 -m amd64")
> + set(ASM_FLAGS "-DARCH_X86_64=1 -m amd64 -DPIC")
> if(APPLE)
> - set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho64 -DPREFIX
> -DPIC")
> + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho64 -DPREFIX")
> elseif(UNIX)
> set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f elf64")
> else()
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
--
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.videolan.org/private/x265-devel/attachments/20130906/ceb408c0/attachment.html>
More information about the x265-devel
mailing list