Fix gcc compile test with proper flag ordering Upstream-commit: 3771a1713bac935721ffe2ed7c828a47dbe4924e Component: engine