@@ -284,7 +284,8 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
284
284
GIT_REPOSITORY https://github.com/Meinersbur/isl
285
285
GIT_TAG isl-${ISL_VERSION}
286
286
DOWNLOAD_DIR ${DOWNLOAD_DIR}
287
- CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
287
+ CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh
288
+ COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
288
289
--build =${build_native}
289
290
--host=${toolchain_host}
290
291
--prefix =${toolchain_deps_dir}
@@ -297,7 +298,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
297
298
URL https://github.com/libexpat/libexpat/releases/download/R_2_3_0/expat-${EXPAT_VERSION} .tar.bz2
298
299
URL_HASH ${EXPAT_HASH}
299
300
DOWNLOAD_DIR ${DOWNLOAD_DIR}
300
- CONFIGURE_COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
301
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${ compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
301
302
--build =${build_native}
302
303
--host=${toolchain_host}
303
304
--prefix =${toolchain_deps_dir}
@@ -569,7 +570,7 @@ ExternalProject_Add(newlib
569
570
GIT_TAG ${NEWLIB_TAG}
570
571
${GIT_SHALLOW_SUPPORT}
571
572
# Pass the compiler_target_tools here so newlib picks up the fresh gcc-base compiler
572
- CONFIGURE_COMMAND ${compiler_flags } ${toolchain_tools} ${compiler_target_tools}
573
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flag } ${toolchain_tools} ${compiler_target_tools}
573
574
${wrapper_command} <SOURCE_DIR>/configure "CFLAGS_FOR_TARGET=-g -O2 -ffunction-sections -fdata-sections"
574
575
--build =${build_native}
575
576
--host=${host_native}
@@ -583,7 +584,7 @@ ExternalProject_Add(newlib
583
584
--enable-newlib-long-time_t
584
585
--disable-nls
585
586
--enable-newlib-iconv
586
- BUILD_COMMAND ${compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
587
+ BUILD_COMMAND ${CMAKE_COMMAND} -E env ${ compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
587
588
INSTALL_COMMAND $(MAKE) install DESTDIR=${CMAKE_INSTALL_PREFIX}
588
589
# Install a copy of newlib in the toolchain directory (required for pthread-embedded target)
589
590
COMMAND $(MAKE) install DESTDIR=${toolchain_build_install_dir}
@@ -641,7 +642,7 @@ ExternalProject_Add(pthread-embedded
641
642
# TODO: this project should have a proper makefile to support out-of-source builds
642
643
BUILD_IN_SOURCE 1
643
644
CONFIGURE_COMMAND ""
644
- BUILD_COMMAND ${compiler_flags} ${wrapper_command} $(MAKE)
645
+ BUILD_COMMAND ${CMAKE_COMMAND} -E env ${ compiler_flags} ${wrapper_command} $(MAKE)
645
646
-C <SOURCE_DIR>/platform/vita ${pthread_tools} PREFIX =${CMAKE_INSTALL_PREFIX}
646
647
INSTALL_COMMAND $(MAKE) -C <SOURCE_DIR>/platform/vita PREFIX =${CMAKE_INSTALL_PREFIX} /${target_arch} install
647
648
# Install into the toolchain directory (required for libgomp target)
0 commit comments