Skip to content

Commit

Permalink
Fix cross-compilation
Browse files Browse the repository at this point in the history
Use the cross-compiler and not the host version.
  • Loading branch information
bkuhls committed Jul 22, 2017
1 parent e302833 commit b9dda49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ include_directories(${OpenGL_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/${rsxs_dir}/src/skyrocket
${PROJECT_SOURCE_DIR}/${rsxs_dir}/src/solarwinds)


get_filename_component( COMPILER_FILENAME "${CMAKE_C_COMPILER}" NAME )
string( REGEX REPLACE "-[^-]+$" ""
TOOLCHAIN_NAME "${COMPILER_FILENAME}" )

include(ExternalProject)
set(update_command "")
if(BOOTSTRAP_IN_TREE OR NOT DEFINED BOOTSTRAP_IN_TREE)
Expand All @@ -53,7 +58,10 @@ endif()
externalproject_add(rsxs SOURCE_DIR ${PROJECT_SOURCE_DIR}/${rsxs_dir}
CONFIGURE_COMMAND ${configure_start}
ac_cv_type__Bool=yes
gl_cv_func_gettimeofday_clobber=no
ac_cv_func_malloc_0_nonnull=yes
--prefix=<INSTALL_DIR>
--host=${TOOLCHAIN_NAME}
--without-xscreensaver
--disable-cyclone
--disable-euphoria
Expand Down

1 comment on commit b9dda49

@cody2035
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you force us to use the cross-compiler? I can't build this on my computer. I get an error message saying: checking host system type... Invalid configuration cc': machine cc' not recognized. If I manually replace "--host=${TOOLCHAIN_NAME}" with "--host=x86_64-pc-linux-gnu", it builds just fine.

Please sign in to comment.