mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 04:29:03 +08:00
Add explicit flags for GMP and MPFR
Bump up arm version to 7 armv7-a has to be added as march, rpi4 fails to build with plain armv7 fixes #3847
This commit is contained in:
parent
f4aa9c5b0e
commit
abdcc88e9a
18
deps/GMP/GMP.cmake
vendored
18
deps/GMP/GMP.cmake
vendored
@ -17,11 +17,27 @@ if (MSVC)
|
|||||||
add_custom_target(dep_GMP SOURCES ${_output})
|
add_custom_target(dep_GMP SOURCES ${_output})
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
|
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
|
||||||
|
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||||
|
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
|
||||||
|
set(_gmp_build_tgt armv7)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
|
||||||
|
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
|
||||||
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
|
||||||
|
else ()
|
||||||
|
set(_gmp_build_tgt "") # let it guess
|
||||||
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(dep_GMP
|
ExternalProject_Add(dep_GMP
|
||||||
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
|
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
|
||||||
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
|
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
|
||||||
BUILD_IN_SOURCE ON
|
BUILD_IN_SOURCE ON
|
||||||
CONFIGURE_COMMAND ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" --with-pic
|
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
|
||||||
BUILD_COMMAND make -j
|
BUILD_COMMAND make -j
|
||||||
INSTALL_COMMAND make install
|
INSTALL_COMMAND make install
|
||||||
)
|
)
|
||||||
|
2
deps/MPFR/MPFR.cmake
vendored
2
deps/MPFR/MPFR.cmake
vendored
@ -21,7 +21,7 @@ else ()
|
|||||||
ExternalProject_Add(dep_MPFR
|
ExternalProject_Add(dep_MPFR
|
||||||
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
|
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
|
||||||
BUILD_IN_SOURCE ON
|
BUILD_IN_SOURCE ON
|
||||||
CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local --with-pic
|
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
|
||||||
BUILD_COMMAND make -j
|
BUILD_COMMAND make -j
|
||||||
INSTALL_COMMAND make install
|
INSTALL_COMMAND make install
|
||||||
DEPENDS dep_GMP
|
DEPENDS dep_GMP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user