RFA: Synchronize top level files with binutils

Message ID 87ftox752d.fsf@redhat.com
State New
Headers show
Series
  • RFA: Synchronize top level files with binutils
Related show

Commit Message

Nick Clifton May 29, 2019, 1:39 p.m.
Hi Guys,

  I would like to bring over a few additions that have recently been
  made to the binutils versions of the Makefile.def and configure.ac
  files.  Any objections ?

  Note - I did run a toolchain bootstrap after applying this patch
  locally and that went OK...

Cheers
  Nick

./ChangeLog
2019-05-29  Nick Clifton  <nickc@redhat.com>

	Import from binutils:
	2019-05-29  Nick Clifton  <nickc@redhat.com>

	* configure.ac (noconfigdirs): Add libctf if the target does not use
	the ELF file format.
	* configure: Regenerate.

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): configure-libctf depends on all-bfd
	and all its deps.
	* Makefile.in: Regenerated.

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): Add libctf.
	* Makefile.def (dependencies): Likewise.
	libctf depends on zlib, libiberty, and bfd.
	* Makefile.in: Regenerated.
	* configure.ac (host_libs): Add libctf.
	* configure: Regenerated.

Comments

Richard Biener May 29, 2019, 1:46 p.m. | #1
On Wed, May 29, 2019 at 3:40 PM Nick Clifton <nickc@redhat.com> wrote:
>

> Hi Guys,

>

>   I would like to bring over a few additions that have recently been

>   made to the binutils versions of the Makefile.def and configure.ac

>   files.  Any objections ?

>

>   Note - I did run a toolchain bootstrap after applying this patch

>   locally and that went OK...

>

> Cheers

>   Nick

>

> ./ChangeLog

> 2019-05-29  Nick Clifton  <nickc@redhat.com>

>

>         Import from binutils:

>         2019-05-29  Nick Clifton  <nickc@redhat.com>

>

>         * configure.ac (noconfigdirs): Add libctf if the target does not use

>         the ELF file format.

>         * configure: Regenerate.

>

>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>

>         * Makefile.def (dependencies): configure-libctf depends on all-bfd

>         and all its deps.

>         * Makefile.in: Regenerated.

>

>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>

>         * Makefile.def (host_modules): Add libctf.

>         * Makefile.def (dependencies): Likewise.

>         libctf depends on zlib, libiberty, and bfd.

>         * Makefile.in: Regenerated.

>         * configure.ac (host_libs): Add libctf.

>         * configure: Regenerated.

>

> Index: Makefile.def

> ===================================================================

> --- Makefile.def        (revision 271737)

> +++ Makefile.def        (working copy)

> @@ -4,7 +4,7 @@

>  // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.

>  // This file was originally written by Nathanael Nerode.

>  //

> -//   Copyright 2002-2013 Free Software Foundation

> +//   Copyright 2002-2019 Free Software Foundation

>  //

>  // This file is free software; you can redistribute it and/or modify

>  // it under the terms of the GNU General Public License as published by

> @@ -128,6 +128,8 @@

>                 extra_make_flags='@extra_linker_plugin_flags@'; };

>  host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };

>  host_modules= { module= gotools; };

> +host_modules= { module= libctf; no_install=true; no_check=true;

> +               bootstrap=true; };

>

>  target_modules = { module= libstdc++-v3;

>                    bootstrap=true;

> @@ -137,6 +139,9 @@

>                    bootstrap=true;

>                    lib_path=.libs;

>                    raw_cxx=true; };

> +target_modules = { module= libmpx;

> +                  bootstrap=true;

> +                  lib_path=.libs; };


It seems to re-introduce things that have been removed on the
GCC side.

Please double-check and re-post. (just cherry-pick actual
changes from the binutils side?)

Richard.

