-
-
Save foosel/f86d6a729c0187ff8a82 to your computer and use it in GitHub Desktop.
Patch for CuraEngine's Makefile that should make it compilable on a Raspberry Pi. From http://umforum.ultimaker.com/index.php?/topic/5943-recent-build-of-curaengine-wont-compile-on-raspberry-pi/?p=58539
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Makefile.orig 2014-10-01 07:56:20.923057917 +0000 | |
+++ Makefile 2014-10-01 07:58:35.839060822 +0000 | |
@@ -12,6 +12,8 @@ | |
CXX ?= g++ | |
CFLAGS += -c -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -std=c++11 -DVERSION=\"$(VERSION)\" -isystem libs | |
+FLTO = #allow for enable/disabling of link-time-optimization. Pass FLTO=-flto to enable. Default is disabled. | |
+ | |
ifeq ($(BUILD_TYPE),DEBUG) | |
CFLAGS+=-ggdb -Og -g | |
endif | |
@@ -38,8 +40,8 @@ | |
ifeq ($(OS),Windows_NT) | |
#For windows make it large address aware, which allows the process to use more then 2GB of memory. | |
EXECUTABLE := $(EXECUTABLE).exe | |
- CFLAGS += -march=pentium4 -flto | |
- LDFLAGS += -Wl,--large-address-aware -lm -lwsock32 -flto | |
+ CFLAGS += -march=pentium4 $(FLTO) | |
+ LDFLAGS += -Wl,--large-address-aware -lm -lwsock32 $(FLTO) | |
MKDIR_PREFIX = mkdir -p | |
else | |
MKDIR_PREFIX = mkdir -p | |
@@ -49,8 +51,8 @@ | |
ifeq ($(BUILD_TYPE),DEBUG) | |
LDFLAGS += --static | |
else | |
- CFLAGS += -flto | |
- LDFLAGS += --static -flto | |
+ CFLAGS += $(FLTO) | |
+ LDFLAGS += --static $(FLTO) | |
endif | |
endif | |
ifeq ($(UNAME), Darwin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment