AFAICT, the issue is with external linking, as the external (ie: system) linker by default will link against the latest OSX only. I have two solutions that worked for me building on 10.9 for 10.6, but YMMV:
- Don't use the external linker, this can be done by either not using CGO, as any user-built cgo package will switch to external linking, or by forcing the internal linker to be used (eg: go build -ldflags -linkmode=internal).
- Set the environment variable MACOSX_DEPLOYMENT_TARGET=10.6 (10.7 in your case).
The drawback with the first solution is that the purpose of external linking was to provide better support for user-made CGO packages than the internal linker could provide, but AFAIK, the majority of problems than can occur will manifest at link time, or at program startup. If you can minimize or altogether eliminate your use of CGO, your program will be more portable and easier to build elsewhere.
The first solution changes the output of "otool -L" to have versions of "0.0.0" across the board (I assume the internal linker can't express version requirements very well), but the second solution didn't change the version strings at all.
Both solutions will obviously fail if you attempt to use 10.9 exclusive functionality, intentionally or not, in your code. I believe that if you use MACOSX_DEPLOYMENT_TARGET (which uses weak linking), you don't find out about unresolved symbols until they are actually used at runtime. I'm not certain about how an internally linked binary (option 1) would fail; it might do the same as option 2, or it might be "nicer" and refuse to start.
Also, I only tested an app that used stdlib cgo packages (net, and crypto/tls in a http server). I did force external linking, and it did "successfully" fail to start on the 10.6 machine with a similar error you what got (Illegal instruction).