Skip to content

Commit

Permalink
Add cmake -E env to the remaining command_wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
FtZPetruska committed Jul 29, 2023
1 parent bb4e3b5 commit 4024091
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
GIT_REPOSITORY https://github.com/Meinersbur/isl
GIT_TAG isl-${ISL_VERSION}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh
COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
--build=${build_native}
--host=${toolchain_host}
--prefix=${toolchain_deps_dir}
Expand All @@ -297,7 +298,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
URL https://github.com/libexpat/libexpat/releases/download/R_2_3_0/expat-${EXPAT_VERSION}.tar.bz2
URL_HASH ${EXPAT_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
CONFIGURE_COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
--build=${build_native}
--host=${toolchain_host}
--prefix=${toolchain_deps_dir}
Expand Down Expand Up @@ -569,7 +570,7 @@ ExternalProject_Add(newlib
GIT_TAG ${NEWLIB_TAG}
${GIT_SHALLOW_SUPPORT}
# Pass the compiler_target_tools here so newlib picks up the fresh gcc-base compiler
CONFIGURE_COMMAND ${compiler_flags} ${toolchain_tools} ${compiler_target_tools}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flag} ${toolchain_tools} ${compiler_target_tools}
${wrapper_command} <SOURCE_DIR>/configure "CFLAGS_FOR_TARGET=-g -O2 -ffunction-sections -fdata-sections"
--build=${build_native}
--host=${host_native}
Expand All @@ -583,7 +584,7 @@ ExternalProject_Add(newlib
--enable-newlib-long-time_t
--disable-nls
--enable-newlib-iconv
BUILD_COMMAND ${compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
BUILD_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
INSTALL_COMMAND $(MAKE) install DESTDIR=${CMAKE_INSTALL_PREFIX}
# Install a copy of newlib in the toolchain directory (required for pthread-embedded target)
COMMAND $(MAKE) install DESTDIR=${toolchain_build_install_dir}
Expand Down Expand Up @@ -641,7 +642,7 @@ ExternalProject_Add(pthread-embedded
# TODO: this project should have a proper makefile to support out-of-source builds
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ${compiler_flags} ${wrapper_command} $(MAKE)
BUILD_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} $(MAKE)
-C <SOURCE_DIR>/platform/vita ${pthread_tools} PREFIX=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND $(MAKE) -C <SOURCE_DIR>/platform/vita PREFIX=${CMAKE_INSTALL_PREFIX}/${target_arch} install
# Install into the toolchain directory (required for libgomp target)
Expand Down

0 comments on commit 4024091

Please sign in to comment.