This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/65404] cgo tool on powerpc-linux-gnu maybe incomplete
- From: "stgraber at stgraber dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Mar 2015 16:53:16 +0000
- Subject: [Bug go/65404] cgo tool on powerpc-linux-gnu maybe incomplete
- Auto-submitted: auto-generated
- References: <bug-65404-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65404
--- Comment #7 from StÃphane Graber <stgraber at stgraber dot org> ---
So with the cherry-picked fix, I get:
(vivid-powerpc-sbuild)root@winton-06:~# cat test.go
package main
/*
#include <stdio.h>
now
void hello() {
printf("Hello world!\n");
}
*/
import "C"
func main() {
C.hello()
}
(vivid-powerpc-sbuild)root@winton-06:~# go build -v -x test.go
WORK=/tmp/go-build320378268
command-line-arguments
mkdir -p $WORK/command-line-arguments/_obj/
cd /root
CGO_LDFLAGS="-g" "-O2" /usr/lib/gcc/powerpc-linux-gnu/5/cgo -objdir
$WORK/command-line-arguments/_obj/ -gccgo -- -I
$WORK/command-line-arguments/_obj/ test.go
# command-line-arguments
./test.go:13:5: call of non-function C.hello
So cgo is now supported and I don't have to force it with CGO_ENABLED=1 but I
still can't use my cgo function.