title: Linker not able to find functions in other static libraries
body: <p>I'm trying to compile <code>fbi</code> (Linux framebuffer imageviewer) statically, so I added <code>-static</code> to <code>LDFLAGS</code> in <code>GNUMakefile</code>. Without <code>-static</code> linking works perfectly. When enabled, I get various linking errors telling me this:</p>
  
  <p><code>/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../arm-linux-gnueabihf/libfontconfig.a(fcxml.o): In function 'FcConfigMessage':
  (.text+0x192): undefined reference to 'XML_GetCurrentLineNumber'</code></p>
  
  <p>Now I do have the static library <code>libfontconfig.a</code> and the function <code>XML_GetCurrentLineNumber</code> it obviously doesn't find is in <code>/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../arm-linux-gnueabihf/libxml2.a</code> which I proofed with <code>nm libxml2.a</code>, according to the source code found <a href="https://github.com/servo/libfontconfig/blob/master/src/fcxml.c" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I guess I have to tell the linker in the <code>GNUMakefile</code> exactly what to do, but how? The object code in the <code>ar</code> libraries are all ARM 32-bit and I'm compiling and linking on ARM 32-bit.</p>
  
  <p>GNUMakefile can be found <a href="https://www.kraxel.org/cgit/fbida/tree/GNUmakefile" rel="nofollow noreferrer">here</a>, I added <code>LDFLAGS += -static --verbose -lfontconfig -lfreetype -lpng12 -ltiff</code>.</p>