mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 18:20:36 +01:00
CMake: Make sure that position independent code is enabled properly
This commit is contained in:
1 parent
3c7eb2ac88
commit
ec6901b93d
2 files changed
+9
-1
No files matched your search
@@ -145,7 +145,7 @@ echo "Building libbacktrace..."
|
||||
rm -fr "libbacktrace-$LIBBACKTRACE"
|
||||
unzip "$LIBBACKTRACE.zip"
|
||||
cd "libbacktrace-$LIBBACKTRACE"
|
||||
./configure --prefix="$INSTALLDIR"
|
||||
./configure --prefix="$INSTALLDIR" --with-pic
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
@@ -270,6 +270,14 @@ endif()
|
||||
|
||||
set(PCSX2_WARNINGS ${DEFAULT_WARNINGS})
|
||||
|
||||
# Make sure we're building with position independent code enabled. Without this
|
||||
# check, on some platforms (e.g. Fedora 43) the right flags won't be passed to
|
||||
# the linker, resulting in a broken build when LTO is enabled.
|
||||
include(CheckPIESupported)
|
||||
check_pie_supported()
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# MacOS-specific things
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user