https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67589
Bug ID: 67589 Summary: go-main: int main() while return NULL Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: syq at debian dot org CC: cmang at google dot com Target Milestone: --- in libgo/runtime/go-main.c, the main method is defined int main, while return NULL. NULL in ppc64el is defined (void *)0, thus fails to build when cross build for native. While it doesn't fail when build with cross build and native build. I use the same version of cross toolchain to cross build a native gcc. Both of them are gcc 5.2.1-17 in Debian. Index: gcc-5-5.2.1/src/libgo/runtime/go-main.c =================================================================== --- gcc-5-5.2.1.orig/src/libgo/runtime/go-main.c +++ gcc-5-5.2.1/src/libgo/runtime/go-main.c @@ -38,7 +38,7 @@ main (int argc, char **argv) runtime_isarchive = false; if (runtime_isstarted) - return NULL; + return 0; runtime_isstarted = true; runtime_check ();