>  target_modules = { module= libvtv;

>                    bootstrap=true;

>                    lib_path=.libs;

> @@ -428,6 +433,7 @@

>  dependencies = { module=all-binutils; on=all-build-bison; };

>  dependencies = { module=all-binutils; on=all-intl; };

>  dependencies = { module=all-binutils; on=all-gas; };

> +dependencies = { module=all-binutils; on=all-libctf; };

>

>  // We put install-opcodes before install-binutils because the installed

>  // binutils might be on PATH, and they might need the shared opcodes

> @@ -518,6 +524,14 @@

>  dependencies = { module=all-fastjar; on=all-zlib; };

>  dependencies = { module=all-fastjar; on=all-build-texinfo; };

>  dependencies = { module=all-fastjar; on=all-libiberty; };

> +dependencies = { module=all-libctf; on=all-libiberty; hard=true; };

> +dependencies = { module=all-libctf; on=all-bfd; };

> +dependencies = { module=all-libctf; on=all-zlib; };

> +// So that checking for ELF support in BFD from libctf configure is possible.

> +dependencies = { module=configure-libctf; on=all-bfd; };

> +dependencies = { module=configure-libctf; on=all-intl; };

> +dependencies = { module=configure-libctf; on=all-zlib; };

> +dependencies = { module=configure-libctf; on=all-libiconv; };

>

>  // Warning, these are not well tested.

>  dependencies = { module=all-bison; on=all-intl; };

> Index: configure.ac

> ===================================================================

> --- configure.ac        (revision 271737)

> +++ configure.ac        (working copy)

> @@ -131,7 +131,7 @@

>

>  # these libraries are used by various programs built for the host environment

>  #f

> -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"

> +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"

>

>  # these tools are built for the host environment

>  # Note, the powerpc-eabi build depends on sim occurring before gdb in order to

> @@ -928,7 +934,23 @@

>      ;;

>  esac

>

> +# Targets that do not use the ELF file format cannot support libctf.

>  case "${target}" in

> +  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)

> +    noconfigdirs="$noconfigdirs libctf"

> +    ;;

> +  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)

> +    noconfigdirs="$noconfigdirs libctf"

> +    ;;

> +  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)

> +    noconfigdirs="$noconfigdirs libctf"

> +    ;;

> +  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)

> +    noconfigdirs="$noconfigdirs libctf"

> +    ;;

> +esac

> +

> +case "${target}" in

>    *-*-chorusos)

>      ;;

>    aarch64-*-darwin*)
Richard Earnshaw (lists) June 7, 2019, 1:58 p.m. | #2
On 29/05/2019 14:46, Richard Biener wrote:
> On Wed, May 29, 2019 at 3:40 PM Nick Clifton <nickc@redhat.com> wrote:

>>

>> Hi Guys,

>>

>>   I would like to bring over a few additions that have recently been

>>   made to the binutils versions of the Makefile.def and configure.ac

>>   files.  Any objections ?

>>

>>   Note - I did run a toolchain bootstrap after applying this patch

>>   locally and that went OK...

>>

>> Cheers

>>   Nick

>>

>> ./ChangeLog

>> 2019-05-29  Nick Clifton  <nickc@redhat.com>

>>

>>         Import from binutils:

>>         2019-05-29  Nick Clifton  <nickc@redhat.com>

>>

>>         * configure.ac (noconfigdirs): Add libctf if the target does not use

>>         the ELF file format.

>>         * configure: Regenerate.

>>

>>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>>

>>         * Makefile.def (dependencies): configure-libctf depends on all-bfd

>>         and all its deps.

>>         * Makefile.in: Regenerated.

>>

>>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>>

>>         * Makefile.def (host_modules): Add libctf.

>>         * Makefile.def (dependencies): Likewise.

>>         libctf depends on zlib, libiberty, and bfd.

>>         * Makefile.in: Regenerated.

>>         * configure.ac (host_libs): Add libctf.

>>         * configure: Regenerated.

>>

>> Index: Makefile.def

>> ===================================================================

>> --- Makefile.def        (revision 271737)

>> +++ Makefile.def        (working copy)

>> @@ -4,7 +4,7 @@

>>  // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.

>>  // This file was originally written by Nathanael Nerode.

>>  //

>> -//   Copyright 2002-2013 Free Software Foundation

>> +//   Copyright 2002-2019 Free Software Foundation

>>  //

>>  // This file is free software; you can redistribute it and/or modify

>>  // it under the terms of the GNU General Public License as published by

>> @@ -128,6 +128,8 @@

>>                 extra_make_flags='@extra_linker_plugin_flags@'; };

>>  host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };

>>  host_modules= { module= gotools; };

>> +host_modules= { module= libctf; no_install=true; no_check=true;

>> +               bootstrap=true; };

>>

