File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ string(REPLACE "#include \"openssl/ms/applink.c\"" "" FILE_CONTENTS "${FILE_CONT
107107file (WRITE ${BOOTGEN_SOURCE} /main.cpp "${FILE_CONTENTS} " )
108108
109109add_library (bootgen-lib STATIC ${libsources} )
110+ # bootgen must be compiled with PIE/PIC, irrespective of the remainder of
111+ # the project, because auditwheel repair's patchelf-based RPATH rewrite
112+ # corrupts the non-PIE binary
113+ set_target_properties (bootgen-lib PROPERTIES POSITION_INDEPENDENT_CODE ON )
110114if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" )
111115 set (bootgen_warning_ignores
112116 -Wno-cast-qual
@@ -154,6 +158,7 @@ install(
154158 DESTINATION include)
155159
156160add_executable (bootgen ${BOOTGEN_SOURCE} /main.cpp )
161+ set_target_properties (bootgen PROPERTIES POSITION_INDEPENDENT_CODE ON )
157162target_include_directories (bootgen PUBLIC ${BOOTGEN_SOURCE} ${OPENSSL_INCLUDE_DIR}
158163 ${CMAKE_CURRENT_BINARY_DIR } /include )
159164target_compile_options (bootgen PRIVATE ${bootgen_warning_ignores} )
You can’t perform that action at this time.
0 commit comments