Patchwork [gccgo] toplevel check-go target

login
register
mail settings
Submitter Ralf Wildenhues
Date Nov. 14, 2010, 4:31 p.m.
Message ID <20101114163151.GM3399@gmx.de>
Download mbox | patch
Permalink /patch/71138/
State New
Headers show

Comments

Ralf Wildenhues - Nov. 14, 2010, 4:31 p.m.
This allows 'make check-go' to work from the toplevel.  Tested by
running that command.  :-)

OK to commit to the branch?  Or add libgo as lib-check-target also?

I get two testsuite failures (with or without the patch):

spawn [open ...]^M
FAIL: ./tmp.go execution,  -O2 -g
[...]
$GOARCH: no such environment variable
FAIL: go.test/test/env.go execution,  -O2 -g

where the first one seems to come from pass 1 of go.test/test/index.go,
and the second one goes away if I set GOARCH to amd64 or so.  Would be
nice if the logging would not mention the temporary file name only.

Thanks,
Ralf

Toplevel check-go target.

2010-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.def: Add gcc-check-target languages entry for go.
	* Makefile.in: Regenerate.
Ian Taylor - Nov. 15, 2010, 6:19 p.m.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> This allows 'make check-go' to work from the toplevel.  Tested by
> running that command.  :-)
>
> OK to commit to the branch?  Or add libgo as lib-check-target also?

Both changes are fine.  Thanks.  Note that I'm not keep ChangeLog
entries on the branch, they will just get thrown away when the merge
occurs.


> I get two testsuite failures (with or without the patch):
>
> spawn [open ...]^M
> FAIL: ./tmp.go execution,  -O2 -g
> [...]
> $GOARCH: no such environment variable
> FAIL: go.test/test/env.go execution,  -O2 -g
>
> where the first one seems to come from pass 1 of go.test/test/index.go,
> and the second one goes away if I set GOARCH to amd64 or so.  Would be
> nice if the logging would not mention the temporary file name only.

The second failure is normal if the environment variable is not set (I
should fix that in go-test.exp) but the first failure is not.  What kind
of system were you running on?

Ian
Ian Taylor - Nov. 18, 2010, 7:27 p.m.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> This allows 'make check-go' to work from the toplevel.  Tested by
> running that command.  :-)
>
> OK to commit to the branch?  Or add libgo as lib-check-target also?
>
> I get two testsuite failures (with or without the patch):
>
> spawn [open ...]^M
> FAIL: ./tmp.go execution,  -O2 -g
> [...]
> $GOARCH: no such environment variable
> FAIL: go.test/test/env.go execution,  -O2 -g
>
> where the first one seems to come from pass 1 of go.test/test/index.go,
> and the second one goes away if I set GOARCH to amd64 or so.  Would be
> nice if the logging would not mention the temporary file name only.


By the way, I realized that the first failure is because you aren't
using the gold linker.  When not using gold, Go code is vulnerable to
stack overflow.  It's not common, as you can see by the fact that only
one test fails, but it's possible, just as it is in a multithreaded
C/C++ program.

Ian

Patch

diff --git a/Makefile.def b/Makefile.def
index d8f4217..2ea05bd 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -590,6 +590,7 @@  languages = { language=ada;	gcc-check-target=check-ada;
 languages = { language=objc;	gcc-check-target=check-objc;
 				lib-check-target=check-target-libobjc; };
 languages = { language=obj-c++;	gcc-check-target=check-obj-c++; };
+languages = { language=go;	gcc-check-target=check-go; };
 
 // Toplevel bootstrap
 bootstrap_stage = { id=1 ; };