-O2 optimisation on lzloader when compiled with gcc 6.2.0 causes
the resulting image to fail to boot. Reducing the optimisation
resolves this problem.

Fixes #913

Signed-off-by: Rick Payne <ri...@rossfell.co.uk>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 0850f7c..8dd2371 100644
--- a/Makefile
+++ b/Makefile
@@ -458,7 +458,7 @@ $(out)/loader-stripped.elf.lz.o: $(out)/loader-stripped.elf 
$(out)/fastlz/lz
 
 $(out)/fastlz/lzloader.o: fastlz/lzloader.cc | generated-headers
        $(makedir)
-       $(call quiet, $(CXX) $(CXXFLAGS) -O2 -m32 -fno-instrument-functions -o 
$@ -c fastlz/lzloader.cc, CXX $<)
+       $(call quiet, $(CXX) $(CXXFLAGS) -O0 -m32 -fno-instrument-functions -o 
$@ -c fastlz/lzloader.cc, CXX $<)
 
 $(out)/lzloader.elf: $(out)/loader-stripped.elf.lz.o $(out)/fastlz/lzloader.o 
arch/x64/lzloader.ld \
        $(out)/fastlz/fastlz.o
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to