$OpenBSD: patch-scripts_genie_lua,v 1.18 2021/05/01 13:34:18 fcambus Exp $

- Set OPT_FLAGS even when OPTIMIZE is unset, to allow passing CXXFLAGS

Index: scripts/genie.lua
--- scripts/genie.lua.orig
+++ scripts/genie.lua
@@ -846,17 +846,19 @@ if _OPTIONS["NOWERROR"]==nil then
 	}
 end
 
+-- add optional flags
+if _OPTIONS["OPT_FLAGS"] then
+	buildoptions {
+		_OPTIONS["OPT_FLAGS"]
+	}
+end
+
 -- if we are optimizing, include optimization options
 if _OPTIONS["OPTIMIZE"] then
 	buildoptions {
 		"-O".. _OPTIONS["OPTIMIZE"],
 		"-fno-strict-aliasing"
 	}
-	if _OPTIONS["OPT_FLAGS"] then
-		buildoptions {
-			_OPTIONS["OPT_FLAGS"]
-		}
-	end
 	if _OPTIONS["LTO"]=="1" then
 		buildoptions {
 -- windows native mingw GCC 5.2 fails with -flto=x with x > 1. bug unfixed as of this commit
