$OpenBSD: patch-erts_emulator_Makefile_in,v 1.8 2010/09/13 17:31:03 sebastia Exp $
--- erts/emulator/Makefile.in.orig	Tue Mar 16 11:51:29 2010
+++ erts/emulator/Makefile.in	Tue Mar 16 11:54:42 2010
@@ -209,13 +209,7 @@ ifeq (@EMU_LOCK_CHECKING@,yes)
 NO_INLINE_FUNCTIONS=true
 endif
 
-ifneq ($(filter tile-%,$(TARGET)), )
-# -O2 generally produces faster for tile-cc, because the code is smaller.
-# Since tile-cc looks like gcc, we need to override the normal gcc -O3 setting.
 OPT_LEVEL = -O2
-else
-OPT_LEVEL = -O3
-endif
 
 ifeq ($(GCC),yes)
 ifeq ($(NO_INLINE_FUNCTIONS),true)
@@ -616,7 +610,7 @@ endif
 
 
 $(OBJDIR)/%.o: beam/%.c
-	$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+	$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
 
 else
 