>>  target_modules = { module= libstdc++-v3;

>>                    bootstrap=true;

>> @@ -137,6 +139,9 @@

>>                    bootstrap=true;

>>                    lib_path=.libs;

>>                    raw_cxx=true; };

>> +target_modules = { module= libmpx;

>> +                  bootstrap=true;

>> +                  lib_path=.libs; };

> 

> It seems to re-introduce things that have been removed on the

> GCC side.

> 

> Please double-check and re-post. (just cherry-pick actual

> changes from the binutils side?)


Is it just that one hunk that's problematic (I can't see any other
non-relevant hunks)?  Without this patch, my unified tree builds are all
broken and have been for a week now.

R.

> 

> Richard.

> 

>>  target_modules = { module= libvtv;

>>                    bootstrap=true;

>>                    lib_path=.libs;

>> @@ -428,6 +433,7 @@

>>  dependencies = { module=all-binutils; on=all-build-bison; };

>>  dependencies = { module=all-binutils; on=all-intl; };

>>  dependencies = { module=all-binutils; on=all-gas; };

>> +dependencies = { module=all-binutils; on=all-libctf; };

>>

>>  // We put install-opcodes before install-binutils because the installed

>>  // binutils might be on PATH, and they might need the shared opcodes

>> @@ -518,6 +524,14 @@

>>  dependencies = { module=all-fastjar; on=all-zlib; };

>>  dependencies = { module=all-fastjar; on=all-build-texinfo; };

>>  dependencies = { module=all-fastjar; on=all-libiberty; };

>> +dependencies = { module=all-libctf; on=all-libiberty; hard=true; };

>> +dependencies = { module=all-libctf; on=all-bfd; };

>> +dependencies = { module=all-libctf; on=all-zlib; };

>> +// So that checking for ELF support in BFD from libctf configure is possible.

>> +dependencies = { module=configure-libctf; on=all-bfd; };

>> +dependencies = { module=configure-libctf; on=all-intl; };

>> +dependencies = { module=configure-libctf; on=all-zlib; };

>> +dependencies = { module=configure-libctf; on=all-libiconv; };

>>

>>  // Warning, these are not well tested.

>>  dependencies = { module=all-bison; on=all-intl; };

>> Index: configure.ac

>> ===================================================================

>> --- configure.ac        (revision 271737)

>> +++ configure.ac        (working copy)

>> @@ -131,7 +131,7 @@

>>

>>  # these libraries are used by various programs built for the host environment

>>  #f

>> -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"

>> +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"

>>

>>  # these tools are built for the host environment

>>  # Note, the powerpc-eabi build depends on sim occurring before gdb in order to

>> @@ -928,7 +934,23 @@

>>      ;;

>>  esac

>>

>> +# Targets that do not use the ELF file format cannot support libctf.

>>  case "${target}" in

>> +  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)

>> +    noconfigdirs="$noconfigdirs libctf"

>> +    ;;

>> +  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)

>> +    noconfigdirs="$noconfigdirs libctf"

>> +    ;;

>> +  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)

>> +    noconfigdirs="$noconfigdirs libctf"

>> +    ;;

>> +  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)

>> +    noconfigdirs="$noconfigdirs libctf"

>> +    ;;

>> +esac

>> +

>> +case "${target}" in

>>    *-*-chorusos)

>>      ;;

>>    aarch64-*-darwin*)
Nick Clifton June 7, 2019, 2:18 p.m. | #3
Hi Richard,

>>> +target_modules = { module= libmpx;

>>> +                  bootstrap=true;

>>> +                  lib_path=.libs; };

>>

>> It seems to re-introduce things that have been removed on the

>> GCC side.


> Is it just that one hunk that's problematic (I can't see any other

> non-relevant hunks)?  Without this patch, my unified tree builds are all

> broken and have been for a week now.


Actually I ave now reverted by libctf change to the binutils version
of Makefile.def, so I really need to resubmit this patch.  I will work
on it over the weekend and try again on Monday.

Cheers
  Nick
Nick Clifton June 10, 2019, 9:47 a.m. | #4
Hi Richard,

  OK, here is a resubmission of my patch with just the addition of the
  libctf patches this time.  (Sorry about the previous bad patch).
  Tested with a bootstrap and a normal build.  OK to apply ?

Cheers
  Nick

