This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug go/65404] cgo tool on powerpc-linux-gnu maybe incomplete


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]