Skip to content

Commit

Permalink
Fixed Haiku static build with PIC enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Feb 13, 2024
1 parent 879f397 commit bc5081f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/modules/DetectArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ macro(detect_architecture variable)
${CMAKE_BINARY_DIR}
${__check_architecture_size_dir}/DetectArchitecture.c
OUTPUT_VARIABLE OUTPUT
CMAKE_FLAGS -DCMAKE_POSITION_INDEPENDENT_CODE=OFF
COPY_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/DetectArchitecture.bin)

if(HAVE_${variable})
Expand Down
2 changes: 2 additions & 0 deletions cmake/modules/DetectFPUApi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ macro(detect_fpu_mode variable)
${CMAKE_BINARY_DIR}
${__check_fpu_mode_dir}/DetectFpuAbi.c
OUTPUT_VARIABLE OUTPUT
CMAKE_FLAGS -DCMAKE_POSITION_INDEPENDENT_CODE=OFF
COPY_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/DetectFpuAbi.bin)

if(HAVE_${variable})
Expand Down Expand Up @@ -42,6 +43,7 @@ macro(detect_fpu_abi variable)
${CMAKE_BINARY_DIR}
${__check_fpu_mode_dir}/DetectFpuAbi.c
OUTPUT_VARIABLE OUTPUT
CMAKE_FLAGS -DCMAKE_POSITION_INDEPENDENT_CODE=OFF
COPY_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/DetectFpuAbi.bin)

if(HAVE_${variable})
Expand Down
2 changes: 2 additions & 0 deletions src/host/cmake/buildvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0...3.5)

project(buildvm)

set(CMAKE_POSITION_INDEPENDENT_CODE OFF)

set(EXTRA_COMPILER_FLAGS_FILE "" CACHE PATH "Location of a file to specify extra compiler flags." )
set(EXTRA_COMPILER_FLAGS "")
if (EXISTS ${EXTRA_COMPILER_FLAGS_FILE})
Expand Down
2 changes: 2 additions & 0 deletions src/host/cmake/minilua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0...3.5)

project(minilua)

set(CMAKE_POSITION_INDEPENDENT_CODE OFF)

find_library(LIBM_LIBRARIES NAMES m)

add_executable(minilua ../../minilua.c)
Expand Down

0 comments on commit bc5081f

Please sign in to comment.