2019-06-07  Nick Clifton  <nickc@redhat.com>

	Import these changes from the binutils/gdb repository:

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): configure-libctf depends on all-bfd
	and all its deps.
	* Makefile.in: Regenerated.

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): Add libctf.
	* Makefile.def (dependencies): Likewise.
	libctf depends on zlib, libiberty, and bfd.
	* Makefile.in: Regenerated.
	* configure.ac (host_libs): Add libctf.
	* configure: Regenerated.

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 272111)
+++ Makefile.def	(working copy)
@@ -4,7 +4,7 @@
 // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 // This file was originally written by Nathanael Nerode.
 //
-//   Copyright 2002-2013 Free Software Foundation
+//   Copyright 2002-2019 Free Software Foundation
 //
 // This file is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -128,6 +128,8 @@
 		extra_make_flags='@extra_linker_plugin_flags@'; };
 host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
 host_modules= { module= gotools; };
+host_modules= { module= libctf; no_install=true; no_check=true;
+		bootstrap=true; };
 
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
@@ -428,6 +430,7 @@
 dependencies = { module=all-binutils; on=all-build-bison; };
 dependencies = { module=all-binutils; on=all-intl; };
 dependencies = { module=all-binutils; on=all-gas; };
+dependencies = { module=all-binutils; on=all-libctf; };
 
 // We put install-opcodes before install-binutils because the installed
 // binutils might be on PATH, and they might need the shared opcodes
@@ -518,6 +521,14 @@
 dependencies = { module=all-fastjar; on=all-zlib; };
 dependencies = { module=all-fastjar; on=all-build-texinfo; };
 dependencies = { module=all-fastjar; on=all-libiberty; };
+dependencies = { module=all-libctf; on=all-libiberty; hard=true; };
+dependencies = { module=all-libctf; on=all-bfd; };
+dependencies = { module=all-libctf; on=all-zlib; };
+// So that checking for ELF support in BFD from libctf configure is possible.
+dependencies = { module=configure-libctf; on=all-bfd; };
+dependencies = { module=configure-libctf; on=all-intl; };
+dependencies = { module=configure-libctf; on=all-zlib; };
+dependencies = { module=configure-libctf; on=all-libiconv; };
 
 // Warning, these are not well tested.
 dependencies = { module=all-bison; on=all-intl; };
Index: configure.ac
===================================================================
--- configure.ac	(revision 272111)
+++ configure.ac	(working copy)
@@ -131,7 +131,7 @@
 
 # these libraries are used by various programs built for the host environment
 #f
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"
+host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
Richard Biener June 11, 2019, 10:30 a.m. | #5
On Mon, Jun 10, 2019 at 11:47 AM Nick Clifton <nickc@redhat.com> wrote:
>

> Hi Richard,

>

>   OK, here is a resubmission of my patch with just the addition of the

>   libctf patches this time.  (Sorry about the previous bad patch).

>   Tested with a bootstrap and a normal build.  OK to apply ?


Sure.

Thanks,
Richard.

> Cheers

>   Nick

>

> 2019-06-07  Nick Clifton  <nickc@redhat.com>

>

>         Import these changes from the binutils/gdb repository:

>

>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>

>         * Makefile.def (dependencies): configure-libctf depends on all-bfd

>         and all its deps.

>         * Makefile.in: Regenerated.

>

>         2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

>

>         * Makefile.def (host_modules): Add libctf.

>         * Makefile.def (dependencies): Likewise.

>         libctf depends on zlib, libiberty, and bfd.

>         * Makefile.in: Regenerated.

>         * configure.ac (host_libs): Add libctf.

>         * configure: Regenerated.

>

> Index: Makefile.def

> ===================================================================

> --- Makefile.def        (revision 272111)

> +++ Makefile.def        (working copy)

> @@ -4,7 +4,7 @@

>  // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.

>  // This file was originally written by Nathanael Nerode.

>  //

> -//   Copyright 2002-2013 Free Software Foundation

> +//   Copyright 2002-2019 Free Software Foundation

>  //

>  // This file is free software; you can redistribute it and/or modify

>  // it under the terms of the GNU General Public License as published by

> @@ -128,6 +128,8 @@

>                 extra_make_flags='@extra_linker_plugin_flags@'; };

>  host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };

>  host_modules= { module= gotools; };

> +host_modules= { module= libctf; no_install=true; no_check=true;

> +               bootstrap=true; };

>

