Skip to contentSkip to conversation

go: filter out build specific path from the linker flags

PATCH In review [email protected] 2 participants 3 messages Feb 29, 2024 – Mar 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 go: filter out build specific path from the linker flags

From: Changqing Li <[email protected]>

patch 0007-exec.go-do-not-write-linker-flags-into-buildids.patch removes linker flags from buildids for not breaking reproducibility, but it seems that this will make go not rebuild when linker flag changes, Refer [1]. So remove this oe-specific patch, and change to filter out build specific path from the linker flags

[1] https://github.com/golang/go/issues/63760

---
 meta/recipes-devtools/go/go-1.20.14.inc       |  2 +-
 ...ut-build-specific-paths-from-linker-.patch | 61 +++++++++++++++++++
 ...not-write-linker-flags-into-buildids.patch | 41 -------------
 3 files changed, 62 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch
 delete mode 100644 meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch
meta/recipes-devtools/go/go-1.20.14.inc +1 -1
index 7e425effe5..0726da100f 100644
@@ -11,8 +11,8 @@ SRC_URI += "\
     file://0004-make.bash-override-CC-when-building-dist-and-go_boot.patch \
     file://0005-cmd-dist-separate-host-and-target-builds.patch \
     file://0006-cmd-go-make-GOROOT-precious-by-default.patch \
-    file://0007-exec.go-do-not-write-linker-flags-into-buildids.patch \
     file://0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
     file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \
+    file://0001-exec.go-filter-out-build-specific-paths-from-linker-.patch \
 "
 SRC_URI[main.sha256sum] = "1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e"
meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch new file +61 -0

61 lines not on this page · raw message

meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch deleted +0 -41

41 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Changqing Li

From: Changqing Li <[email protected]>

patch 0007-exec.go-do-not-write-linker-flags-into-buildids.patch removes linker flags from buildids for not breaking reproducibility, but it seems that this will make go not rebuild when linker flag changes, Refer [1]. So remove this oe-specific patch, and change to filter out build specific path from the linker flags

[1] https://github.com/golang/go/issues/63760

Quoted 8 lines

---
 meta/recipes-devtools/go/go-1.20.14.inc       |  2 +- ...ut-build-specific-paths-from-linker-.patch | 61 +++++++++++++++++++ ...not-write-linker-flags-into-buildids.patch | 41 -------------

 3 files changed, 62 insertions(+), 42 deletions(-)

 create mode 100644 meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch delete mode 100644 meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch

Whilst I think this is a good change, I decided to take the 1.21 upgrade and this conflicts. Would you be able to rebase against the new version please?

Thanks,

Richard

#2 lore raw
Quoted 22 lines · Richard Purdie

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 10 lines · Changqing Li

From: Changqing Li <[email protected]>

patch 0007-exec.go-do-not-write-linker-flags-into-buildids.patch removes linker flags from buildids for not breaking reproducibility, but it seems that this will make go not rebuild when linker flag changes, Refer [1]. So remove this oe-specific patch, and change to filter out build specific path from the linker flags

[1] https://github.com/golang/go/issues/63760

Quoted 8 lines
---
  meta/recipes-devtools/go/go-1.20.14.inc       |  2 +-
  ...ut-build-specific-paths-from-linker-.patch | 61 +++++++++++++++++++
  ...not-write-linker-flags-into-buildids.patch | 41 -------------
  3 files changed, 62 insertions(+), 42 deletions(-)

create mode 100644 meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch delete mode 100644 meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch

Quoted 3 lines

Whilst I think this is a good change, I decided to take the 1.21 upgrade and this conflicts. Would you be able to rebase against the new version please?

OK, I noticed that there is a 1.22 on master-next. I will rebase against on 1.22

and send a V2.

Regards

Changqing

Quoted 4 lines

Thanks,

Richard