]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add a note in help buildmode for c-archive on AIX
authorClément Chigot <clement.chigot@atos.net>
Wed, 3 Apr 2019 12:58:05 +0000 (14:58 +0200)
committerIan Lance Taylor <iant@golang.org>
Wed, 3 Apr 2019 17:03:40 +0000 (17:03 +0000)
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: Ian Lance Taylor <iant@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/help/helpdoc.go

index f02df514b7a82c953fa0ad5de9f6d669c9ac5a3b..de07d910d8419443523a165b33535802e973b132 100644 (file)
 //             Build the listed main packages, plus all packages that they
 //             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
 //
index 777bd511b1c9b5db4167a4d1a9ce99cc3e28c4c7..eb663e99b6739734f018fd80e44e728a938f2b48 100644 (file)
@@ -689,6 +689,9 @@ are:
        -buildmode=plugin
                Build the listed main packages, plus all packages that they
                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.
 `,
 }