Skip to content

Commit

Permalink
🔨 Port libsdl2_net required for macOS simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 6, 2021
1 parent 149cbe7 commit 9922410
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,9 @@ void GcodeSuite::process_next_command() {
* G-code "macros" to be called from within other G-code handlers.
*/

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"

void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
PGM_P pgcode = FTOP(fgcode);
char * const saved_cmd = parser.command_ptr; // Save the parser state
Expand All @@ -1117,6 +1120,8 @@ void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
parser.parse(saved_cmd); // Restore the parser state
}

#pragma GCC diagnostic pop

void GcodeSuite::process_subcommands_now(char * gcode) {
char * const saved_cmd = parser.command_ptr; // Save the parser state
for (;;) {
Expand Down
11 changes: 7 additions & 4 deletions ini/native.ini
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
#
# Simulator for macOS (MacPorts)
#
# sudo port install gcc10 gdb glm libsdl2 freetype
# sudo port install gcc10 gdb glm libsdl2 libsdl2_net freetype
# sudo port install ld64 @3_3 +ld64_xcode
# sudo port uninstall ld64 ld64-latest
#
# cd /opt/local/bin
# sudo rm -f gcc g++ cc
# sudo ln gcc-mp-10 gcc ; sudo ln g++-mp-10 g++ ; sudo ln g++ cc
# cd -
# sudo ln -s gcc-mp-10 gcc ; sudo ln -s g++-mp-10 g++ ; sudo ln -s g++ cc
# This step may be obsolete:
# sudo port uninstall ld64 ld64-latest
#
# cd -
#
# Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
# If Xcode is installed be sure to run `xcode-select --install` first.
Expand Down

0 comments on commit 9922410

Please sign in to comment.