>  target_modules = { module= libstdc++-v3;

>                    bootstrap=true;

> @@ -428,6 +430,7 @@

>  dependencies = { module=all-binutils; on=all-build-bison; };

>  dependencies = { module=all-binutils; on=all-intl; };

>  dependencies = { module=all-binutils; on=all-gas; };

> +dependencies = { module=all-binutils; on=all-libctf; };

>

>  // We put install-opcodes before install-binutils because the installed

>  // binutils might be on PATH, and they might need the shared opcodes

> @@ -518,6 +521,14 @@

>  dependencies = { module=all-fastjar; on=all-zlib; };

>  dependencies = { module=all-fastjar; on=all-build-texinfo; };

>  dependencies = { module=all-fastjar; on=all-libiberty; };

> +dependencies = { module=all-libctf; on=all-libiberty; hard=true; };

> +dependencies = { module=all-libctf; on=all-bfd; };

> +dependencies = { module=all-libctf; on=all-zlib; };

> +// So that checking for ELF support in BFD from libctf configure is possible.

> +dependencies = { module=configure-libctf; on=all-bfd; };

> +dependencies = { module=configure-libctf; on=all-intl; };

> +dependencies = { module=configure-libctf; on=all-zlib; };

> +dependencies = { module=configure-libctf; on=all-libiconv; };

>

>  // Warning, these are not well tested.

>  dependencies = { module=all-bison; on=all-intl; };

> Index: configure.ac

> ===================================================================

> --- configure.ac        (revision 272111)

> +++ configure.ac        (working copy)

> @@ -131,7 +131,7 @@

>

>  # these libraries are used by various programs built for the host environment

>  #f

> -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"

> +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"

>

>  # these tools are built for the host environment

>  # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
Richard Earnshaw (lists) June 14, 2019, 2:56 p.m. | #6
On 10/06/2019 10:47, Nick Clifton wrote:
> Hi Richard,

> 

>   OK, here is a resubmission of my patch with just the addition of the

>   libctf patches this time.  (Sorry about the previous bad patch).

>   Tested with a bootstrap and a normal build.  OK to apply ?

> 

> Cheers

>   Nick


Would it be feasible to backport this to the other maintained branches
so that the option of using them with current binutils would be available?

R.

> 

> 2019-06-07  Nick Clifton  <nickc@redhat.com>

> 

> 	Import these changes from the binutils/gdb repository:

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (dependencies): configure-libctf depends on all-bfd

> 	and all its deps.

> 	* Makefile.in: Regenerated.

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (host_modules): Add libctf.

> 	* Makefile.def (dependencies): Likewise.

> 	libctf depends on zlib, libiberty, and bfd.

> 	* Makefile.in: Regenerated.

> 	* configure.ac (host_libs): Add libctf.

> 	* configure: Regenerated.

> 

> Index: Makefile.def

> ===================================================================

> --- Makefile.def	(revision 272111)

> +++ Makefile.def	(working copy)

> @@ -4,7 +4,7 @@

>  // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.

>  // This file was originally written by Nathanael Nerode.

>  //

> -//   Copyright 2002-2013 Free Software Foundation

> +//   Copyright 2002-2019 Free Software Foundation

>  //

>  // This file is free software; you can redistribute it and/or modify

>  // it under the terms of the GNU General Public License as published by

> @@ -128,6 +128,8 @@

>  		extra_make_flags='@extra_linker_plugin_flags@'; };

>  host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };

>  host_modules= { module= gotools; };

> +host_modules= { module= libctf; no_install=true; no_check=true;

> +		bootstrap=true; };

>  

