Changeset 207826 in webkit


Ignore:
Timestamp:
Oct 25, 2016 10:27:00 AM (7 years ago)
Author:
Konstantin Tokarev
Message:

[cmake] Don't add -fPIC flag when on Windows (MinGW)
https://bugs.webkit.org/show_bug.cgi?id=163949

Reviewed by Michael Catanzaro.

-fPIC flag does not do anything on Windows and produces warning noise
with MinGW. There is no position independent code in Unix sense on
32-bit Windows, and 64-bit Windows code is always relocatable.

For reference see
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00836.html

  • Source/cmake/WebKitHelpers.cmake:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r207668 r207826  
     12016-10-25  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [cmake] Don't add -fPIC flag when on Windows (MinGW)
     4        https://bugs.webkit.org/show_bug.cgi?id=163949
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        -fPIC flag does not do anything on Windows and produces warning noise
     9        with MinGW. There is no position independent code in Unix sense on
     10        32-bit Windows, and 64-bit Windows code is always relocatable.
     11
     12        For reference see
     13        https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00836.html
     14
     15        * Source/cmake/WebKitHelpers.cmake:
     16
    1172016-10-21  Csaba Osztrogonác  <ossy@webkit.org>
    218
  • trunk/Source/cmake/WebKitHelpers.cmake

    r206437 r207826  
    1111        endif ()
    1212
    13         get_target_property(TARGET_TYPE ${_target} TYPE)
    14         if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
    15             set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
     13        if (NOT WIN32)
     14            get_target_property(TARGET_TYPE ${_target} TYPE)
     15            if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
     16                set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
     17            endif ()
    1618        endif ()
    1719
Note: See TracChangeset for help on using the changeset viewer.