diff mbox

ToT build failure?

Message ID 1499363142.7656.158.camel@redhat.com
State New
Headers show

Commit Message

David Malcolm July 6, 2017, 5:45 p.m. UTC
On Thu, 2017-07-06 at 13:18 -0400, David Malcolm wrote:
> On Thu, 2017-07-06 at 10:05 -0700, Steve Ellcey wrote:
> > Is anyone else having problems building a cross-gcc where an intial
> > gcc with C only is built first and used to build glibc?  I am
> > trying this (it worked before) and am getting:
> > 
> > /local/sellcey/gcc-aarch64/obj/gcc_initial/./gcc/xgcc 
> > -B/local/sellcey/gcc-aarch64/obj/gcc_initial/./gcc/ -xc++ -nostdinc
> > /dev/null -S -o /dev/null -fself-test=/local/sellcey/gcc
> > -aarch64/src/gcc/gcc/testsuite/selftests
> > xgcc: error: language c++ not recognized
> > xgcc: error: language c++ not recognized
> > Makefile:1972: recipe for target 's-selftest-c++' failed
> > make[1]: *** [s-selftest-c++] Error 1
> > 
> > The configure I use to build the initial GCC is:
> > 
> > /local/sellcey/gcc-aarch64/src/gcc/configure -
> > -prefix=/local/sellcey/gcc-aarch64/install --target=aarch64-cross
> > -linux-gnu  --with-newlib --without-headers --with
> > -sysroot=/local/sellcey/gcc-aarch64/install --enable-languages=c -
> > -enable-threads=no --disable-shared --disable-decimal-float -
> > -disable
> > -libsanitizer --disable-bootstrap
> > 
> > This is an x86 to aarch64 cross compiler.
> > 
> > Steve Ellcey
> > sellcey@cavium.com
> 
> This is due to r250030, in which I added C++-specific selftests;
> looks
> like I need to also conditionalize them on --enable-languages.
> 
> Sorry about this.
> 
> A workaround is presumably to:
>   touch s-selftest-c++
> 
> I'll revert that change shortly.

Given that the previous status quo of the selftests was to require the
C frontend, I committed the attached patch (as r250036), under the
"obvious" rule, retaining the ability to optionally run the selftests
within the C++ frontend.

Sorry about the breakage
Dave

Comments

Jakub Jelinek July 6, 2017, 6:58 p.m. UTC | #1
On Thu, Jul 06, 2017 at 01:45:42PM -0400, David Malcolm wrote:
> Given that the previous status quo of the selftests was to require the
> C frontend, I committed the attached patch (as r250036), under the
> "obvious" rule, retaining the ability to optionally run the selftests
> within the C++ frontend.

You should do something similar for how we make check etc.:
CHECK_TARGETS = @check_languages@

check: $(CHECK_TARGETS)

and then each Make-lang.in defining its check-<lang> goal.
So similarly to that s-selftest-c++ should be in cp/Make-lang.in
and based on the configured languages should include the s-selftest-<lang>
dependencies.

	Jakub
diff mbox

Patch

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 250035)
+++ gcc/ChangeLog	(revision 250036)
@@ -1,3 +1,7 @@ 
+2017-07-06  David Malcolm  <dmalcolm@redhat.com>
+
+	* Makefile.in (selftest): Remove dependency on s-selftest-c++.
+
 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
 
 	* lto-wrapper.c (merge_and_complain): Do not merge
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 250035)
+++ gcc/Makefile.in	(revision 250036)
@@ -1920,8 +1920,10 @@ 
 # Use "s-selftest-FE" to ensure that we only run the selftests if the
 # driver, frontend, or selftest data change.
 .PHONY: selftest
-selftest: s-selftest-c s-selftest-c++
 
+# By default, only run the selftests within the C frontend
+selftest: s-selftest-c
+
 # C selftests
 s-selftest-c: $(C_SELFTEST_DEPS)
 	$(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS)