* [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
@ 2015-03-24 16:43 Uros Bizjak
2015-03-25 14:24 ` Jakub Jelinek
2015-03-26 1:11 ` Jan Hubicka
0 siblings, 2 replies; 8+ messages in thread
From: Uros Bizjak @ 2015-03-24 16:43 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
Hello!
Attached patch introduces bootstrap-lto-noplugin bootstrap
configuration for hosts that do not support linker plugin (e.g. CentOS
5.11 with binutils 2.17). Also, the patch adds some additional
documentation to bootstrap-lto option.
config/ChangeLog:
2015-03-24 Uros Bizjak <ubizjak@gmail.com>
PR bootstrap/65537
* bootstrap-lto-noplugin.mk: New build configuration.
gcc/ChangeLog:
2015-03-24 Uros Bizjak <ubizjak@gmail.com>
PR bootstrap/65537
* doc/install.texi (Building a native compiler): Document new
bootstrap-lto-noplugin configuration. Mention that bootstrap-lto
configuration assumes that the host supports the linker plugin.
Patch was bootstrapped and tested on x86_64-linux-gnu (CentOS 5.11)
host, configured with --with-build-config=bootstrap-lto build
configuration.
OK for mainline?
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1384 bytes --]
Index: config/bootstrap-lto-noplugin.mk
===================================================================
--- config/bootstrap-lto-noplugin.mk (revision 0)
+++ config/bootstrap-lto-noplugin.mk (working copy)
@@ -0,0 +1,6 @@
+# This option enables LTO for stage2 and stage3 on
+# hosts without linker plugin support.
+
+STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGEprofile_CFLAGS += -fno-lto
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi (revision 221636)
+++ gcc/doc/install.texi (working copy)
@@ -2519,8 +2519,14 @@
@item @samp{bootstrap-lto}
Enables Link-Time Optimization for host tools during bootstrapping.
@samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding
-@option{-flto} to @samp{BOOT_CFLAGS}.
+@option{-flto} to @samp{BOOT_CFLAGS}. This option assumes that the host
+supports the linker plugin (e.g. GNU ld version 2.21 or later or GNU gold
+version 2.21 or later).
+@item @samp{bootstrap-lto-noplugin}
+This option is similar to @code{bootstrap-lto}, but is intended for
+hosts that do not support the linker plugin.
+
@item @samp{bootstrap-debug}
Verifies that the compiler generates the same executable code, whether
or not it is asked to emit debug information. To this end, this
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-03-24 16:43 [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537) Uros Bizjak
@ 2015-03-25 14:24 ` Jakub Jelinek
2015-03-25 19:16 ` Uros Bizjak
2015-03-26 1:11 ` Jan Hubicka
1 sibling, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2015-03-25 14:24 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches
On Tue, Mar 24, 2015 at 05:43:09PM +0100, Uros Bizjak wrote:
> Attached patch introduces bootstrap-lto-noplugin bootstrap
> configuration for hosts that do not support linker plugin (e.g. CentOS
> 5.11 with binutils 2.17). Also, the patch adds some additional
> documentation to bootstrap-lto option.
>
> config/ChangeLog:
>
> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>
> PR bootstrap/65537
> * bootstrap-lto-noplugin.mk: New build configuration.
>
> gcc/ChangeLog:
>
> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>
> PR bootstrap/65537
> * doc/install.texi (Building a native compiler): Document new
> bootstrap-lto-noplugin configuration. Mention that bootstrap-lto
> configuration assumes that the host supports the linker plugin.
>
> Patch was bootstrapped and tested on x86_64-linux-gnu (CentOS 5.11)
> host, configured with --with-build-config=bootstrap-lto build
> configuration.
and not --with-build-config=bootstrap-lto-noplugin ?
> OK for mainline?
Ok, thanks.
Jakub
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-03-25 14:24 ` Jakub Jelinek
@ 2015-03-25 19:16 ` Uros Bizjak
0 siblings, 0 replies; 8+ messages in thread
From: Uros Bizjak @ 2015-03-25 19:16 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On Wed, Mar 25, 2015 at 3:23 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> Attached patch introduces bootstrap-lto-noplugin bootstrap
>> configuration for hosts that do not support linker plugin (e.g. CentOS
>> 5.11 with binutils 2.17). Also, the patch adds some additional
>> documentation to bootstrap-lto option.
>>
>> config/ChangeLog:
>>
>> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>>
>> PR bootstrap/65537
>> * bootstrap-lto-noplugin.mk: New build configuration.
>>
>> gcc/ChangeLog:
>>
>> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>>
>> PR bootstrap/65537
>> * doc/install.texi (Building a native compiler): Document new
>> bootstrap-lto-noplugin configuration. Mention that bootstrap-lto
>> configuration assumes that the host supports the linker plugin.
>>
>> Patch was bootstrapped and tested on x86_64-linux-gnu (CentOS 5.11)
>> host, configured with --with-build-config=bootstrap-lto build
>> configuration.
>
> and not --with-build-config=bootstrap-lto-noplugin ?
Oh ... with bootstrap-lto-noplugin option. The bootstrap with linker
plugin does not work at all on CentOS 5.11.
Uros.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-03-24 16:43 [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537) Uros Bizjak
2015-03-25 14:24 ` Jakub Jelinek
@ 2015-03-26 1:11 ` Jan Hubicka
2015-03-26 8:20 ` Uros Bizjak
1 sibling, 1 reply; 8+ messages in thread
From: Jan Hubicka @ 2015-03-26 1:11 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches
> Hello!
>
> Attached patch introduces bootstrap-lto-noplugin bootstrap
> configuration for hosts that do not support linker plugin (e.g. CentOS
> 5.11 with binutils 2.17). Also, the patch adds some additional
> documentation to bootstrap-lto option.
>
> config/ChangeLog:
>
> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>
> PR bootstrap/65537
> * bootstrap-lto-noplugin.mk: New build configuration.
>
> gcc/ChangeLog:
>
> 2015-03-24 Uros Bizjak <ubizjak@gmail.com>
>
> PR bootstrap/65537
> * doc/install.texi (Building a native compiler): Document new
> bootstrap-lto-noplugin configuration. Mention that bootstrap-lto
> configuration assumes that the host supports the linker plugin.
>
> Patch was bootstrapped and tested on x86_64-linux-gnu (CentOS 5.11)
> host, configured with --with-build-config=bootstrap-lto build
> configuration.
>
> OK for mainline?
> Index: gcc/doc/install.texi
> ===================================================================
> --- gcc/doc/install.texi (revision 221636)
> +++ gcc/doc/install.texi (working copy)
> @@ -2519,8 +2519,14 @@
> @item @samp{bootstrap-lto}
> Enables Link-Time Optimization for host tools during bootstrapping.
> @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding
> -@option{-flto} to @samp{BOOT_CFLAGS}.
> +@option{-flto} to @samp{BOOT_CFLAGS}. This option assumes that the host
> +supports the linker plugin (e.g. GNU ld version 2.21 or later or GNU gold
> +version 2.21 or later).
>
> +@item @samp{bootstrap-lto-noplugin}
> +This option is similar to @code{bootstrap-lto}, but is intended for
> +hosts that do not support the linker plugin.
Can you, please, add a note that without linker plugin the static libraries are
not compiled with linktime optimization. Because GCC middle-end and backend is
in libbackend.a it means that only (part of) the frontend is actually LTO
optimized?
Currently it seems bit too welcoming to skip the linker update.
Honza
> +
> @item @samp{bootstrap-debug}
> Verifies that the compiler generates the same executable code, whether
> or not it is asked to emit debug information. To this end, this
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-03-26 1:11 ` Jan Hubicka
@ 2015-03-26 8:20 ` Uros Bizjak
2015-04-06 12:45 ` Gerald Pfeifer
0 siblings, 1 reply; 8+ messages in thread
From: Uros Bizjak @ 2015-03-26 8:20 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches
On Thu, Mar 26, 2015 at 2:11 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hello!
>>
>> Attached patch introduces bootstrap-lto-noplugin bootstrap
>> configuration for hosts that do not support linker plugin (e.g. CentOS
>> 5.11 with binutils 2.17). Also, the patch adds some additional
>> documentation to bootstrap-lto option.
[...]
> Can you, please, add a note that without linker plugin the static libraries are
> not compiled with linktime optimization. Because GCC middle-end and backend is
> in libbackend.a it means that only (part of) the frontend is actually LTO
> optimized?
Thanks, I have added following text to the description:
--cut here--
@item @samp{bootstrap-lto-noplugin}
This option is similar to @code{bootstrap-lto}, but is intended for
-hosts that do not support the linker plugin.
+hosts that do not support the linker plugin. Please note that static
+libraries are not compiled with link time optimizations without
+linker plugin. Since GCC middle-end and back-end are in libbackend.a,
+it means that only part of the frontend is actually LTO optimized.
--cut here--
Uros.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-03-26 8:20 ` Uros Bizjak
@ 2015-04-06 12:45 ` Gerald Pfeifer
2015-04-06 17:19 ` Sandra Loosemore
0 siblings, 1 reply; 8+ messages in thread
From: Gerald Pfeifer @ 2015-04-06 12:45 UTC (permalink / raw)
To: Uros Bizjak, Sandra Loosemore; +Cc: Jan Hubicka, gcc-patches
On Thu, 26 Mar 2015, Uros Bizjak wrote:
> Thanks, I have added following text to the description:
>
> --cut here--
> @item @samp{bootstrap-lto-noplugin}
> This option is similar to @code{bootstrap-lto}, but is intended for
> -hosts that do not support the linker plugin.
> +hosts that do not support the linker plugin. Please note that static
> +libraries are not compiled with link time optimizations without
> +linker plugin. Since GCC middle-end and back-end are in libbackend.a,
> +it means that only part of the frontend is actually LTO optimized.
> --cut here--
I believe there were a couple of issues (link time should be link-time
when it's an adjective, middle-end and back-end on the other hand lose
the the dash when used as a noun,...) and I rewrote this a bit.
Thoughts on the below? Sandra?
Gerald
2015-04-06 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (bootstrap-lto-noplugin): Rewrite.
Index: doc/install.texi
===================================================================
--- doc/install.texi (revision 221832)
+++ doc/install.texi (working copy)
@@ -2525,10 +2525,10 @@
@item @samp{bootstrap-lto-noplugin}
This option is similar to @code{bootstrap-lto}, but is intended for
-hosts that do not support the linker plugin. Please note that static
-libraries are not compiled with link time optimizations without
-linker plugin. Since GCC middle-end and back-end are in libbackend.a,
-it means that only part of the frontend is actually LTO optimized.
+hosts that do not support the linker plugin. Without the linker plugin
+static libraries are not compiled with link-time optimizations. Since
+the GCC middle end and back end are in @file{libbackend.a} this means
+that only the frontend is actually LTO optimized.
@item @samp{bootstrap-debug}
Verifies that the compiler generates the same executable code, whether
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-04-06 12:45 ` Gerald Pfeifer
@ 2015-04-06 17:19 ` Sandra Loosemore
2015-04-08 12:13 ` Gerald Pfeifer
0 siblings, 1 reply; 8+ messages in thread
From: Sandra Loosemore @ 2015-04-06 17:19 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: Uros Bizjak, Jan Hubicka, gcc-patches
On 04/06/2015 06:45 AM, Gerald Pfeifer wrote:
>
> Thoughts on the below? Sandra?
>
> ===================================================================
> --- doc/install.texi (revision 221832)
> +++ doc/install.texi (working copy)
> @@ -2525,10 +2525,10 @@
>
> @item @samp{bootstrap-lto-noplugin}
> This option is similar to @code{bootstrap-lto}, but is intended for
> -hosts that do not support the linker plugin. Please note that static
> -libraries are not compiled with link time optimizations without
> -linker plugin. Since GCC middle-end and back-end are in libbackend.a,
> -it means that only part of the frontend is actually LTO optimized.
> +hosts that do not support the linker plugin. Without the linker plugin
> +static libraries are not compiled with link-time optimizations. Since
> +the GCC middle end and back end are in @file{libbackend.a} this means
> +that only the frontend is actually LTO optimized.
s/frontend/front end/ ??
(Since we have "middle end" and "back end" on the previous line.)
>
> @item @samp{bootstrap-debug}
> Verifies that the compiler generates the same executable code, whether
>
-Sandra
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537)
2015-04-06 17:19 ` Sandra Loosemore
@ 2015-04-08 12:13 ` Gerald Pfeifer
0 siblings, 0 replies; 8+ messages in thread
From: Gerald Pfeifer @ 2015-04-08 12:13 UTC (permalink / raw)
To: Sandra Loosemore; +Cc: Uros Bizjak, Jan Hubicka, gcc-patches
On Mon, 6 Apr 2015, Sandra Loosemore wrote:
> s/frontend/front end/ ??
>
> (Since we have "middle end" and "back end" on the previous line.)
Absolutely -- I should have caught this. Is also is in line with
https://gcc.gnu.org/codingconventions.html.
Here is the updated patch I just committed.
2015-04-08 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (bootstrap-lto-noplugin): Rewrite.
Index: doc/install.texi
===================================================================
--- doc/install.texi (revision 221916)
+++ doc/install.texi (working copy)
@@ -2525,10 +2525,10 @@
@item @samp{bootstrap-lto-noplugin}
This option is similar to @code{bootstrap-lto}, but is intended for
-hosts that do not support the linker plugin. Please note that static
-libraries are not compiled with link time optimizations without
-linker plugin. Since GCC middle-end and back-end are in libbackend.a,
-it means that only part of the frontend is actually LTO optimized.
+hosts that do not support the linker plugin. Without the linker plugin
+static libraries are not compiled with link-time optimizations. Since
+the GCC middle end and back end are in @file{libbackend.a} this means
+that only the front end is actually LTO optimized.
@item @samp{bootstrap-debug}
Verifies that the compiler generates the same executable code, whether
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-04-08 12:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 16:43 [PATCH, bootstrap]: Add bootstrap-lto-noplugin build configuration (PR65537) Uros Bizjak
2015-03-25 14:24 ` Jakub Jelinek
2015-03-25 19:16 ` Uros Bizjak
2015-03-26 1:11 ` Jan Hubicka
2015-03-26 8:20 ` Uros Bizjak
2015-04-06 12:45 ` Gerald Pfeifer
2015-04-06 17:19 ` Sandra Loosemore
2015-04-08 12:13 ` Gerald Pfeifer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).