浏览代码

Remove -fPIC from extra CMake CFLAGS

Building position independant code is the default behavior for CMake
when compiling shared library targets.
pull/269/head
Jonathan GUILLOT 2 个月前
父节点
当前提交
82ea43eb52
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      devLib/CMakeLists.txt
  2. +1
    -1
      wiringPi/CMakeLists.txt

+ 1
- 1
devLib/CMakeLists.txt 查看文件

@@ -22,7 +22,7 @@ set(HEADERS
)

# Compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Winline -pipe -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Winline -pipe")

# Add the library target
add_library(wiringPiDev SHARED ${SRC})


+ 1
- 1
wiringPi/CMakeLists.txt 查看文件

@@ -43,7 +43,7 @@ set(HEADERS
wpiExtensions.h
)
# Compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Winline -pipe -fPIC -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Winline -pipe -Wformat-security")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-soname,libwiringPi.so${WIRINGPI_SONAME_SUFFIX}")

# Read version from version.h


正在加载...
取消
保存