>  target_modules = { module= libstdc++-v3;

>  		   bootstrap=true;

> @@ -428,6 +430,7 @@

>  dependencies = { module=all-binutils; on=all-build-bison; };

>  dependencies = { module=all-binutils; on=all-intl; };

>  dependencies = { module=all-binutils; on=all-gas; };

> +dependencies = { module=all-binutils; on=all-libctf; };

>  

>  // We put install-opcodes before install-binutils because the installed

>  // binutils might be on PATH, and they might need the shared opcodes

> @@ -518,6 +521,14 @@

>  dependencies = { module=all-fastjar; on=all-zlib; };

>  dependencies = { module=all-fastjar; on=all-build-texinfo; };

>  dependencies = { module=all-fastjar; on=all-libiberty; };

> +dependencies = { module=all-libctf; on=all-libiberty; hard=true; };

> +dependencies = { module=all-libctf; on=all-bfd; };

> +dependencies = { module=all-libctf; on=all-zlib; };

> +// So that checking for ELF support in BFD from libctf configure is possible.

> +dependencies = { module=configure-libctf; on=all-bfd; };

> +dependencies = { module=configure-libctf; on=all-intl; };

> +dependencies = { module=configure-libctf; on=all-zlib; };

> +dependencies = { module=configure-libctf; on=all-libiconv; };

>  

>  // Warning, these are not well tested.

>  dependencies = { module=all-bison; on=all-intl; };

> Index: configure.ac

> ===================================================================

> --- configure.ac	(revision 272111)

> +++ configure.ac	(working copy)

> @@ -131,7 +131,7 @@

>  

>  # these libraries are used by various programs built for the host environment

>  #f

> -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"

> +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"

>  

>  # these tools are built for the host environment

>  # Note, the powerpc-eabi build depends on sim occurring before gdb in order to

>
Nick Clifton June 18, 2019, 4:20 p.m. | #7
Hi Richard,

>>   OK, here is a resubmission of my patch with just the addition of the

>>   libctf patches this time.


  [Sorry - this one got put on a back burner].

> Would it be feasible to backport this to the other maintained branches

> so that the option of using them with current binutils would be available?


Do you have any particular branches in mind ?  There do seem to be quite a lot of them...

Cheers
  Nick
Richard Earnshaw (lists) June 18, 2019, 6:57 p.m. | #8
On 18/06/2019 17:20, Nick Clifton wrote:
> Hi Richard,

> 

>>>   OK, here is a resubmission of my patch with just the addition of the

>>>   libctf patches this time.

> 

>   [Sorry - this one got put on a back burner].

> 

>> Would it be feasible to backport this to the other maintained branches

>> so that the option of using them with current binutils would be available?

> 

> Do you have any particular branches in mind ?  There do seem to be quite a lot of them...

> 

> Cheers

>   Nick

> 

> 

Only the official branches: gcc-7, gcc-8 and gcc-9.  I would expect
branch owners to do any other branches as and when they might require it.

R.
Nick Clifton June 20, 2019, 2:10 p.m. | #9
Hi Richard,

  Please may I apply this patch to the gcc-9, gcc-8 and gcc-7 branches ?

  I have tested it on all three branches and found no problems.

Cheers
  Nick

2019-06-07  Nick Clifton  <nickc@redhat.com>

	Import these changes from the binutils/gdb repository:

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): configure-libctf depends on all-bfd
	and all its deps.
	* Makefile.in: Regenerated.

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): Add libctf.
	* Makefile.def (dependencies): Likewise.
	libctf depends on zlib, libiberty, and bfd.
	* Makefile.in: Regenerated.
	* configure.ac (host_libs): Add libctf.
	* configure: Regenerated.
2019-06-07  Nick Clifton  <nickc@redhat.com>

	Import these changes from the binutils/gdb repository:

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): configure-libctf depends on all-bfd
	and all its deps.
	* Makefile.in: Regenerated.

	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): Add libctf.
	* Makefile.def (dependencies): Likewise.
	libctf depends on zlib, libiberty, and bfd.
	* Makefile.in: Regenerated.
	* configure.ac (host_libs): Add libctf.
	* configure: Regenerated.

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 272111)
+++ Makefile.def	(working copy)
@@ -4,7 +4,7 @@
 // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 // This file was originally written by Nathanael Nerode.
 //
-//   Copyright 2002-2013 Free Software Foundation
+//   Copyright 2002-2019 Free Software Foundation
 //
 // This file is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -128,6 +128,8 @@
 		extra_make_flags='@extra_linker_plugin_flags@'; };
 host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
 host_modules= { module= gotools; };
+host_modules= { module= libctf; no_install=true; no_check=true;
+		bootstrap=true; };
 
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
@@ -428,6 +430,7 @@
 dependencies = { module=all-binutils; on=all-build-bison; };
 dependencies = { module=all-binutils; on=all-intl; };
 dependencies = { module=all-binutils; on=all-gas; };
+dependencies = { module=all-binutils; on=all-libctf; };
 
 // We put install-opcodes before install-binutils because the installed
 // binutils might be on PATH, and they might need the shared opcodes
@@ -518,6 +521,14 @@
 dependencies = { module=all-fastjar; on=all-zlib; };
 dependencies = { module=all-fastjar; on=all-build-texinfo; };
 dependencies = { module=all-fastjar; on=all-libiberty; };
+dependencies = { module=all-libctf; on=all-libiberty; hard=true; };
+dependencies = { module=all-libctf; on=all-bfd; };
+dependencies = { module=all-libctf; on=all-zlib; };
+// So that checking for ELF support in BFD from libctf configure is possible.
+dependencies = { module=configure-libctf; on=all-bfd; };
+dependencies = { module=configure-libctf; on=all-intl; };
+dependencies = { module=configure-libctf; on=all-zlib; };
+dependencies = { module=configure-libctf; on=all-libiconv; };
 
 // Warning, these are not well tested.
 dependencies = { module=all-bison; on=all-intl; };
Index: configure.ac
===================================================================
--- configure.ac	(revision 272111)
+++ configure.ac	(working copy)
@@ -131,7 +131,7 @@
 
 # these libraries are used by various programs built for the host environment
 #f
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"
+host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
Richard Earnshaw (lists) June 24, 2019, 2:10 p.m. | #10
On 20/06/2019 15:10, Nick Clifton wrote:
> Hi Richard,

> 

>   Please may I apply this patch to the gcc-9, gcc-8 and gcc-7 branches ?

> 

>   I have tested it on all three branches and found no problems.

> 

> Cheers

>   Nick

> 

> 2019-06-07  Nick Clifton  <nickc@redhat.com>

> 

> 	Import these changes from the binutils/gdb repository:

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (dependencies): configure-libctf depends on all-bfd

> 	and all its deps.

> 	* Makefile.in: Regenerated.

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (host_modules): Add libctf.

> 	* Makefile.def (dependencies): Likewise.

> 	libctf depends on zlib, libiberty, and bfd.

> 	* Makefile.in: Regenerated.

> 	* configure.ac (host_libs): Add libctf.

> 	* configure: Regenerated.

> 

> 

> Synchronize top level files with binutils.patch

> 

> 2019-06-07  Nick Clifton  <nickc@redhat.com>

> 

> 	Import these changes from the binutils/gdb repository:

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (dependencies): configure-libctf depends on all-bfd

> 	and all its deps.

> 	* Makefile.in: Regenerated.

> 

> 	2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

> 

> 	* Makefile.def (host_modules): Add libctf.

> 	* Makefile.def (dependencies): Likewise.

> 	libctf depends on zlib, libiberty, and bfd.

> 	* Makefile.in: Regenerated.

> 	* configure.ac (host_libs): Add libctf.

> 	* configure: Regenerated.


FWIW, this looks good to me, but you probably need a RM to sign it off.

R.

> 

> Index: Makefile.def

> ===================================================================

> --- Makefile.def	(revision 272111)

> +++ Makefile.def	(working copy)

> @@ -4,7 +4,7 @@

>  // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.

>  // This file was originally written by Nathanael Nerode.

>  //

> -//   Copyright 2002-2013 Free Software Foundation

> +//   Copyright 2002-2019 Free Software Foundation

>  //

>  // This file is free software; you can redistribute it and/or modify

>  // it under the terms of the GNU General Public License as published by

> @@ -128,6 +128,8 @@

>  		extra_make_flags='@extra_linker_plugin_flags@'; };

>  host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };

>  host_modules= { module= gotools; };

> +host_modules= { module= libctf; no_install=true; no_check=true;

> +		bootstrap=true; };

>  

