New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go,cmd/link: "go build" doesn't rebuild the binary after build flags changed #63760
Comments
Please fill out the complete issue template, including the requested output from |
Hi, $aarch64-wrs-linux-go version $aarch64-wrs-linux-go env
$Complete build command line
NOTE:
|
I am doing cross compile with go, version 1.20.6.
Reproduce steps:
this command will generate an binary under builds/plugins/bin/brigde
Run go build -p 48 -v -ldflags="-r /usr/lib/go/pkg/linux_arm64_dynlink -I /usr/lib/ld-linux-aarch64.so.1 ..." ...
we can see the binary brigde still have the old dynamic linker, this will make bridge cannot run on target.
It seems like that "go build" only checks if the cached packagefile is changed, since we don't change any code in step 2, cached packagefile not changed, and bridge is still there, so it did not relink with the new dynamic linker. I think it should relink.
The text was updated successfully, but these errors were encountered: