diff mbox

RFA: Fix use of extra_objs when configuring tilepro-linux and tilegx-linux

Message ID 87k3nw9mdr.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton April 21, 2013, 11:03 a.m. UTC
Hi Walter,

  The tilepro-gnu-linux and tilegx-gnu-linux currently fail to build in
  the FSF mainline sources because of:

    libbackend.a(tilepro.o):(.data+0x2e4): undefined reference to `linux_android_has_ifunc_p()'

  This happens because the entries for tilegx-linux and tilepro-linux in 
  config.gcc override the definition of extra_objs, rather than
  extending it, thus loosing the inclusion of linux_android.o into
  libbackend.a.

  I fixed the problem with the patch below and was able to build both
  toolchains.  OK to apply ?

Cheers
  Nick

gcc/ChangeLog
2013-04-21  Nick Clifton  <nickc@redhat.com>

	* config.gcc (tilegx-linux): Extend extra_objs rather than
	overwriting it.
	(tilepro-linux): Likewise.

Comments

Walter Lee April 21, 2013, 6:26 p.m. UTC | #1
Hi Nick.  Looks good.  Thanks for fixing it.

Walter

On 4/21/2013 7:03 AM, Nick Clifton wrote:
> Hi Walter,
> 
>   The tilepro-gnu-linux and tilegx-gnu-linux currently fail to build in
>   the FSF mainline sources because of:
> 
>     libbackend.a(tilepro.o):(.data+0x2e4): undefined reference to `linux_android_has_ifunc_p()'
> 
>   This happens because the entries for tilegx-linux and tilepro-linux in 
>   config.gcc override the definition of extra_objs, rather than
>   extending it, thus loosing the inclusion of linux_android.o into
>   libbackend.a.
> 
>   I fixed the problem with the patch below and was able to build both
>   toolchains.  OK to apply ?
> 
> Cheers
>   Nick
> 
> gcc/ChangeLog
> 2013-04-21  Nick Clifton  <nickc@redhat.com>
> 
> 	* config.gcc (tilegx-linux): Extend extra_objs rather than
> 	overwriting it.
> 	(tilepro-linux): Likewise.
> 
> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc      (revision 198115)
> +++ gcc/config.gcc      (working copy)
> @@ -2573,7 +2573,7 @@
>  tilegx-*-linux*)
>         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
>          tmake_file="${tmake_file} tilegx/t-tilegx"
> -       extra_objs="mul-tables.o"
> +       extra_objs="${extra_objs} mul-tables.o"
>         c_target_objs="${c_target_objs} tilegx-c.o"
>         cxx_target_objs="${cxx_target_objs} tilegx-c.o"
>         extra_headers="feedback.h"
> @@ -2581,7 +2581,7 @@
>  tilepro-*-linux*)
>         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
>          tmake_file="${tmake_file} tilepro/t-tilepro"
> -       extra_objs="mul-tables.o"
> +       extra_objs="${extra_objs} mul-tables.o"
>         c_target_objs="${c_target_objs} tilepro-c.o"
>         cxx_target_objs="${cxx_target_objs} tilepro-c.o"
>         extra_headers="feedback.h"
>
diff mbox

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc      (revision 198115)
+++ gcc/config.gcc      (working copy)
@@ -2573,7 +2573,7 @@ 
 tilegx-*-linux*)
        tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
         tmake_file="${tmake_file} tilegx/t-tilegx"
-       extra_objs="mul-tables.o"
+       extra_objs="${extra_objs} mul-tables.o"
        c_target_objs="${c_target_objs} tilegx-c.o"
        cxx_target_objs="${cxx_target_objs} tilegx-c.o"
        extra_headers="feedback.h"
@@ -2581,7 +2581,7 @@ 
 tilepro-*-linux*)
        tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
         tmake_file="${tmake_file} tilepro/t-tilepro"
-       extra_objs="mul-tables.o"
+       extra_objs="${extra_objs} mul-tables.o"
        c_target_objs="${c_target_objs} tilepro-c.o"
        cxx_target_objs="${cxx_target_objs} tilepro-c.o"
        extra_headers="feedback.h"