1 //go:build linux && !ppc64 && gc && cgo
2 // +build linux,!ppc64,gc,cgo
6 // Copyright 2015 The Go Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style
8 // license that can be found in the LICENSE file.
10 // Test that a -B option is passed through when using both internal
11 // and external linking mode.
24 test("external") // The 'cgo' build constraint should imply that a linker is available.
27 func test(linkmode string) {
28 out, err := exec.Command("go", "run", "-ldflags", "-B=0x12345678 -linkmode="+linkmode, filepath.Join("fixedbugs", "issue10607a.go")).CombinedOutput()
30 fmt.Printf("BUG: linkmode=%s %v\n%s\n", linkmode, err, out)