Commit b0bcd7ae authored by Clément Chigot's avatar Clément Chigot Committed by Ian Lance Taylor

cmd/go: add a note in help buildmode for c-archive on AIX

As ld on AIX doesn't keep the same layout in .text section,
-Wl,-bnoobjreoder must be passed to gcc when building a C program with a
Go archive.

Change-Id: I89b584cce43ab5792f315192b073923c10d5690e
Reviewed-on: https://go-review.googlesource.com/c/go/+/170538
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 2cc17bc5
...@@ -1421,6 +1421,9 @@ ...@@ -1421,6 +1421,9 @@
// Build the listed main packages, plus all packages that they // Build the listed main packages, plus all packages that they
// import, into a Go plugin. Packages not named main are ignored. // import, into a Go plugin. Packages not named main are ignored.
// //
// On AIX, when linking a C program that uses a Go archive built with
// -buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
//
// //
// Calling between Go and C // Calling between Go and C
// //
......
...@@ -689,6 +689,9 @@ are: ...@@ -689,6 +689,9 @@ are:
-buildmode=plugin -buildmode=plugin
Build the listed main packages, plus all packages that they Build the listed main packages, plus all packages that they
import, into a Go plugin. Packages not named main are ignored. import, into a Go plugin. Packages not named main are ignored.
On AIX, when linking a C program that uses a Go archive built with
-buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
`, `,
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment