--- stderr
fatal: not a git repository (or any of the parent directories): .git
error occurred: Command "gcc" "-O3" "-ffunction-sections"
<snip>
Are you sure these two are related? Normally the .git error message you're
seeing is as a result of some part of the build process running "git log" or
similar to retrieve some information about the commit it was built from, that
ends up in the finished binary. For example:
$ cd $(mktemp -d)
$ git log
fatal: not a git repository (or any of the parent directories): .git
It would be odd for gcc to be invoking "git". Obviously we normally patch
away these git invocations from the respective Makefile, and/or set build
variables to override the data it's trying to embed (helpful for reproducible
builds).