* [PATCH 0/2] Enable PGO/LTO build in GDB
@ 2021-01-09 15:27 H.J. Lu
2021-01-09 15:27 ` [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training H.J. Lu
2021-01-09 15:27 ` [PATCH 2/2] gnulib: Support variables from the top level Makefile H.J. Lu
0 siblings, 2 replies; 7+ messages in thread
From: H.J. Lu @ 2021-01-09 15:27 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
I have checked the PGO/LTO build patches into master branch. I am
reposting the GDB patches.
H.J. Lu (2):
Set TESTS to gdb.dwarf2/*.exp for PGO build training
gnulib: Support variables from the top level Makefile
gdb/testsuite/Makefile.in | 5 +++++
gnulib/Makefile.am | 39 ++++++++++++++++++++++++++++++++++++++
gnulib/Makefile.in | 40 +++++++++++++++++++++++++++++++++++++++
3 files changed, 84 insertions(+)
--
2.29.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training
2021-01-09 15:27 [PATCH 0/2] Enable PGO/LTO build in GDB H.J. Lu
@ 2021-01-09 15:27 ` H.J. Lu
2021-01-11 21:02 ` Tom Tromey
2021-01-09 15:27 ` [PATCH 2/2] gnulib: Support variables from the top level Makefile H.J. Lu
1 sibling, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2021-01-09 15:27 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
When configured with --enable-pgo-build, set TESTS to gdb.dwarf2/*.exp
for PGO build training.
* Makefile.in (TESTS): Set to gdb.dwarf2/*.exp for PGO build
training.
---
gdb/testsuite/Makefile.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index e33a7c04785..25f19f89c10 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -191,7 +191,12 @@ DO_RUNTEST = \
# of tests. For consistency we support it for check-single as well.
# To specify all tests in a subdirectory, use TESTS=gdb.subdir/*.exp.
# E.g., make check TESTS="gdb.server/*.exp gdb.threads/*.exp".
+ifdef PGO_BUILD_TRAINING
+# Tests for PGO build training.
+override TESTS = gdb.dwarf2/*.exp
+else
TESTS :=
+endif
ifeq ($(strip $(TESTS)),)
expanded_tests_or_none :=
--
2.29.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] gnulib: Support variables from the top level Makefile
2021-01-09 15:27 [PATCH 0/2] Enable PGO/LTO build in GDB H.J. Lu
2021-01-09 15:27 ` [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training H.J. Lu
@ 2021-01-09 15:27 ` H.J. Lu
2021-01-11 21:03 ` Tom Tromey
1 sibling, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2021-01-09 15:27 UTC (permalink / raw)
To: binutils; +Cc: gdb-patches
Work around what appears to be a GNU make bug handling MAKEFLAGS
values defined in terms of make variables, as is the case for CC and
friends when we are called from the top level Makefile.
* Makefile.am (AM_MAKEFLAGS): New.
* Makefile.in: Regenerated.
---
gnulib/Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++
gnulib/Makefile.in | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
diff --git a/gnulib/Makefile.am b/gnulib/Makefile.am
index eae7455683c..35bda85c8d7 100644
--- a/gnulib/Makefile.am
+++ b/gnulib/Makefile.am
@@ -26,3 +26,42 @@
MAKEOVERRIDES =
SUBDIRS = import
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ "MAKE=$(MAKE)" \
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ "PICFLAG=$(PICFLAG)" \
+ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+ "SHELL=$(SHELL)" \
+ "exec_prefix=$(exec_prefix)" \
+ "infodir=$(infodir)" \
+ "libdir=$(libdir)" \
+ "prefix=$(prefix)" \
+ "includedir=$(includedir)" \
+ "tooldir=$(tooldir)" \
+ "AR=$(AR)" \
+ "AS=$(AS)" \
+ "CC=$(CC)" \
+ "CXX=$(CXX)" \
+ "LD=$(LD)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "NM=$(NM)" \
+ "PICFLAG=$(PICFLAG)" \
+ "RANLIB=$(RANLIB)" \
+ "DESTDIR=$(DESTDIR)"
diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in
index c1c21680944..9f843e6b0cb 100644
--- a/gnulib/Makefile.in
+++ b/gnulib/Makefile.in
@@ -1590,6 +1590,46 @@ top_srcdir = @top_srcdir@
# as GCC 4.8.5 (Centos 7).
MAKEOVERRIDES =
SUBDIRS = import
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ "MAKE=$(MAKE)" \
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ "PICFLAG=$(PICFLAG)" \
+ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+ "SHELL=$(SHELL)" \
+ "exec_prefix=$(exec_prefix)" \
+ "infodir=$(infodir)" \
+ "libdir=$(libdir)" \
+ "prefix=$(prefix)" \
+ "includedir=$(includedir)" \
+ "tooldir=$(tooldir)" \
+ "AR=$(AR)" \
+ "AS=$(AS)" \
+ "CC=$(CC)" \
+ "CXX=$(CXX)" \
+ "LD=$(LD)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "NM=$(NM)" \
+ "PICFLAG=$(PICFLAG)" \
+ "RANLIB=$(RANLIB)" \
+ "DESTDIR=$(DESTDIR)"
+
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
--
2.29.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training
2021-01-09 15:27 ` [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training H.J. Lu
@ 2021-01-11 21:02 ` Tom Tromey
2021-01-11 22:51 ` H.J. Lu
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2021-01-11 21:02 UTC (permalink / raw)
To: H.J. Lu via Binutils; +Cc: H.J. Lu, gdb-patches
>>>>> ">" == H J Lu via Binutils <binutils@sourceware.org> writes:
>> When configured with --enable-pgo-build, set TESTS to gdb.dwarf2/*.exp
>> for PGO build training.
>> * Makefile.in (TESTS): Set to gdb.dwarf2/*.exp for PGO build
>> training.
This doesn't seem like a particularly good test to me.
From my perspective, gdb.dwarf2 is largely DWARF corner cases.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnulib: Support variables from the top level Makefile
2021-01-09 15:27 ` [PATCH 2/2] gnulib: Support variables from the top level Makefile H.J. Lu
@ 2021-01-11 21:03 ` Tom Tromey
2021-01-11 22:49 ` H.J. Lu
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2021-01-11 21:03 UTC (permalink / raw)
To: H.J. Lu via Binutils; +Cc: H.J. Lu, gdb-patches
>>>>> ">" == H J Lu via Binutils <binutils@sourceware.org> writes:
>> Work around what appears to be a GNU make bug handling MAKEFLAGS
>> values defined in terms of make variables, as is the case for CC and
>> friends when we are called from the top level Makefile.
Do you know what version of GNU make has this bug?
And is it reported there?
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnulib: Support variables from the top level Makefile
2021-01-11 21:03 ` Tom Tromey
@ 2021-01-11 22:49 ` H.J. Lu
0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 2021-01-11 22:49 UTC (permalink / raw)
To: Tom Tromey; +Cc: H.J. Lu via Binutils, GDB
On Mon, Jan 11, 2021 at 1:03 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> ">" == H J Lu via Binutils <binutils@sourceware.org> writes:
>
> >> Work around what appears to be a GNU make bug handling MAKEFLAGS
> >> values defined in terms of make variables, as is the case for CC and
> >> friends when we are called from the top level Makefile.
>
> Do you know what version of GNU make has this bug?
> And is it reported there?
make 4.3 has this issue. I don't know if it has been reported.
--
H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training
2021-01-11 21:02 ` Tom Tromey
@ 2021-01-11 22:51 ` H.J. Lu
0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 2021-01-11 22:51 UTC (permalink / raw)
To: Tom Tromey; +Cc: H.J. Lu via Binutils, GDB
On Mon, Jan 11, 2021 at 1:02 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> ">" == H J Lu via Binutils <binutils@sourceware.org> writes:
>
> >> When configured with --enable-pgo-build, set TESTS to gdb.dwarf2/*.exp
> >> for PGO build training.
>
> >> * Makefile.in (TESTS): Set to gdb.dwarf2/*.exp for PGO build
> >> training.
>
> This doesn't seem like a particularly good test to me.
> From my perspective, gdb.dwarf2 is largely DWARF corner cases.
Any suitable GDB tests can be used for PGO training.
--
H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-11 22:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 15:27 [PATCH 0/2] Enable PGO/LTO build in GDB H.J. Lu
2021-01-09 15:27 ` [PATCH 1/2] Set TESTS to gdb.dwarf2/*.exp for PGO build training H.J. Lu
2021-01-11 21:02 ` Tom Tromey
2021-01-11 22:51 ` H.J. Lu
2021-01-09 15:27 ` [PATCH 2/2] gnulib: Support variables from the top level Makefile H.J. Lu
2021-01-11 21:03 ` Tom Tromey
2021-01-11 22:49 ` H.J. Lu
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).