diff mbox series

[meta-oe,3/3] syzkaller: Fix build with go 1.21

Message ID 20240303192638.4154965-3-raj.khem@gmail.com
State Accepted, archived
Headers show
Series [meta-oe,1/3] influxdb: Define GOPROXY | expand

Commit Message

Khem Raj March 3, 2024, 7:26 p.m. UTC
- export GOPROXY
- Fix clang-18 found errors by not forcing C++ compiler for CC
  but just passing c++ std library to link with

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-test/syzkaller/syzkaller_git.bb | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-test/syzkaller/syzkaller_git.bb b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
index 2adc06a2bc..b43207f2a7 100644
--- a/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
+++ b/meta-oe/recipes-test/syzkaller/syzkaller_git.bb
@@ -10,7 +10,13 @@  SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IM
            file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \
            file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \
            "
-SRCREV = "6d01f20890edf11b99bb54573025b11c1acd2d52"
+SRCREV = "25905f5d0a2a7883bd33491997556193582c6059"
+
+export GOPROXY = "https://proxy.golang.org,direct"
+# Workaround for network access issue during compile step.
+# This needs to be fixed in the recipes buildsystem so that
+# it can be accomplished during do_fetch task.
+do_compile[network] = "1"
 
 COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
 
@@ -26,6 +32,8 @@  export TARGETVMARCH = '${GOARCH}'
 
 CGO_ENABLED = "1"
 
+LDFLAGS:append:class-target = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "llvm android", " -lc++", " -lstdc++", d)}"
+
 DEPENDS:class-native += "qemu-system-native"
 
 do_compile:class-native() {
@@ -46,7 +54,7 @@  do_compile:class-target() {
     unset GOOS
     unset GOARCH
 
-    oe_runmake GO="${GO}" CC="${CXX}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target
+    oe_runmake GO="${GO}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target
 }
 
 do_install:class-native() {