title: Golang can't set rpath (Mac)?
body: <p>Hello currently I tried to set <code>-rpath</code> with pkg-config for golang, however I always get the following:</p>
  
  <pre><code>ld: -rpath can only be used when creating a dynamic final linked image
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Is there any way to fix it?</p>
  
  <p>I tried to use LDFLAGS with -Wl,rpath and I have a pkg-config with -rpath both are failing with the same error.</p>
  
  <p>I also stumbled on github on this: <a href="https://github.com/golang/go/issues/7293" rel="nofollow">https://github.com/golang/go/issues/7293</a>
  Which means that it should work?</p>