When crosscompiling, this change skips the code that interrogates the
host for compilation options. Since it isn't easy to detect the right
options for the crosscompile case, the Makefile expects the user to have
defined $(CC), $(ERTS_INCLUDE_DIR), $(ERL_INTERFACE_INCLUDE_DIR) and
several other variables. Luckily, this is done automatically by at least
a couple build systems that are aware of crosscompiling Erlang projects.
The existing code almost worked for the crosscompile case except for
wordsize detection. This change skips this and all of the detection logic
to avoid any chance of intermingling target and host options.
Crosscompile detection is done by looking for the
$(CROSSCOMPILE) variable since it is usually set as well when
crosscompiling.
This change was verified by compiling and using procket on a
Nerves-based project.
When crosscompiling, this change skips the code that interrogates the host for compilation options. Since it isn't easy to detect the right options for the crosscompile case, the Makefile expects the user to have defined $(CC), $(ERTS_INCLUDE_DIR), $(ERL_INTERFACE_INCLUDE_DIR) and several other variables. Luckily, this is done automatically by at least a couple build systems that are aware of crosscompiling Erlang projects.
The existing code almost worked for the crosscompile case except for wordsize detection. This change skips this and all of the detection logic to avoid any chance of intermingling target and host options.
Crosscompile detection is done by looking for the $(CROSSCOMPILE) variable since it is usually set as well when crosscompiling.
This change was verified by compiling and using procket on a Nerves-based project.