]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/epiphany/epiphany.h (LIB_SPEC): Link libc again after libgloss.
authorJoern Rennecke <joern.rennecke@embecosm.com>
Tue, 7 Feb 2012 11:32:10 +0000 (11:32 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 7 Feb 2012 11:32:10 +0000 (11:32 +0000)
From-SVN: r183964

gcc/ChangeLog
gcc/config/epiphany/epiphany.h

index a35ee2c43002ed1bdd23c846409d114423318cd5..e6c03841aea850a5e6bcd0f52ffdc9f07b89d172 100644 (file)
@@ -32,6 +32,8 @@
        (epiphany_start_function): Handle multiple interrupt arguments and/or
        forwarder_section attribute.
 
+       * config/epiphany/epiphany.h (LIB_SPEC): Link libc again after libgloss.
+
 2012-02-07  Alan Modra  <amodra@gmail.com>
 
        PR target/52107
index 572ec7ecb3faf3bbc9476e93e5ebe54b75045b9f..92b781f5cea4a93301c6ddbc71ecb39b3b5be206 100644 (file)
@@ -43,9 +43,11 @@ along with GCC; see the file COPYING3.  If not see
     } while (0)
 
 /* Pick up the libgloss library. One day we may do this by linker script, but
-   for now its static. */
+   for now its static.
+   libgloss might use errno/__errno, which might not have been needed when we
+   saw libc the first time, so link with libc a second time.  */
 #undef LIB_SPEC
-#define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}} -lepiphany"
+#define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}} -lepiphany %{!shared:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
 
 #define LINK_SPEC "%{v}"