>  target_modules = { module= libstdc++-v3;

>  		   bootstrap=true;

> @@ -428,6 +430,7 @@

>  dependencies = { module=all-binutils; on=all-build-bison; };

>  dependencies = { module=all-binutils; on=all-intl; };

>  dependencies = { module=all-binutils; on=all-gas; };

> +dependencies = { module=all-binutils; on=all-libctf; };

>  

>  // We put install-opcodes before install-binutils because the installed

>  // binutils might be on PATH, and they might need the shared opcodes

> @@ -518,6 +521,14 @@

>  dependencies = { module=all-fastjar; on=all-zlib; };

>  dependencies = { module=all-fastjar; on=all-build-texinfo; };

>  dependencies = { module=all-fastjar; on=all-libiberty; };

> +dependencies = { module=all-libctf; on=all-libiberty; hard=true; };

> +dependencies = { module=all-libctf; on=all-bfd; };

> +dependencies = { module=all-libctf; on=all-zlib; };

> +// So that checking for ELF support in BFD from libctf configure is possible.

> +dependencies = { module=configure-libctf; on=all-bfd; };

> +dependencies = { module=configure-libctf; on=all-intl; };

> +dependencies = { module=configure-libctf; on=all-zlib; };

> +dependencies = { module=configure-libctf; on=all-libiconv; };

>  

>  // Warning, these are not well tested.

>  dependencies = { module=all-bison; on=all-intl; };

> Index: configure.ac

> ===================================================================

> --- configure.ac	(revision 272111)

> +++ configure.ac	(working copy)

> @@ -131,7 +131,7 @@

>  

>  # these libraries are used by various programs built for the host environment

>  #f

> -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"

> +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"

>  

>  # these tools are built for the host environment

>  # Note, the powerpc-eabi build depends on sim occurring before gdb in order to

> 

> 

>

Patch

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 271737)
+++ Makefile.def	(working copy)
@@ -4,7 +4,7 @@ 
 // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
 // This file was originally written by Nathanael Nerode.
 //
-//   Copyright 2002-2013 Free Software Foundation
+//   Copyright 2002-2019 Free Software Foundation
 //
 // This file is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -128,6 +128,8 @@ 
 		extra_make_flags='@extra_linker_plugin_flags@'; };
 host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
 host_modules= { module= gotools; };
+host_modules= { module= libctf; no_install=true; no_check=true;
+		bootstrap=true; };
 
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
@@ -137,6 +139,9 @@ 
 		   bootstrap=true;
 		   lib_path=.libs;
 		   raw_cxx=true; };
+target_modules = { module= libmpx;
+		   bootstrap=true;
+		   lib_path=.libs; };
 target_modules = { module= libvtv;
 		   bootstrap=true;
 		   lib_path=.libs;
@@ -428,6 +433,7 @@ 
 dependencies = { module=all-binutils; on=all-build-bison; };
 dependencies = { module=all-binutils; on=all-intl; };
 dependencies = { module=all-binutils; on=all-gas; };
+dependencies = { module=all-binutils; on=all-libctf; };
 
 // We put install-opcodes before install-binutils because the installed
 // binutils might be on PATH, and they might need the shared opcodes
@@ -518,6 +524,14 @@ 
 dependencies = { module=all-fastjar; on=all-zlib; };
 dependencies = { module=all-fastjar; on=all-build-texinfo; };
 dependencies = { module=all-fastjar; on=all-libiberty; };
+dependencies = { module=all-libctf; on=all-libiberty; hard=true; };
+dependencies = { module=all-libctf; on=all-bfd; };
+dependencies = { module=all-libctf; on=all-zlib; };
+// So that checking for ELF support in BFD from libctf configure is possible.
+dependencies = { module=configure-libctf; on=all-bfd; };
+dependencies = { module=configure-libctf; on=all-intl; };
+dependencies = { module=configure-libctf; on=all-zlib; };
+dependencies = { module=configure-libctf; on=all-libiconv; };
 
 // Warning, these are not well tested.
 dependencies = { module=all-bison; on=all-intl; };
Index: configure.ac
===================================================================
--- configure.ac	(revision 271737)
+++ configure.ac	(working copy)
@@ -131,7 +131,7 @@ 
 
 # these libraries are used by various programs built for the host environment
 #f
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"
+host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -928,7 +934,23 @@ 
     ;;
 esac
 
+# Targets that do not use the ELF file format cannot support libctf.
 case "${target}" in
+  *-*-pe | *-*-*vms* | *-*-darwin | *-*-*coff* | *-*-wince | *-*-mingw*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-aout | *-*-osf* | *-*-go32 | *-*-macos* | *-*-rhapsody*)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  *-*-netbsdpe | *-*-cygwin* | *-*-pep | *-*-msdos | *-*-winnt)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+  ns32k-*-* | pdp11-*-* | *-*-aix* | *-*-netbsdaout)
+    noconfigdirs="$noconfigdirs libctf"
+    ;;
+esac
+
+case "${target}" in
   *-*-chorusos)
     ;;
   aarch64-*-darwin*)