{"id":5192,"date":"2014-03-30T19:33:23","date_gmt":"2014-03-30T19:33:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-is-rpath-link-used-in-cross-compilation-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:33:23","modified_gmt":"2014-03-30T19:33:23","slug":"how-is-rpath-link-used-in-cross-compilation-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-is-rpath-link-used-in-cross-compilation-collection-of-common-programming-errors\/","title":{"rendered":"How is rpath-link used in cross compilation?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m having trouble confirming my understanding of how rpath-link works when cross compiling with the specific tool chain I&#8217;m using (though I think this a general question that applies to cross compiling in general).<\/p>\n<p>When I take a look at what flags are passed to the compiler and linker when building libraries and applications, I see the following passed to the linker:<\/p>\n<pre><code>-Wl,-rpath-link,\/home\/Dev\/env\/sys\/crosscompiletoolchain\/armle-v7\/lib\/\n<\/code><\/pre>\n<p>So this is a path being embedded into shared libraries being built for the target device on my development machine. This makes sense because I&#8217;d be doing all final linking on the development machine before deploying to device. When I finally deploy to the device though (ie. shared libs + application), won&#8217;t those shared libs have a useless rpath-link?<\/p>\n<p>The built libraries and applications seem to work fine on the target regardless, and if I&#8217;d have to guess I&#8217;d say its because the application has an environment provided by the device OS that has \/lib\/ as one of its default library search paths (rpath-link only specifies the first set of dirs to be searched). Is this correct?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m having trouble confirming my understanding of how rpath-link works when cross compiling with the specific tool chain I&#8217;m using (though I think this a general question that applies to cross compiling in general). When I take a look at what flags are passed to the compiler and linker when building libraries and applications, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5192","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5192"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5192\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}