title: I don't understand -Wl,-rpath -Wl,
body: <p>For convenience I added the relevant manpages below.</p>
  <p>My (mis)understanding first: If I need to separate options with <code>,</code>, that means that the second <code>-Wl</code> is not another option because it comes before <code>,</code> which means it is an argument to the <code>-rpath</code> option.</p>
  <p>I don't understand how <code>-rpath</code> can have a <code>-Wl,.</code> argument!</p>
  <p>What would make sense in my mind would be this:</p>
  <pre><code>-Wl,-rpath .
  </code></pre>
  <p>This should invoke <code>-rpath</code> linker option with the current directory argument.</p>
  <hr />
  <p>man gcc:</p>
  <blockquote>
  <p>-Wl,option</p>
  <p>Pass option as an option to the
  linker. If option contains commas, it
  is split into multiple options at the
  commas. You can use this syntax to
  pass an argument to the option. For
  example, <code>-Wl,-Map,output.map</code> passes
  <code>-Map output.map</code> to the linker. When
  using the GNU linker, you can also get
  the same effect with
  `-Wl,-Map=output.map'.</p>
  </blockquote>
  <p>man ld:</p>
  <blockquote>
  <p>-rpath=dir</p>
  </blockquote>
  <blockquote>
  <p>Add a directory to the
  runtime library search path. This is
  used when linking an ELF executable
  with shared objects. All -rpath
  arguments are concatenated and passed
  to the runtime linker, which uses them
  to locate shared objects at runtime.
  The -rpath option is also used when
  locating shared objects which are
  needed by shared objects explicitly
  included in the link;</p>
  </blockquote>