Closed kyleconroy closed 10 years ago
The pagezero_size
flag exists when using ld64 on OSX. Am I using crosstool-ng correctly? I'm not sure why the toolchain I built isn't using ld64.
CC=x86_64-build_unknown-linux-gnu-gcc is wrong. CC=x86_64-apple-darwin10-gcc is better, x86_64-apple-darwin10-clang is even better.
On Fri, Mar 14, 2014 at 2:38 AM, Kyle Conroy notifications@github.comwrote:
The pagezero_size flag exists when using ld64 on OSX. Am I using crosstool-ng correctly? I'm not sure why the toolchain I build isn't using ld64.
Reply to this email directly or view it on GitHubhttps://github.com/diorcety/crosstool-ng/issues/17#issuecomment-37610608 .
Thanks, I somehow missed the ~/x-tools directory, where all the needed compilers ended up. Thanks for the help!
I'm attempting to use the x64_64-apple-darwin10 toolchain to cross compile Go programs that utilize cgo (the official bridge between C code and Go code).
I've built the x86_64-apple-darwin10 toolchain on Ubuntu 12.04, building crosstool-ng from source.
I'm attempting to build a very simple cgo program, echocgo, which just prints out command line arguments.
I'm compiling the program with the following command
I'm not sure why the name of the apple-darwin toolchain is
x86_64-build_unknown-linux-gnu-gcc
. Anyways, the above command eventually calls out to the linker here:This fails with the error
So I'm wondering two things: is the toolchain using the correct linker? And secondly, why that flag doesn't work using the apple-darwin10 toolchain. Thanks for reading this long and rambling bug report.