From patchwork Sat Jan 7 03:06:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 17805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76EEBC46467 for ; Sat, 7 Jan 2023 03:07:11 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.13022.1673060823743205869 for ; Fri, 06 Jan 2023 19:07:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dmFWI/wO; spf=pass (domain: gmail.com, ip: 209.85.210.175, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f175.google.com with SMTP id g20so2425577pfb.3 for ; Fri, 06 Jan 2023 19:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3Ss7roi24uwGRcTjc/vT/2kuj9pH4s3ERT6O54algho=; b=dmFWI/wO6zEsMaMcKPKxpIL46nx2hmVpZlzycjL0Bz3rkCdOlaNeP1I7ODoj4it1TU sZuOnpvLS0X0KjY9ZSs34dWaEqpqPjFEZaPzYmzjwrKAQeBnDuxYjwnajS8wRyZWR2Ns EGdDm7Gnx0KtbaBYS/0L0+ZUWXH1lU8ADb5jFseaB4xKiWSNJmyItya09WmnW/An6veq O9+jWUC6uDBFw28Z2jhMXTTFHrpSefpvARJVX+ANBIZeH8YijzQ7aaAZx704LE1MQRdp y5Em79ppCuDV3S8T8f3fhn8kNCK2drGzmhYo/WEM9hAsXx4QR2JomnkJxmbvUZ3CjCQF o71w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3Ss7roi24uwGRcTjc/vT/2kuj9pH4s3ERT6O54algho=; b=4CY2DyLsScP4QyzY/eTBmQUgoomcZhxnmjiYGmr1bx8Vf5S/gnMZE63jysrY9XVGor Ih3UKz2nNsmlONsIOnnOkvm9jcB0ED6SLVGBPVs6dGPK1W2cSeNeJiuUl37yelXWFBw5 mqpHc3/+pE9S8xCOVQD49E+rGnEa3YQZyFmjVPa3A1qJ071+KZUFhFrt6NpiSZnwaAPE TQ8tyd2ibM6DF66oAmdLVNDk8uvcgMxplvX7nt5T+A2Ak9mQNAXyTxc+PkCwwIPq3MdA QJh1RpkIIys2zlNwAtwqN3GYGlpKzk4W99EWnQjUh3A2AVmdHn5Gqt87n2v43AxaXoHG P2bg== X-Gm-Message-State: AFqh2kq9gMBaBzvMwkHz1FWK69hoxIcsY+9QYNjh/C6vDTWpEYPfrDU/ BSFLsjKtxRv/aj+w3vLsPD7ER71ECB9EWw== X-Google-Smtp-Source: AMrXdXuKhJMuniblzNi4o5tq12VwgGTx5x6hDt+7eh0WGwCb3neKQJtmj+LpqWfV0/5J8gav7pCjCA== X-Received: by 2002:a62:1791:0:b0:578:8533:9573 with SMTP id 139-20020a621791000000b0057885339573mr49003033pfx.22.1673060822735; Fri, 06 Jan 2023 19:07:02 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::ee35]) by smtp.gmail.com with ESMTPSA id q1-20020aa79821000000b005821db4ff2csm1786180pfl.69.2023.01.06.19.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 19:07:02 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 1/4] libtraceevent: Move plugins into package of its own Date: Fri, 6 Jan 2023 19:06:57 -0800 Message-Id: <20230107030700.1371576-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 07 Jan 2023 03:07:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100429 From Peter Bergin see https://github.com/openembedded/meta-openembedded/pull/632/commits/cf672ba52f8c4d983ad9a74b67f226ac753a50f8 Signed-off-by: Khem Raj --- meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb b/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb index bae84c7242..cff86722e4 100644 --- a/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb +++ b/meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb @@ -20,4 +20,6 @@ do_install() { oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig } -FILES:${PN} += "${libdir}/traceevent" +PACKAGES += "${PN}-plugins" + +FILES:${PN}-plugins += "${libdir}/traceevent/plugins" From patchwork Sat Jan 7 03:06:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 17806 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 790AFC61DB3 for ; Sat, 7 Jan 2023 03:07:11 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web10.13024.1673060826403205119 for ; Fri, 06 Jan 2023 19:07:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=I3yj3Wqc; spf=pass (domain: gmail.com, ip: 209.85.210.180, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f180.google.com with SMTP id a30so2420949pfr.6 for ; Fri, 06 Jan 2023 19:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TeAW5usizZPaHlEcCXfoELKIQDCbxcOdN+oavf+5JJM=; b=I3yj3WqcvdFwB/aaxXXv8SsYYAjwVKClU789ZVlEi5mLsQV+ov/p1uHtr18neA8H+L Ka5MsExXFllv6Yl/O/GDQmuV0jlt8EzTBcABLgpWNXb3UPEqay+Qgyls3v2r0jeJqlt4 +fIGd6aqydzh6t3T/sLEqV0WMh/GjMZJtvwrOowRK953cCiz6kKCNYffZm+848SBYWAq wIzXkpIaK8di50SaD+wv/tuN2Xcd+JRg2z8gU30NQdelbe6nLu23FSwYQuXcWtH7OalF LhgPbPasNAgcJNoEWCjRZ3JrgpQAXpQjSAkJB/kXUJv+N0GYxGNvHtBcm/dXCsqSeM2K Lxnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TeAW5usizZPaHlEcCXfoELKIQDCbxcOdN+oavf+5JJM=; b=UN9mf+ZPNmc+zOlWoRlAK6+LoX6ofk4qrddf64XHIAveq/5oNzsgyhYYAMpzvMx4Fg Pka7T0VTLcKo55wyIf9JZx4rblcXOvfsbiS5fJRlwIKLw/oeGga8/iDywsHdQGHVqC4o q3OLT9k+rdKf4/5aZJ6sD6gDrAjcujDrdombH1sbQDTF51adoRIP0ooHn+uPDwYZqQ/P MxJvTZqr9yOcUlGGTzw3hFP0sAmPEsMHKwVFJ9HOm47XyMrPak2GFaLY2hWZPVWEkZJx MGKOAbBki7jc5TyYcgi7Bi7o24pMCfoaGbD1dhxTqOdiaxDEpOV08rMHaxDA2Hu0c9+b zoOg== X-Gm-Message-State: AFqh2koJi6hjJ72reVGtNg/T+gmuZjuHT5MPXYDda4qw4f4FMSnpp4Yx XuNIlVGRQ7nNUYV4fZlHNYeFnUCGuz8z7g== X-Google-Smtp-Source: AMrXdXuKoiGUTTGlUADwdc8HEmit9JdATJzilRX6ytoDLtWoQRB0D1jMZ5Wq9NZndfNGN2/6qzlz8g== X-Received: by 2002:aa7:8284:0:b0:580:e549:559e with SMTP id s4-20020aa78284000000b00580e549559emr42059367pfm.17.1673060823751; Fri, 06 Jan 2023 19:07:03 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::ee35]) by smtp.gmail.com with ESMTPSA id q1-20020aa79821000000b005821db4ff2csm1786180pfl.69.2023.01.06.19.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 19:07:03 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 2/4] trace-cmd: Upgrade to 3.1.5 Date: Fri, 6 Jan 2023 19:06:58 -0800 Message-Id: <20230107030700.1371576-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230107030700.1371576-1-raj.khem@gmail.com> References: <20230107030700.1371576-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 07 Jan 2023 03:07:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100431 = Drop uneeded 0001-trace-cmd-make-it-build-with-musl.patch - Update LFS64 patch with the upstream submitted one - Add a patch to remove useless rpaths Signed-off-by: Khem Raj --- .../0001-Do-not-emit-useless-rpath.patch | 34 + ...LFS64-interfaces-off64_t-and-lseek64.patch | 1136 +++++++++++++++++ ...01-trace-cmd-make-it-build-with-musl.patch | 132 -- .../0002-replace-off64_t-and-lseek64.patch | 426 ------- .../trace-cmd/trace-cmd_2.9.1.bb | 32 - .../trace-cmd/trace-cmd_3.1.5.bb | 31 + 6 files changed, 1201 insertions(+), 590 deletions(-) create mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch create mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch delete mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch delete mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch delete mode 100644 meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb create mode 100644 meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch b/meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch new file mode 100644 index 0000000000..13a86e65d1 --- /dev/null +++ b/meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch @@ -0,0 +1,34 @@ +From 90fbc3423b5ccdbd54b5851c32b9f92c6658d634 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 6 Jan 2023 17:30:24 -0800 +Subject: [PATCH] Do not emit useless rpath + +rpath is pointing to standard libdir which is un-used and yocto build QA +flag it, there is no need to set rpaths when building in this +environment + +Fixes +do_package_qa: QA Issue: trace-cmd: /usr/bin/trace-cmd contains probably-redundant RPATH /usr/lib [useless-rpaths] + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj +--- + scripts/utils.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/utils.mk b/scripts/utils.mk +index 3fc2d74f..309a8599 100644 +--- a/scripts/utils.mk ++++ b/scripts/utils.mk +@@ -64,7 +64,7 @@ do_compile = \ + + do_app_build = \ + ($(print_app_build) \ +- $(CC) $^ -rdynamic -Wl,-rpath=$(libdir) -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) ++ $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) + + do_build_static_lib = \ + ($(print_static_lib_build) \ +-- +2.39.0 + diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch b/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch new file mode 100644 index 0000000000..830f1d96e1 --- /dev/null +++ b/meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch @@ -0,0 +1,1136 @@ +From c6190920d405a5a6df3797153be93905d98a65f5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 6 Jan 2023 16:53:06 -0800 +Subject: [PATCH] Replace LFS64 interfaces off64_t and lseek64 + +Musl does not define these interfaces unless -D_LARGEFILE64_SOURCE is +defined and that too it is transitional until apps switch to using 64bit +off_t. We pass -D_LARGEFILE64_SOURCE in makefiles already therefore +original lseek and off_t are already 64bit + +This fixes build with latest musl which has dropped LFS64 interfaces [1] + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4i + +Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230107010245.1290391-1-raj.khem@gmail.com/] +Signed-off-by: Khem Raj +--- + .../include/private/trace-cmd-private.h | 12 +- + lib/trace-cmd/include/trace-cmd-local.h | 4 +- + lib/trace-cmd/trace-compress.c | 30 ++--- + lib/trace-cmd/trace-input.c | 110 +++++++++--------- + lib/trace-cmd/trace-msg.c | 20 ++-- + lib/trace-cmd/trace-output.c | 64 +++++----- + lib/trace-cmd/trace-recorder.c | 8 +- + tracecmd/trace-dump.c | 34 +++--- + tracecmd/trace-read.c | 2 +- + 9 files changed, 142 insertions(+), 142 deletions(-) + +diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h +index 271f0541..ac2d02c3 100644 +--- a/lib/trace-cmd/include/private/trace-cmd-private.h ++++ b/lib/trace-cmd/include/private/trace-cmd-private.h +@@ -106,7 +106,7 @@ const char *tracecmd_get_trace_clock(struct tracecmd_input *handle); + const char *tracecmd_get_cpustats(struct tracecmd_input *handle); + const char *tracecmd_get_uname(struct tracecmd_input *handle); + const char *tracecmd_get_version(struct tracecmd_input *handle); +-off64_t tracecmd_get_cpu_file_size(struct tracecmd_input *handle, int cpu); ++off_t tracecmd_get_cpu_file_size(struct tracecmd_input *handle, int cpu); + + static inline int tracecmd_host_bigendian(void) + { +@@ -336,7 +336,7 @@ int tracecmd_write_buffer_info(struct tracecmd_output *handle); + + int tracecmd_write_cpus(struct tracecmd_output *handle, int cpus); + int tracecmd_write_cmdlines(struct tracecmd_output *handle); +-int tracecmd_prepare_options(struct tracecmd_output *handle, off64_t offset, int whence); ++int tracecmd_prepare_options(struct tracecmd_output *handle, off_t offset, int whence); + int tracecmd_write_options(struct tracecmd_output *handle); + int tracecmd_write_meta_strings(struct tracecmd_output *handle); + int tracecmd_append_options(struct tracecmd_output *handle); +@@ -393,7 +393,7 @@ struct tracecmd_msg_handle { + short cpu_count; + short version; /* Current protocol version */ + unsigned long flags; +- off64_t cache_start_offset; ++ off_t cache_start_offset; + bool done; + bool cache; + int cfd; +@@ -542,8 +542,8 @@ int tracecmd_write_guest_time_shift(struct tracecmd_output *handle, + struct tracecmd_compress_chunk { + unsigned int size; + unsigned int zsize; +- off64_t zoffset; +- off64_t offset; ++ off_t zoffset; ++ off_t offset; + }; + struct tracecmd_compression; + struct tracecmd_compression_proto { +@@ -569,7 +569,7 @@ int tracecmd_compress_buffer_read(struct tracecmd_compression *handle, char *dst + int tracecmd_compress_pread(struct tracecmd_compression *handle, char *dst, int len, off_t offset); + int tracecmd_compress_buffer_write(struct tracecmd_compression *handle, + const void *data, unsigned long long size); +-off64_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off64_t offset, int whence); ++off_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off_t offset, int whence); + int tracecmd_compress_proto_get_name(struct tracecmd_compression *compress, + const char **name, const char **version); + bool tracecmd_compress_is_supported(const char *name, const char *version); +diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h +index db0b2c21..ebd6f152 100644 +--- a/lib/trace-cmd/include/trace-cmd-local.h ++++ b/lib/trace-cmd/include/trace-cmd-local.h +@@ -94,13 +94,13 @@ out_add_buffer_option(struct tracecmd_output *handle, const char *name, + struct cpu_data_source { + int fd; + int size; +- off64_t offset; ++ off_t offset; + }; + + int out_write_cpu_data(struct tracecmd_output *handle, int cpus, + struct cpu_data_source *data, const char *buff_name); + int out_write_emty_cpu_data(struct tracecmd_output *handle, int cpus); +-off64_t msg_lseek(struct tracecmd_msg_handle *msg_handle, off64_t offset, int whence); ++off_t msg_lseek(struct tracecmd_msg_handle *msg_handle, off_t offset, int whence); + unsigned long long get_last_option_offset(struct tracecmd_input *handle); + unsigned int get_meta_strings_size(struct tracecmd_input *handle); + int trace_append_options(struct tracecmd_output *handle, void *buf, size_t len); +diff --git a/lib/trace-cmd/trace-compress.c b/lib/trace-cmd/trace-compress.c +index 461de8d0..1b852f18 100644 +--- a/lib/trace-cmd/trace-compress.c ++++ b/lib/trace-cmd/trace-compress.c +@@ -117,12 +117,12 @@ static inline int buffer_extend(struct tracecmd_compression *handle, unsigned in + * + * Returns the new file pointer on success, or -1 in case of an error. + */ +-off64_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off64_t offset, int whence) ++off_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off_t offset, int whence) + { + unsigned long p; + + if (!handle || !handle->buffer) +- return (off64_t)-1; ++ return (off_t)-1; + + switch (whence) { + case SEEK_CUR: +@@ -135,11 +135,11 @@ off64_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off64_t off + p = offset; + break; + default: +- return (off64_t)-1; ++ return (off_t)-1; + } + + if (buffer_extend(handle, p)) +- return (off64_t)-1; ++ return (off_t)-1; + + handle->pointer = p; + +@@ -678,7 +678,7 @@ int tracecmd_compress_copy_from(struct tracecmd_compression *handle, int fd, int + unsigned int size; + unsigned int all; + unsigned int r; +- off64_t offset; ++ off_t offset; + char *buf_from; + char *buf_to; + int endian4; +@@ -700,7 +700,7 @@ int tracecmd_compress_copy_from(struct tracecmd_compression *handle, int fd, int + return -1; + + /* save the initial offset and write 0 as initial chunk count */ +- offset = lseek64(handle->fd, 0, SEEK_CUR); ++ offset = lseek(handle->fd, 0, SEEK_CUR); + write_fd(handle->fd, &chunks, 4); + + do { +@@ -760,13 +760,13 @@ int tracecmd_compress_copy_from(struct tracecmd_compression *handle, int fd, int + if (all) + return -1; + +- if (lseek64(handle->fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, offset, SEEK_SET) == (off_t)-1) + return -1; + + endian4 = tep_read_number(handle->tep, &chunks, 4); + /* write chunks count*/ + write_fd(handle->fd, &chunks, 4); +- if (lseek64(handle->fd, 0, SEEK_END) == (off_t)-1) ++ if (lseek(handle->fd, 0, SEEK_END) == (off_t)-1) + return -1; + + if (read_size) +@@ -796,7 +796,7 @@ int tracecmd_load_chunks_info(struct tracecmd_compression *handle, + struct tracecmd_compress_chunk *chunks = NULL; + unsigned long long size = 0; + unsigned int count = 0; +- off64_t offset; ++ off_t offset; + int ret = -1; + char buf[4]; + int i; +@@ -804,8 +804,8 @@ int tracecmd_load_chunks_info(struct tracecmd_compression *handle, + if (!handle) + return -1; + +- offset = lseek64(handle->fd, 0, SEEK_CUR); +- if (offset == (off64_t)-1) ++ offset = lseek(handle->fd, 0, SEEK_CUR); ++ if (offset == (off_t)-1) + return -1; + + if (read(handle->fd, buf, 4) != 4) +@@ -822,7 +822,7 @@ int tracecmd_load_chunks_info(struct tracecmd_compression *handle, + goto out; + + for (i = 0; i < count; i++) { +- chunks[i].zoffset = lseek64(handle->fd, 0, SEEK_CUR); ++ chunks[i].zoffset = lseek(handle->fd, 0, SEEK_CUR); + if (chunks[i].zoffset == (off_t)-1) + goto out; + if (read(handle->fd, buf, 4) != 4) +@@ -833,13 +833,13 @@ int tracecmd_load_chunks_info(struct tracecmd_compression *handle, + goto out; + chunks[i].size = tep_read_number(handle->tep, buf, 4); + size += chunks[i].size; +- if (lseek64(handle->fd, chunks[i].zsize, SEEK_CUR) == (off64_t)-1) ++ if (lseek(handle->fd, chunks[i].zsize, SEEK_CUR) == (off_t)-1) + goto out; + } + + ret = count; + out: +- if (lseek64(handle->fd, offset, SEEK_SET) == (off64_t)-1) ++ if (lseek(handle->fd, offset, SEEK_SET) == (off_t)-1) + ret = -1; + + if (ret > 0 && chunks_info) +@@ -872,7 +872,7 @@ int tracecmd_uncompress_chunk(struct tracecmd_compression *handle, + if (!handle || !handle->proto || !handle->proto->uncompress_block || !chunk || !data) + return -1; + +- if (lseek64(handle->fd, chunk->zoffset + 8, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, chunk->zoffset + 8, SEEK_SET) == (off_t)-1) + return -1; + + bytes_in = malloc(chunk->zsize); +diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c +index 594eb74a..9b128403 100644 +--- a/lib/trace-cmd/trace-input.c ++++ b/lib/trace-cmd/trace-input.c +@@ -37,8 +37,8 @@ static int force_read = 0; + + struct page_map { + struct list_head list; +- off64_t offset; +- off64_t size; ++ off_t offset; ++ off_t size; + void *map; + int ref_count; + }; +@@ -54,7 +54,7 @@ struct follow_event { + + struct page { + struct list_head list; +- off64_t offset; ++ off_t offset; + struct tracecmd_input *handle; + struct page_map *page_map; + void *map; +@@ -541,7 +541,7 @@ static struct file_section *section_open(struct tracecmd_input *handle, int id) + if (!sec) + return NULL; + +- if (lseek64(handle->fd, sec->data_offset, SEEK_SET) == (off64_t)-1) ++ if (lseek(handle->fd, sec->data_offset, SEEK_SET) == (off_t)-1) + return NULL; + + if ((sec->flags & TRACECMD_SEC_FL_COMPRESS) && in_uncompress_block(handle)) +@@ -593,7 +593,7 @@ static int read_header_files(struct tracecmd_input *handle) + + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_HEADER_INFO, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + if (do_read_check(handle, buf, 12)) + return -1; +@@ -800,7 +800,7 @@ static int read_ftrace_files(struct tracecmd_input *handle, const char *regex) + + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_FTRACE_EVENTS, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + if (regex) { + sreg = &spreg; +@@ -875,7 +875,7 @@ static int read_event_files(struct tracecmd_input *handle, const char *regex) + + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_EVENT_FORMATS, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + if (regex) { + sreg = &spreg; +@@ -962,7 +962,7 @@ static int read_proc_kallsyms(struct tracecmd_input *handle) + return 0; + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_KALLSYMS, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + if (read4(handle, &size) < 0) + return -1; +@@ -999,7 +999,7 @@ static int read_ftrace_printk(struct tracecmd_input *handle) + + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_PRINTK, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + if (read4(handle, &size) < 0) + return -1; +@@ -1173,7 +1173,7 @@ static int handle_section(struct tracecmd_input *handle, struct file_section *se + unsigned long long size; + int ret; + +- if (lseek64(handle->fd, section->section_offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, section->section_offset, SEEK_SET) == (off_t)-1) + return -1; + if (read_section_header(handle, &id, &flags, &size, NULL)) + return -1; +@@ -1181,7 +1181,7 @@ static int handle_section(struct tracecmd_input *handle, struct file_section *se + if (id != section->id) + return -1; + +- section->data_offset = lseek64(handle->fd, 0, SEEK_CUR); ++ section->data_offset = lseek(handle->fd, 0, SEEK_CUR); + if ((section->flags & TRACECMD_SEC_FL_COMPRESS) && in_uncompress_block(handle)) + return -1; + +@@ -1225,7 +1225,7 @@ static int read_headers(struct tracecmd_input *handle, const char *regex) + if (!handle->options_start) + return -1; + +- if (lseek64(handle->fd, handle->options_start, SEEK_SET) == (off64_t)-1) { ++ if (lseek(handle->fd, handle->options_start, SEEK_SET) == (off_t)-1) { + tracecmd_warning("Filed to goto options offset %lld", handle->options_start); + return -1; + } +@@ -1269,11 +1269,11 @@ static unsigned long long calc_page_offset(struct tracecmd_input *handle, + return offset & ~(handle->page_size - 1); + } + +-static int read_page(struct tracecmd_input *handle, off64_t offset, ++static int read_page(struct tracecmd_input *handle, off_t offset, + int cpu, void *map) + { +- off64_t save_seek; +- off64_t ret; ++ off_t save_seek; ++ off_t ret; + + if (handle->use_pipe) { + ret = read(handle->cpu_data[cpu].pipe_fd, map, handle->page_size); +@@ -1291,9 +1291,9 @@ static int read_page(struct tracecmd_input *handle, off64_t offset, + } + + /* other parts of the code may expect the pointer to not move */ +- save_seek = lseek64(handle->fd, 0, SEEK_CUR); ++ save_seek = lseek(handle->fd, 0, SEEK_CUR); + +- ret = lseek64(handle->fd, offset, SEEK_SET); ++ ret = lseek(handle->fd, offset, SEEK_SET); + if (ret < 0) + return -1; + ret = read(handle->fd, map, handle->page_size); +@@ -1301,7 +1301,7 @@ static int read_page(struct tracecmd_input *handle, off64_t offset, + return -1; + + /* reset the file pointer back */ +- lseek64(handle->fd, save_seek, SEEK_SET); ++ lseek(handle->fd, save_seek, SEEK_SET); + + return 0; + } +@@ -1348,7 +1348,7 @@ static int chunk_cmp(const void *A, const void *B) + return 1; + } + +-static struct tracecmd_compress_chunk *get_zchunk(struct cpu_data *cpu, off64_t offset) ++static struct tracecmd_compress_chunk *get_zchunk(struct cpu_data *cpu, off_t offset) + { + struct cpu_zdata *cpuz = &cpu->compress; + struct tracecmd_compress_chunk *chunk; +@@ -1398,7 +1398,7 @@ found: + free(cache); + } + +-static void *read_zpage(struct tracecmd_input *handle, int cpu, off64_t offset) ++static void *read_zpage(struct tracecmd_input *handle, int cpu, off_t offset) + { + struct cpu_data *cpu_data = &handle->cpu_data[cpu]; + struct tracecmd_compress_chunk *chunk; +@@ -1448,12 +1448,12 @@ error: + } + + static void *allocate_page_map(struct tracecmd_input *handle, +- struct page *page, int cpu, off64_t offset) ++ struct page *page, int cpu, off_t offset) + { + struct cpu_data *cpu_data = &handle->cpu_data[cpu]; + struct page_map *page_map; +- off64_t map_size; +- off64_t map_offset; ++ off_t map_size; ++ off_t map_offset; + void *map; + int ret; + int fd; +@@ -1544,7 +1544,7 @@ static void *allocate_page_map(struct tracecmd_input *handle, + } + + static struct page *allocate_page(struct tracecmd_input *handle, +- int cpu, off64_t offset) ++ int cpu, off_t offset) + { + struct cpu_data *cpu_data = &handle->cpu_data[cpu]; + struct page **pages; +@@ -1851,7 +1851,7 @@ static int update_page_info(struct tracecmd_input *handle, int cpu) + * -1 on error + */ + static int get_page(struct tracecmd_input *handle, int cpu, +- off64_t offset) ++ off_t offset) + { + /* Don't map if the page is already where we want */ + if (handle->cpu_data[cpu].offset == offset && +@@ -1895,7 +1895,7 @@ static int get_page(struct tracecmd_input *handle, int cpu, + + static int get_next_page(struct tracecmd_input *handle, int cpu) + { +- off64_t offset; ++ off_t offset; + + if (!handle->cpu_data[cpu].page && !handle->use_pipe) + return 0; +@@ -2122,7 +2122,7 @@ struct tep_record * + tracecmd_read_cpu_last(struct tracecmd_input *handle, int cpu) + { + struct tep_record *record = NULL; +- off64_t offset, page_offset; ++ off_t offset, page_offset; + + offset = handle->cpu_data[cpu].file_offset + + handle->cpu_data[cpu].file_size; +@@ -2183,7 +2183,7 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu, + unsigned long long ts) + { + struct cpu_data *cpu_data = &handle->cpu_data[cpu]; +- off64_t start, end, next; ++ off_t start, end, next; + + if (cpu < 0 || cpu >= handle->cpus) { + errno = -EINVAL; +@@ -3064,11 +3064,11 @@ static int init_cpu_zfile(struct tracecmd_input *handle, int cpu) + { + struct cpu_data *cpu_data; + unsigned long long size; +- off64_t offset; ++ off_t offset; + + cpu_data = &handle->cpu_data[cpu]; +- offset = lseek64(handle->fd, 0, SEEK_CUR); +- if (lseek64(handle->fd, cpu_data->file_offset, SEEK_SET) == (off_t)-1) ++ offset = lseek(handle->fd, 0, SEEK_CUR); ++ if (lseek(handle->fd, cpu_data->file_offset, SEEK_SET) == (off_t)-1) + return -1; + + strcpy(cpu_data->compress.file, COMPR_TEMP_FILE); +@@ -3079,7 +3079,7 @@ static int init_cpu_zfile(struct tracecmd_input *handle, int cpu) + if (tracecmd_uncompress_copy_to(handle->compress, cpu_data->compress.fd, NULL, &size)) + return -1; + +- if (lseek64(handle->fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, offset, SEEK_SET) == (off_t)-1) + return -1; + + cpu_data->file_offset = handle->next_offset; +@@ -3098,7 +3098,7 @@ static int init_cpu_zpage(struct tracecmd_input *handle, int cpu) + int count; + int i; + +- if (lseek64(handle->fd, cpu_data->file_offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, cpu_data->file_offset, SEEK_SET) == (off_t)-1) + return -1; + + count = tracecmd_load_chunks_info(handle->compress, &cpu_data->compress.chunks); +@@ -3576,7 +3576,7 @@ static int handle_option_done(struct tracecmd_input *handle, char *buf, int size + if (size < 8) + return -1; + +- offset = lseek64(handle->fd, 0, SEEK_CUR); ++ offset = lseek(handle->fd, 0, SEEK_CUR); + if (offset >= size) + handle->options_last_offset = offset - size; + +@@ -3584,7 +3584,7 @@ static int handle_option_done(struct tracecmd_input *handle, char *buf, int size + if (!offset) + return 0; + +- if (lseek64(handle->fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, offset, SEEK_SET) == (off_t)-1) + return -1; + + return handle_options(handle); +@@ -3741,7 +3741,7 @@ static int handle_options(struct tracecmd_input *handle) + int ret; + + if (!HAS_SECTIONS(handle)) { +- handle->options_start = lseek64(handle->fd, 0, SEEK_CUR); ++ handle->options_start = lseek(handle->fd, 0, SEEK_CUR); + } else { + if (read_section_header(handle, &id, &flags, NULL, NULL)) + return -1; +@@ -4102,7 +4102,7 @@ int init_latency_data(struct tracecmd_input *handle) + if (ret) + return -1; + +- lseek64(handle->latz.fd, 0, SEEK_SET); ++ lseek(handle->latz.fd, 0, SEEK_SET); + } + + return 0; +@@ -4118,7 +4118,7 @@ static int init_buffer_cpu_data(struct tracecmd_input *handle, struct input_buff + if (handle->cpu_data) + return -1; + +- if (lseek64(handle->fd, buffer->offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, buffer->offset, SEEK_SET) == (off_t)-1) + return -1; + if (read_section_header(handle, &id, &flags, NULL, NULL)) + return -1; +@@ -4246,7 +4246,7 @@ static int read_and_parse_cmdlines(struct tracecmd_input *handle) + + if (!HAS_SECTIONS(handle)) + section_add_or_update(handle, TRACECMD_OPTION_CMDLINES, 0, 0, +- lseek64(handle->fd, 0, SEEK_CUR)); ++ lseek(handle->fd, 0, SEEK_CUR)); + + + if (read_data_and_size(handle, &cmdlines, &size) < 0) +@@ -4554,9 +4554,9 @@ static int read_metadata_strings(struct tracecmd_input *handle) + unsigned short id; + unsigned int csize, rsize; + unsigned long long size; +- off64_t offset; ++ off_t offset; + +- offset = lseek64(handle->fd, 0, SEEK_CUR); ++ offset = lseek(handle->fd, 0, SEEK_CUR); + do { + if (read_section_header(handle, &id, &flags, &size, NULL)) + break; +@@ -4575,12 +4575,12 @@ static int read_metadata_strings(struct tracecmd_input *handle) + if (flags & TRACECMD_SEC_FL_COMPRESS) + in_uncompress_reset(handle); + } else { +- if (lseek64(handle->fd, size, SEEK_CUR) == (off_t)-1) ++ if (lseek(handle->fd, size, SEEK_CUR) == (off_t)-1) + break; + } + } while (1); + +- if (lseek64(handle->fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(handle->fd, offset, SEEK_SET) == (off_t)-1) + return -1; + + return found ? 0 : -1; +@@ -4683,9 +4683,9 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd, int flags) + handle->page_size = page_size; + handle->next_offset = page_size; + +- offset = lseek64(handle->fd, 0, SEEK_CUR); +- handle->total_file_size = lseek64(handle->fd, 0, SEEK_END); +- lseek64(handle->fd, offset, SEEK_SET); ++ offset = lseek(handle->fd, 0, SEEK_CUR); ++ handle->total_file_size = lseek(handle->fd, 0, SEEK_END); ++ lseek(handle->fd, offset, SEEK_SET); + + if (HAS_COMPRESSION(handle)) { + zname = read_string(handle); +@@ -5533,7 +5533,7 @@ static int copy_options_recursive(struct tracecmd_input *in_handle, + if (!next) + break; + +- if (do_lseek(in_handle, next, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(in_handle, next, SEEK_SET) == (off_t)-1) + return -1; + + if (read_section_header(in_handle, &id, &flags, NULL, NULL)) +@@ -5648,7 +5648,7 @@ int tracecmd_copy_options(struct tracecmd_input *in_handle, + if (!in_handle->options_start) + return 0; + +- if (lseek64(in_handle->fd, in_handle->options_start, SEEK_SET) == (off64_t)-1) ++ if (lseek(in_handle->fd, in_handle->options_start, SEEK_SET) == (off_t)-1) + return -1; + + if (copy_options(in_handle, out_handle) < 0) +@@ -5980,10 +5980,10 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx) + new_handle->pid_maps = NULL; + if (!HAS_SECTIONS(handle)) { + /* Save where we currently are */ +- offset = lseek64(handle->fd, 0, SEEK_CUR); ++ offset = lseek(handle->fd, 0, SEEK_CUR); + +- ret = lseek64(handle->fd, buffer->offset, SEEK_SET); +- if (ret == (off64_t)-1) { ++ ret = lseek(handle->fd, buffer->offset, SEEK_SET); ++ if (ret == (off_t)-1) { + tracecmd_warning("could not seek to buffer %s offset %ld", + buffer->name, buffer->offset); + goto error; +@@ -6001,7 +6001,7 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx) + tracecmd_warning("failed to read sub buffer %s", buffer->name); + goto error; + } +- ret = lseek64(handle->fd, offset, SEEK_SET); ++ ret = lseek(handle->fd, offset, SEEK_SET); + if (ret < 0) { + tracecmd_warning("could not seek to back to offset %ld", offset); + goto error; +@@ -6171,13 +6171,13 @@ const char *tracecmd_get_version(struct tracecmd_input *handle) + * + * Provides a method to extract the cpu file size saved in @handle. + * +- * Returns the cpu file size saved in trace.dat file or (off64_t)-1 for ++ * Returns the cpu file size saved in trace.dat file or (off_t)-1 for + * invalid cpu index. + */ +-off64_t tracecmd_get_cpu_file_size(struct tracecmd_input *handle, int cpu) ++off_t tracecmd_get_cpu_file_size(struct tracecmd_input *handle, int cpu) + { + if (cpu < 0 || cpu >= handle->cpus) +- return (off64_t)-1; ++ return (off_t)-1; + return handle->cpu_data[cpu].file_size; + } + +diff --git a/lib/trace-cmd/trace-msg.c b/lib/trace-cmd/trace-msg.c +index 0b2de710..3a555c36 100644 +--- a/lib/trace-cmd/trace-msg.c ++++ b/lib/trace-cmd/trace-msg.c +@@ -183,26 +183,26 @@ static int __msg_write(int fd, struct tracecmd_msg *msg, bool network) + return __do_write_check(fd, msg->buf, data_size); + } + +-__hidden off64_t msg_lseek(struct tracecmd_msg_handle *msg_handle, off64_t offset, int whence) ++__hidden off_t msg_lseek(struct tracecmd_msg_handle *msg_handle, off_t offset, int whence) + { +- off64_t cache_offset = msg_handle->cache_start_offset; +- off64_t ret; ++ off_t cache_offset = msg_handle->cache_start_offset; ++ off_t ret; + + /* + * lseek works only if the handle is in cache mode, + * cannot seek on a network socket + */ + if (!msg_handle->cache || msg_handle->cfd < 0) +- return (off64_t)-1; ++ return (off_t)-1; + + if (whence == SEEK_SET) { + if (offset < cache_offset) +- return (off64_t)-1; ++ return (off_t)-1; + offset -= cache_offset; + } + +- ret = lseek64(msg_handle->cfd, offset, whence); +- if (ret == (off64_t)-1) ++ ret = lseek(msg_handle->cfd, offset, whence); ++ if (ret == (off_t)-1) + return ret; + + return ret + cache_offset; +@@ -639,7 +639,7 @@ static int flush_cache(struct tracecmd_msg_handle *msg_handle) + if (!msg_handle->cache || fd < 0) + return 0; + msg_handle->cache = false; +- if (lseek64(fd, 0, SEEK_SET) == (off64_t)-1) ++ if (lseek(fd, 0, SEEK_SET) == (off_t)-1) + return -1; + do { + ret = read(fd, buf, MSG_MAX_DATA_LEN); +@@ -650,8 +650,8 @@ static int flush_cache(struct tracecmd_msg_handle *msg_handle) + break; + } while (ret >= 0); + +- msg_handle->cache_start_offset = lseek64(fd, 0, SEEK_CUR); +- if (msg_handle->cache_start_offset == (off64_t)-1) ++ msg_handle->cache_start_offset = lseek(fd, 0, SEEK_CUR); ++ if (msg_handle->cache_start_offset == (off_t)-1) + return -1; + + close(fd); +diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c +index bdec75d6..37bb3ec0 100644 +--- a/lib/trace-cmd/trace-output.c ++++ b/lib/trace-cmd/trace-output.c +@@ -112,7 +112,7 @@ do_write_check(struct tracecmd_output *handle, const void *data, long long size) + return __do_write_check(handle->fd, data, size); + } + +-static inline off64_t do_lseek(struct tracecmd_output *handle, off_t offset, int whence) ++static inline off_t do_lseek(struct tracecmd_output *handle, off_t offset, int whence) + { + if (handle->do_compress) + return tracecmd_compress_lseek(handle->compress, offset, whence); +@@ -120,7 +120,7 @@ static inline off64_t do_lseek(struct tracecmd_output *handle, off_t offset, int + if (handle->msg_handle) + return msg_lseek(handle->msg_handle, offset, whence); + +- return lseek64(handle->fd, offset, whence); ++ return lseek(handle->fd, offset, whence); + } + + static inline int do_preed(struct tracecmd_output *handle, void *dst, int len, off_t offset) +@@ -518,12 +518,12 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i + /* Section ID */ + endian2 = convert_endian_2(handle, header_id); + if (do_write_check(handle, &endian2, 2)) +- return (off64_t)-1; ++ return (off_t)-1; + + /* Section flags */ + endian2 = convert_endian_2(handle, flags); + if (do_write_check(handle, &endian2, 2)) +- return (off64_t)-1; ++ return (off_t)-1; + + /* Section description */ + if (description) +@@ -532,13 +532,13 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i + desc = -1; + endian4 = convert_endian_4(handle, desc); + if (do_write_check(handle, &endian4, 4)) +- return (off64_t)-1; ++ return (off_t)-1; + + offset = do_lseek(handle, 0, SEEK_CUR); + size = 0; + /* Reserve for section size */ + if (do_write_check(handle, &size, 8)) +- return (off64_t)-1; ++ return (off_t)-1; + return offset; + } + +@@ -559,13 +559,13 @@ __hidden int out_update_section_header(struct tracecmd_output *handle, tsize_t o + if (size < 8) + return -1; + size -= 8; +- if (do_lseek(handle, offset, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, offset, SEEK_SET) == (off_t)-1) + return -1; + + endian8 = convert_endian_8(handle, size); + if (do_write_check(handle, &endian8, 8)) + return -1; +- if (do_lseek(handle, current, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, current, SEEK_SET) == (off_t)-1) + return -1; + return 0; + } +@@ -587,7 +587,7 @@ static int save_string_section(struct tracecmd_output *handle, bool compress) + if (compress) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_STRINGS, "strings", flags, false); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + out_compression_start(handle, compress); +@@ -637,7 +637,7 @@ static int read_header_files(struct tracecmd_output *handle, bool compress) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_HEADER_INFO, + "headers", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + out_compression_start(handle, compress); +@@ -965,7 +965,7 @@ static int read_ftrace_files(struct tracecmd_output *handle, bool compress) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_FTRACE_EVENTS, + "ftrace events", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + create_event_list_item(handle, &systems, &list); +@@ -1024,7 +1024,7 @@ static int read_event_files(struct tracecmd_output *handle, + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_EVENT_FORMATS, + "events format", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + /* + * If any of the list is the special keyword "all" then +@@ -1138,7 +1138,7 @@ static int read_proc_kallsyms(struct tracecmd_output *handle, bool compress) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_KALLSYMS, + "kallsyms", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + out_compression_start(handle, compress); +@@ -1202,7 +1202,7 @@ static int read_ftrace_printk(struct tracecmd_output *handle, bool compress) + if (compress) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_PRINTK, "printk", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + out_compression_start(handle, compress); +@@ -1247,8 +1247,8 @@ static int save_tracing_file_data(struct tracecmd_output *handle, + unsigned long long endian8; + char *file = NULL; + struct stat st; +- off64_t check_size; +- off64_t size; ++ off_t check_size; ++ off_t size; + int ret = -1; + + file = get_tracing_file(handle, filename); +@@ -1842,9 +1842,9 @@ static int write_options_v6(struct tracecmd_output *handle) + return 0; + } + +-static int update_options_start(struct tracecmd_output *handle, off64_t offset) ++static int update_options_start(struct tracecmd_output *handle, off_t offset) + { +- if (do_lseek(handle, handle->options_start, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, handle->options_start, SEEK_SET) == (off_t)-1) + return -1; + offset = convert_endian_8(handle, offset); + if (do_write_check(handle, &offset, 8)) +@@ -1867,7 +1867,7 @@ static int update_options_start(struct tracecmd_output *handle, off64_t offset) + * + * Returns zero on success and -1 on error. + */ +-int tracecmd_prepare_options(struct tracecmd_output *handle, off64_t offset, int whence) ++int tracecmd_prepare_options(struct tracecmd_output *handle, off_t offset, int whence) + { + tsize_t curr; + int ret; +@@ -1887,7 +1887,7 @@ int tracecmd_prepare_options(struct tracecmd_output *handle, off64_t offset, int + break; + case SEEK_END: + offset = do_lseek(handle, offset, SEEK_END); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + break; + } +@@ -2059,7 +2059,7 @@ __hidden void *trace_get_options(struct tracecmd_output *handle, size_t *len) + if (!buf) + goto out; + +- if (do_lseek(&out_handle, 0, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(&out_handle, 0, SEEK_SET) == (off_t)-1) + goto out; + *len = read(msg_handle.cfd, buf, offset); + if (*len != offset) { +@@ -2270,7 +2270,7 @@ int tracecmd_write_cmdlines(struct tracecmd_output *handle) + flags |= TRACECMD_SEC_FL_COMPRESS; + offset = out_write_section_header(handle, TRACECMD_OPTION_CMDLINES, + "command lines", flags, true); +- if (offset == (off64_t)-1) ++ if (offset == (off_t)-1) + return -1; + + out_compression_start(handle, compress); +@@ -2519,7 +2519,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, + current = do_lseek(handle, 0, SEEK_CUR); + + /* Go to the option data, where will write the offest */ +- if (do_lseek(handle, b_offset, SEEK_SET) == (off64_t)-1) { ++ if (do_lseek(handle, b_offset, SEEK_SET) == (off_t)-1) { + tracecmd_warning("could not seek to %lld", b_offset); + return -1; + } +@@ -2528,7 +2528,7 @@ static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle, + return -1; + + /* Go back to end of file */ +- if (do_lseek(handle, current, SEEK_SET) == (off64_t)-1) { ++ if (do_lseek(handle, current, SEEK_SET) == (off_t)-1) { + tracecmd_warning("could not seek to %lld", offset); + return -1; + } +@@ -2652,7 +2652,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, + data_files[i].data_offset &= ~(page_size - 1); + + ret = do_lseek(handle, data_files[i].data_offset, SEEK_SET); +- if (ret == (off64_t)-1) ++ if (ret == (off_t)-1) + goto out_free; + + if (!tracecmd_get_quiet(handle)) +@@ -2660,7 +2660,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, + i, (unsigned long long)data_files[i].data_offset); + + if (data[i].size) { +- if (lseek64(data[i].fd, data[i].offset, SEEK_SET) == (off64_t)-1) ++ if (lseek(data[i].fd, data[i].offset, SEEK_SET) == (off_t)-1) + goto out_free; + read_size = out_copy_fd_compress(handle, data[i].fd, + data[i].size, &data_files[i].write_size, +@@ -2678,19 +2678,19 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, + + if (!HAS_SECTIONS(handle)) { + /* Write the real CPU data offset in the file */ +- if (do_lseek(handle, data_files[i].file_data_offset, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, data_files[i].file_data_offset, SEEK_SET) == (off_t)-1) + goto out_free; + endian8 = convert_endian_8(handle, data_files[i].data_offset); + if (do_write_check(handle, &endian8, 8)) + goto out_free; + /* Write the real CPU data size in the file */ +- if (do_lseek(handle, data_files[i].file_write_size, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, data_files[i].file_write_size, SEEK_SET) == (off_t)-1) + goto out_free; + endian8 = convert_endian_8(handle, data_files[i].write_size); + if (do_write_check(handle, &endian8, 8)) + goto out_free; + offset = data_files[i].data_offset + data_files[i].write_size; +- if (do_lseek(handle, offset, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, offset, SEEK_SET) == (off_t)-1) + goto out_free; + } + if (!tracecmd_get_quiet(handle)) { +@@ -2709,7 +2709,7 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle, + goto out_free; + + free(data_files); +- if (do_lseek(handle, 0, SEEK_END) == (off64_t)-1) ++ if (do_lseek(handle, 0, SEEK_END) == (off_t)-1) + return -1; + + if (out_update_section_header(handle, offset)) +@@ -2978,7 +2978,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo + return -1; + + new = do_lseek(handle, 0, SEEK_CUR); +- if (do_lseek(handle, handle->options_start, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, handle->options_start, SEEK_SET) == (off_t)-1) + return -1; + + en8 = convert_endian_8(handle, start); +@@ -2986,7 +2986,7 @@ __hidden int out_save_options_offset(struct tracecmd_output *handle, unsigned lo + return -1; + + handle->options_start = new; +- if (do_lseek(handle, new, SEEK_SET) == (off64_t)-1) ++ if (do_lseek(handle, new, SEEK_SET) == (off_t)-1) + return -1; + } else { + handle->options_start = start; +diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c +index f387091f..a5ac8be3 100644 +--- a/lib/trace-cmd/trace-recorder.c ++++ b/lib/trace-cmd/trace-recorder.c +@@ -51,7 +51,7 @@ static int append_file(int size, int dst, int src) + char buf[size]; + int r; + +- lseek64(src, 0, SEEK_SET); ++ lseek(src, 0, SEEK_SET); + + /* If there's an error, then we are pretty much screwed :-p */ + do { +@@ -82,10 +82,10 @@ void tracecmd_free_recorder(struct tracecmd_recorder *recorder) + recorder->fd2, recorder->fd1); + /* Error on copying, then just keep fd1 */ + if (ret) { +- lseek64(recorder->fd1, 0, SEEK_END); ++ lseek(recorder->fd1, 0, SEEK_END); + goto close; + } +- lseek64(recorder->fd1, 0, SEEK_SET); ++ lseek(recorder->fd1, 0, SEEK_SET); + ftruncate(recorder->fd1, 0); + } + append_file(recorder->page_size, recorder->fd1, recorder->fd2); +@@ -305,7 +305,7 @@ static inline void update_fd(struct tracecmd_recorder *recorder, int size) + fd = recorder->fd1; + + /* Zero out the new file we are writing to */ +- lseek64(fd, 0, SEEK_SET); ++ lseek(fd, 0, SEEK_SET); + ftruncate(fd, 0); + + recorder->fd = fd; +diff --git a/tracecmd/trace-dump.c b/tracecmd/trace-dump.c +index 22e3d871..11c1baf1 100644 +--- a/tracecmd/trace-dump.c ++++ b/tracecmd/trace-dump.c +@@ -101,7 +101,7 @@ static int do_lseek(int fd, int offset, int whence) + if (read_compress) + return tracecmd_compress_lseek(compress, offset, whence); + +- return lseek64(fd, offset, whence); ++ return lseek(fd, offset, whence); + } + + static int read_file_string(int fd, char *dst, int len) +@@ -446,7 +446,7 @@ static void dump_section_header(int fd, enum dump_items v, unsigned short *flags + const char *desc; + int desc_id; + +- offset = lseek64(fd, 0, SEEK_CUR); ++ offset = lseek(fd, 0, SEEK_CUR); + if (read_file_number(fd, &id, 2)) + die("cannot read the section id"); + +@@ -500,13 +500,13 @@ static void dump_option_buffer(int fd, unsigned short option, int size) + return; + } + +- current = lseek64(fd, 0, SEEK_CUR); +- if (lseek64(fd, offset, SEEK_SET) == (off_t)-1) ++ current = lseek(fd, 0, SEEK_CUR); ++ if (lseek(fd, offset, SEEK_SET) == (off_t)-1) + die("cannot goto buffer offset %lld", offset); + + dump_section_header(fd, FLYRECORD, &flags); + +- if (lseek64(fd, current, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, current, SEEK_SET) == (off_t)-1) + die("cannot go back to buffer option"); + + do_print(OPTIONS|FLYRECORD, "\t\t[Option BUFFER, %d bytes]\n", size); +@@ -773,7 +773,7 @@ static void dump_sections(int fd, int count) + unsigned short flags; + + while (sec) { +- if (lseek64(fd, sec->offset, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, sec->offset, SEEK_SET) == (off_t)-1) + die("cannot goto option offset %lld", sec->offset); + + dump_section_header(fd, sec->verbosity, &flags); +@@ -826,7 +826,7 @@ static int dump_option_done(int fd, int size) + if (!offset) + return 0; + +- if (lseek64(fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, offset, SEEK_SET) == (off_t)-1) + die("cannot goto next options offset %lld", offset); + + do_print(OPTIONS, "\n\n"); +@@ -1006,7 +1006,7 @@ static void dump_therest(int fd) + else if (strncmp(str, HEAD_FLYRECORD, 10) == 0) + dump_flyrecord(fd); + else { +- lseek64(fd, -10, SEEK_CUR); ++ lseek(fd, -10, SEEK_CUR); + break; + } + } +@@ -1060,7 +1060,7 @@ static void get_meta_strings(int fd) + unsigned short fl, id; + int desc_id; + +- offset = lseek64(fd, 0, SEEK_CUR); ++ offset = lseek(fd, 0, SEEK_CUR); + do { + if (read_file_number(fd, &id, 2)) + break; +@@ -1074,7 +1074,7 @@ static void get_meta_strings(int fd) + if ((fl & TRACECMD_SEC_FL_COMPRESS)) { + read_file_number(fd, &csize, 4); + read_file_number(fd, &rsize, 4); +- lseek64(fd, -8, SEEK_CUR); ++ lseek(fd, -8, SEEK_CUR); + if (uncompress_block()) + break; + } else { +@@ -1083,12 +1083,12 @@ static void get_meta_strings(int fd) + read_metadata_strings(fd, rsize); + uncompress_reset(); + } else { +- if (lseek64(fd, size, SEEK_CUR) == (off_t)-1) ++ if (lseek(fd, size, SEEK_CUR) == (off_t)-1) + break; + } + } while (1); + +- if (lseek64(fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, offset, SEEK_SET) == (off_t)-1) + die("cannot restore the original file location"); + } + +@@ -1102,9 +1102,9 @@ static int walk_v7_sections(int fd) + int desc_id; + const char *desc; + +- offset = lseek64(fd, 0, SEEK_CUR); ++ offset = lseek(fd, 0, SEEK_CUR); + do { +- soffset = lseek64(fd, 0, SEEK_CUR); ++ soffset = lseek(fd, 0, SEEK_CUR); + if (read_file_number(fd, &id, 2)) + break; + +@@ -1149,11 +1149,11 @@ static int walk_v7_sections(int fd) + id, soffset, desc, fl, size); + } + +- if (lseek64(fd, size, SEEK_CUR) == (off_t)-1) ++ if (lseek(fd, size, SEEK_CUR) == (off_t)-1) + break; + } while (1); + +- if (lseek64(fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, offset, SEEK_SET) == (off_t)-1) + die("cannot restore the original file location"); + + return count; +@@ -1170,7 +1170,7 @@ static void dump_v7_file(int fd) + get_meta_strings(fd); + sections = walk_v7_sections(fd); + +- if (lseek64(fd, offset, SEEK_SET) == (off_t)-1) ++ if (lseek(fd, offset, SEEK_SET) == (off_t)-1) + die("cannot goto options offset %lld", offset); + + dump_options(fd); +diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c +index 224a6dde..c094ad6a 100644 +--- a/tracecmd/trace-read.c ++++ b/tracecmd/trace-read.c +@@ -195,7 +195,7 @@ static void print_event(struct trace_seq *s, struct tracecmd_input *handle, + #define TEST_READ_AT 0 + #if TEST_READ_AT + #define DO_TEST +-static off64_t test_read_at_offset; ++static off_t test_read_at_offset; + static int test_read_at_copy = 100; + static int test_read_at_index; + static void show_test(struct tracecmd_input *handle) +-- +2.39.0 + diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch b/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch deleted file mode 100644 index 220991804b..0000000000 --- a/meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch +++ /dev/null @@ -1,132 +0,0 @@ -From b63f13d2df91ede45288653b21e0d30a6b45f2ac Mon Sep 17 00:00:00 2001 -From: Beniamin Sandu -Date: Mon, 30 Nov 2020 18:24:48 +0200 -Subject: [PATCH] trace-cmd: make it build with musl - -Signed-off-by: Beniamin Sandu ---- - include/trace-cmd/trace-cmd.h | 1 + - lib/trace-cmd/trace-msg.c | 1 + - lib/trace-cmd/trace-plugin.c | 2 ++ - lib/tracefs/tracefs-events.c | 1 + - tracecmd/trace-agent.c | 1 + - tracecmd/trace-setup-guest.c | 1 + - tracecmd/trace-tsync.c | 15 ++++++++++----- - 7 files changed, 17 insertions(+), 5 deletions(-) - -diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h -index f3c95f3..a697905 100644 ---- a/include/trace-cmd/trace-cmd.h -+++ b/include/trace-cmd/trace-cmd.h -@@ -6,6 +6,7 @@ - #ifndef _TRACE_CMD_H - #define _TRACE_CMD_H - -+#include - #include "traceevent/event-parse.h" - - #define TRACECMD_MAGIC { 23, 8, 68 } -diff --git a/lib/trace-cmd/trace-msg.c b/lib/trace-cmd/trace-msg.c -index 4a0bfa9..fc1f2c7 100644 ---- a/lib/trace-cmd/trace-msg.c -+++ b/lib/trace-cmd/trace-msg.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #include "trace-write-local.h" - #include "trace-cmd-local.h" -diff --git a/lib/trace-cmd/trace-plugin.c b/lib/trace-cmd/trace-plugin.c -index 92f9edf..c2ef3dc 100644 ---- a/lib/trace-cmd/trace-plugin.c -+++ b/lib/trace-cmd/trace-plugin.c -@@ -8,6 +8,8 @@ - #include - #include - #include -+#include -+ - #include "trace-cmd.h" - #include "trace-local.h" - -diff --git a/lib/tracefs/tracefs-events.c b/lib/tracefs/tracefs-events.c -index 8e825f5..a8d8560 100644 ---- a/lib/tracefs/tracefs-events.c -+++ b/lib/tracefs/tracefs-events.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #include "kbuffer.h" - #include "tracefs.h" -diff --git a/tracecmd/trace-agent.c b/tracecmd/trace-agent.c -index b581696..abfefac 100644 ---- a/tracecmd/trace-agent.c -+++ b/tracecmd/trace-agent.c -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - - #include "trace-local.h" - #include "trace-msg.h" -diff --git a/tracecmd/trace-setup-guest.c b/tracecmd/trace-setup-guest.c -index 899848c..99595a1 100644 ---- a/tracecmd/trace-setup-guest.c -+++ b/tracecmd/trace-setup-guest.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #include "trace-local.h" - #include "trace-msg.h" -diff --git a/tracecmd/trace-tsync.c b/tracecmd/trace-tsync.c -index e639788..b8b5ac3 100644 ---- a/tracecmd/trace-tsync.c -+++ b/tracecmd/trace-tsync.c -@@ -104,13 +104,15 @@ int tracecmd_host_tsync(struct buffer_instance *instance, - - pthread_attr_init(&attrib); - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(&instance->tsync_thread, &attrib, - tsync_host_thread, &instance->tsync); -- if (!ret) -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); - instance->tsync_thread_running = true; -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); -@@ -243,11 +245,14 @@ unsigned int tracecmd_guest_tsync(char *tsync_protos, - pthread_attr_init(&attrib); - tsync->sync_proto = proto; - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); - -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); --- -2.25.1 - diff --git a/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch b/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch deleted file mode 100644 index 453a888b52..0000000000 --- a/meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch +++ /dev/null @@ -1,426 +0,0 @@ -From 6dab4b10be4df906375d0dcfa5bbffc43d3d953a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 22 Dec 2022 00:58:26 -0800 -Subject: [PATCH 2/2] replace off64_t and lseek64 - -Musl does not define these interfaces unless -D_LARGEFILE64_SOURCE is -defined and that too it is transitional until apps switch to using 64bit -off_t - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - lib/trace-cmd/trace-input.c | 54 +++++++++++++++++----------------- - lib/trace-cmd/trace-output.c | 44 +++++++++++++-------------- - lib/trace-cmd/trace-recorder.c | 8 ++--- - tracecmd/trace-dump.c | 6 ++-- - tracecmd/trace-read.c | 2 +- - 5 files changed, 57 insertions(+), 57 deletions(-) - -diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c -index af97883e..c3f91fcd 100644 ---- a/lib/trace-cmd/trace-input.c -+++ b/lib/trace-cmd/trace-input.c -@@ -33,15 +33,15 @@ static int force_read = 0; - - struct page_map { - struct list_head list; -- off64_t offset; -- off64_t size; -+ off_t offset; -+ off_t size; - void *map; - int ref_count; - }; - - struct page { - struct list_head list; -- off64_t offset; -+ off_t offset; - struct tracecmd_input *handle; - struct page_map *page_map; - void *map; -@@ -385,7 +385,7 @@ static int read_header_files(struct tracecmd_input *handle) - free(header); - - handle->ftrace_files_start = -- lseek64(handle->fd, 0, SEEK_CUR); -+ lseek(handle->fd, 0, SEEK_CUR); - - return 0; - -@@ -581,7 +581,7 @@ static int read_ftrace_files(struct tracecmd_input *handle, const char *regex) - } - - handle->event_files_start = -- lseek64(handle->fd, 0, SEEK_CUR); -+ lseek(handle->fd, 0, SEEK_CUR); - - if (sreg) { - regfree(sreg); -@@ -817,11 +817,11 @@ static unsigned long long calc_page_offset(struct tracecmd_input *handle, - return offset & ~(handle->page_size - 1); - } - --static int read_page(struct tracecmd_input *handle, off64_t offset, -+static int read_page(struct tracecmd_input *handle, off_t offset, - int cpu, void *map) - { -- off64_t save_seek; -- off64_t ret; -+ off_t save_seek; -+ off_t ret; - - if (handle->use_pipe) { - ret = read(handle->cpu_data[cpu].pipe_fd, map, handle->page_size); -@@ -839,9 +839,9 @@ static int read_page(struct tracecmd_input *handle, off64_t offset, - } - - /* other parts of the code may expect the pointer to not move */ -- save_seek = lseek64(handle->fd, 0, SEEK_CUR); -+ save_seek = lseek(handle->fd, 0, SEEK_CUR); - -- ret = lseek64(handle->fd, offset, SEEK_SET); -+ ret = lseek(handle->fd, offset, SEEK_SET); - if (ret < 0) - return -1; - ret = read(handle->fd, map, handle->page_size); -@@ -849,7 +849,7 @@ static int read_page(struct tracecmd_input *handle, off64_t offset, - return -1; - - /* reset the file pointer back */ -- lseek64(handle->fd, save_seek, SEEK_SET); -+ lseek(handle->fd, save_seek, SEEK_SET); - - return 0; - } -@@ -881,12 +881,12 @@ static void free_page_map(struct page_map *page_map) - } - - static void *allocate_page_map(struct tracecmd_input *handle, -- struct page *page, int cpu, off64_t offset) -+ struct page *page, int cpu, off_t offset) - { - struct cpu_data *cpu_data = &handle->cpu_data[cpu]; - struct page_map *page_map; -- off64_t map_size; -- off64_t map_offset; -+ off_t map_size; -+ off_t map_offset; - void *map; - int ret; - -@@ -967,7 +967,7 @@ static void *allocate_page_map(struct tracecmd_input *handle, - } - - static struct page *allocate_page(struct tracecmd_input *handle, -- int cpu, off64_t offset) -+ int cpu, off_t offset) - { - struct cpu_data *cpu_data = &handle->cpu_data[cpu]; - struct page **pages; -@@ -1219,7 +1219,7 @@ static int update_page_info(struct tracecmd_input *handle, int cpu) - * -1 on error - */ - static int get_page(struct tracecmd_input *handle, int cpu, -- off64_t offset) -+ off_t offset) - { - /* Don't map if the page is already where we want */ - if (handle->cpu_data[cpu].offset == offset && -@@ -1263,7 +1263,7 @@ static int get_page(struct tracecmd_input *handle, int cpu, - - static int get_next_page(struct tracecmd_input *handle, int cpu) - { -- off64_t offset; -+ off_t offset; - - if (!handle->cpu_data[cpu].page && !handle->use_pipe) - return 0; -@@ -1484,7 +1484,7 @@ struct tep_record * - tracecmd_read_cpu_last(struct tracecmd_input *handle, int cpu) - { - struct tep_record *record = NULL; -- off64_t offset, page_offset; -+ off_t offset, page_offset; - - offset = handle->cpu_data[cpu].file_offset + - handle->cpu_data[cpu].file_size; -@@ -1545,7 +1545,7 @@ tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, int cpu, - unsigned long long ts) - { - struct cpu_data *cpu_data = &handle->cpu_data[cpu]; -- off64_t start, end, next; -+ off_t start, end, next; - - if (cpu < 0 || cpu >= handle->cpus) { - errno = -EINVAL; -@@ -2965,7 +2965,7 @@ void tracecmd_print_events(struct tracecmd_input *handle, const char *regex) - regex = ".*"; - - if (!handle->ftrace_files_start) { -- lseek64(handle->fd, handle->header_files_start, SEEK_SET); -+ lseek(handle->fd, handle->header_files_start, SEEK_SET); - read_header_files(handle); - } - ret = read_ftrace_files(handle, regex); -@@ -3120,13 +3120,13 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd) - handle->page_size = page_size; - - handle->header_files_start = -- lseek64(handle->fd, 0, SEEK_CUR); -+ lseek(handle->fd, 0, SEEK_CUR); - - handle->total_file_size = -- lseek64(handle->fd, 0, SEEK_END); -+ lseek(handle->fd, 0, SEEK_END); - - handle->header_files_start = -- lseek64(handle->fd, handle->header_files_start, SEEK_SET); -+ lseek(handle->fd, handle->header_files_start, SEEK_SET); - - return handle; - -@@ -3419,7 +3419,7 @@ static int copy_header_files(struct tracecmd_input *handle, int fd) - { - unsigned long long size; - -- lseek64(handle->fd, handle->header_files_start, SEEK_SET); -+ lseek(handle->fd, handle->header_files_start, SEEK_SET); - - /* "header_page" */ - if (read_copy_data(handle, 12, fd) < 0) -@@ -3713,9 +3713,9 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx) - new_handle->pid_maps = NULL; - - /* Save where we currently are */ -- offset = lseek64(handle->fd, 0, SEEK_CUR); -+ offset = lseek(handle->fd, 0, SEEK_CUR); - -- ret = lseek64(handle->fd, buffer->offset, SEEK_SET); -+ ret = lseek(handle->fd, buffer->offset, SEEK_SET); - if (ret < 0) { - warning("could not seek to buffer %s offset %ld\n", - buffer->name, buffer->offset); -@@ -3730,7 +3730,7 @@ tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx) - goto error; - } - -- ret = lseek64(handle->fd, offset, SEEK_SET); -+ ret = lseek(handle->fd, offset, SEEK_SET); - if (ret < 0) { - warning("could not seek to back to offset %ld\n", offset); - goto error; -diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c -index 4a9a857d..0f5acd2f 100644 ---- a/lib/trace-cmd/trace-output.c -+++ b/lib/trace-cmd/trace-output.c -@@ -800,8 +800,8 @@ static int save_tracing_file_data(struct tracecmd_output *handle, - unsigned long long endian8; - char *file = NULL; - struct stat st; -- off64_t check_size; -- off64_t size; -+ off_t check_size; -+ off_t size; - int ret = -1; - - file = get_tracing_file(handle, filename); -@@ -1069,7 +1069,7 @@ int tracecmd_write_options(struct tracecmd_output *handle) - return -1; - - /* Save the data location in case it needs to be updated */ -- options->offset = lseek64(handle->fd, 0, SEEK_CUR); -+ options->offset = lseek(handle->fd, 0, SEEK_CUR); - - if (do_write_check(handle, options->data, - options->size)) -@@ -1099,9 +1099,9 @@ int tracecmd_append_options(struct tracecmd_output *handle) - if (handle->options_written) - return 0; - -- if (lseek64(handle->fd, 0, SEEK_END) == (off_t)-1) -+ if (lseek(handle->fd, 0, SEEK_END) == (off_t)-1) - return -1; -- offset = lseek64(handle->fd, -2, SEEK_CUR); -+ offset = lseek(handle->fd, -2, SEEK_CUR); - if (offset == (off_t)-1) - return -1; - -@@ -1119,7 +1119,7 @@ int tracecmd_append_options(struct tracecmd_output *handle) - return -1; - - /* Save the data location in case it needs to be updated */ -- options->offset = lseek64(handle->fd, 0, SEEK_CUR); -+ options->offset = lseek(handle->fd, 0, SEEK_CUR); - - if (do_write_check(handle, options->data, - options->size)) -@@ -1156,10 +1156,10 @@ int tracecmd_update_option(struct tracecmd_output *handle, - } - - /* Save current offset */ -- offset = lseek64(handle->fd, 0, SEEK_CUR); -+ offset = lseek(handle->fd, 0, SEEK_CUR); - -- ret = lseek64(handle->fd, option->offset, SEEK_SET); -- if (ret == (off64_t)-1) { -+ ret = lseek(handle->fd, option->offset, SEEK_SET); -+ if (ret == (off_t)-1) { - warning("could not seek to %lld\n", option->offset); - return -1; - } -@@ -1167,8 +1167,8 @@ int tracecmd_update_option(struct tracecmd_output *handle, - if (do_write_check(handle, data, size)) - return -1; - -- ret = lseek64(handle->fd, offset, SEEK_SET); -- if (ret == (off64_t)-1) { -+ ret = lseek(handle->fd, offset, SEEK_SET); -+ if (ret == (off_t)-1) { - warning("could not seek to %lld\n", offset); - return -1; - } -@@ -1243,11 +1243,11 @@ out_free: - int tracecmd_write_cpu_data(struct tracecmd_output *handle, - int cpus, char * const *cpu_data_files) - { -- off64_t *offsets = NULL; -+ off_t *offsets = NULL; - unsigned long long *sizes = NULL; -- off64_t offset; -+ off_t offset; - unsigned long long endian8; -- off64_t check_size; -+ off_t check_size; - char *file; - struct stat st; - int ret; -@@ -1263,7 +1263,7 @@ int tracecmd_write_cpu_data(struct tracecmd_output *handle, - if (!sizes) - goto out_free; - -- offset = lseek64(handle->fd, 0, SEEK_CUR); -+ offset = lseek(handle->fd, 0, SEEK_CUR); - - /* hold any extra data for data */ - offset += cpus * (16); -@@ -1318,8 +1318,8 @@ int tracecmd_write_cpu_data(struct tracecmd_output *handle, - if (!tracecmd_get_quiet(handle)) - fprintf(stderr, "CPU%d data recorded at offset=0x%llx\n", - i, (unsigned long long) offsets[i]); -- offset = lseek64(handle->fd, offsets[i], SEEK_SET); -- if (offset == (off64_t)-1) { -+ offset = lseek(handle->fd, offsets[i], SEEK_SET); -+ if (offset == (off_t)-1) { - warning("could not seek to %lld\n", offsets[i]); - goto out_free; - } -@@ -1369,11 +1369,11 @@ int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle, - tsize_t offset; - stsize_t ret; - -- offset = lseek64(handle->fd, 0, SEEK_CUR); -+ offset = lseek(handle->fd, 0, SEEK_CUR); - - /* Go to the option data, where will write the offest */ -- ret = lseek64(handle->fd, option->offset, SEEK_SET); -- if (ret == (off64_t)-1) { -+ ret = lseek(handle->fd, option->offset, SEEK_SET); -+ if (ret == (off_t)-1) { - warning("could not seek to %lld\n", option->offset); - return -1; - } -@@ -1382,8 +1382,8 @@ int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle, - return -1; - - /* Go back to end of file */ -- ret = lseek64(handle->fd, offset, SEEK_SET); -- if (ret == (off64_t)-1) { -+ ret = lseek(handle->fd, offset, SEEK_SET); -+ if (ret == (off_t)-1) { - warning("could not seek to %lld\n", offset); - return -1; - } -diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c -index 2a6e2b67..d83320d9 100644 ---- a/lib/trace-cmd/trace-recorder.c -+++ b/lib/trace-cmd/trace-recorder.c -@@ -53,7 +53,7 @@ static int append_file(int size, int dst, int src) - char buf[size]; - int r; - -- lseek64(src, 0, SEEK_SET); -+ lseek(src, 0, SEEK_SET); - - /* If there's an error, then we are pretty much screwed :-p */ - do { -@@ -84,10 +84,10 @@ void tracecmd_free_recorder(struct tracecmd_recorder *recorder) - recorder->fd2, recorder->fd1); - /* Error on copying, then just keep fd1 */ - if (ret) { -- lseek64(recorder->fd1, 0, SEEK_END); -+ lseek(recorder->fd1, 0, SEEK_END); - goto close; - } -- lseek64(recorder->fd1, 0, SEEK_SET); -+ lseek(recorder->fd1, 0, SEEK_SET); - ftruncate(recorder->fd1, 0); - } - append_file(recorder->page_size, recorder->fd1, recorder->fd2); -@@ -371,7 +371,7 @@ static inline void update_fd(struct tracecmd_recorder *recorder, int size) - fd = recorder->fd1; - - /* Zero out the new file we are writing to */ -- lseek64(fd, 0, SEEK_SET); -+ lseek(fd, 0, SEEK_SET); - ftruncate(fd, 0); - - recorder->fd = fd; -diff --git a/tracecmd/trace-dump.c b/tracecmd/trace-dump.c -index 5642f12a..0a54bf42 100644 ---- a/tracecmd/trace-dump.c -+++ b/tracecmd/trace-dump.c -@@ -487,7 +487,7 @@ static void dump_options(int fd) - - count++; - if (!DUMP_CHECK(OPTIONS)) { -- lseek64(fd, size, SEEK_CUR); -+ lseek(fd, size, SEEK_CUR); - continue; - } - switch (option) { -@@ -533,7 +533,7 @@ static void dump_options(int fd) - default: - do_print(OPTIONS, " %d %d\t[Unknown option, size - skipping]\n", - option, size); -- lseek64(fd, size, SEEK_CUR); -+ lseek(fd, size, SEEK_CUR); - break; - } - } -@@ -579,7 +579,7 @@ static void dump_therest(int fd) - else if (strncmp(str, HEAD_FLYRECORD, 10) == 0) - dump_flyrecord(fd); - else { -- lseek64(fd, -10, SEEK_CUR); -+ lseek(fd, -10, SEEK_CUR); - break; - } - } -diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c -index e1811074..181a69df 100644 ---- a/tracecmd/trace-read.c -+++ b/tracecmd/trace-read.c -@@ -187,7 +187,7 @@ static void print_event(struct trace_seq *s, struct tracecmd_input *handle, - #define TEST_READ_AT 0 - #if TEST_READ_AT - #define DO_TEST --static off64_t test_read_at_offset; -+static off_t test_read_at_offset; - static int test_read_at_copy = 100; - static int test_read_at_index; - static void show_test(struct tracecmd_input *handle) --- -2.39.0 - diff --git a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb deleted file mode 100644 index 51e46533de..0000000000 --- a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "User-space front-end command-line tool for ftrace" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=873f48a813bded3de6ebc54e6880c4ac" - -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \ - file://0001-trace-cmd-make-it-build-with-musl.patch \ - file://0002-replace-off64_t-and-lseek64.patch \ - " - -SRCREV = "530b1a0caef39466e16bbd49de5afef89656f03f" - -S = "${WORKDIR}/git" - -DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native" - -inherit pkgconfig - -TARGET_CC_ARCH += "${LDFLAGS}" - -do_compile() { - oe_runmake libdir_relative=${BASELIB} libs - oe_runmake libdir_relative=${BASELIB} all -} - -do_install() { - oe_runmake libdir_relative=${BASELIB} etcdir=${sysconfdir} DESTDIR=${D} install install_libs - mkdir -p ${D}${libdir}/traceevent/plugins/${BPN} - mv ${D}/${libdir}/traceevent/plugins/*.so ${D}${libdir}/traceevent/plugins/${BPN}/ -} - -FILES:${PN} += "${libdir}/traceevent ${libdir}/traceevent/plugins ${libdir}/tracefs" diff --git a/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb new file mode 100644 index 0000000000..50d73df03a --- /dev/null +++ b/meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb @@ -0,0 +1,31 @@ +SUMMARY = "User-space front-end command-line tool for ftrace" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = " \ + file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ + file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \ + " + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \ + file://0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch \ + file://0001-Do-not-emit-useless-rpath.patch" +SRCREV = "18233e4c32857cb7ddd4960beeec8360ed834fc5" + +S = "${WORKDIR}/git" + +DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native swig-native bison-native flex-native" + +inherit pkgconfig bash-completion + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_compile() { + oe_runmake libdir_relative=${BASELIB} libs + oe_runmake libdir_relative=${BASELIB} all +} + +do_install() { + oe_runmake libdir_relative=${BASELIB} etcdir=${sysconfdir} pkgconfig_dir=${libdir}/pkgconfig DESTDIR=${D} install install_libs + # Because makefile uses cp instead of install we need to change owner of files + chown -R root:root ${D}${libdir} +} From patchwork Sat Jan 7 03:06:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 17803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 782C2C54EBD for ; Sat, 7 Jan 2023 03:07:11 +0000 (UTC) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mx.groups.io with SMTP id smtpd.web11.13128.1673060825595697923 for ; Fri, 06 Jan 2023 19:07:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B/k5JG96; spf=pass (domain: gmail.com, ip: 209.85.216.51, mailfrom: raj.khem@gmail.com) Received: by mail-pj1-f51.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so7157270pjj.2 for ; Fri, 06 Jan 2023 19:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AOSphhzQNamDw57LEqvCWl294DuY098pojpHnKiN1Ro=; b=B/k5JG96dYrugs9qz0r97lclJAp1p6Yz6T5CcSDU3XC9bnypJ9pf69xYfMsj+Dx5JX QzshQyvKQxNCvul7y1pabPo5ph4zSUPGyjA0v3TbnZwrdA0c9/PX7lfs7zOJxR+pNNIW cyzKeBIHGg0z9OJpR1LZnV8tr1BxRjLS5CQGwTilndfeYuy1PsbD9G9WqFOQ3+UYxNUv Pf6qXTGtwxQ77geQoiiF5uX61lajXec1cimxI+3UxFY5bjvrqsOJg2LgpVc+LDegO57E FbtWk5C9qI9EshpUBhT5HkEQQpmuYEZL8lGzwa16Q9J3vNQO6h0ToiLSgZVXY3/QOPwx tTjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AOSphhzQNamDw57LEqvCWl294DuY098pojpHnKiN1Ro=; b=v7d22KqqRt+dsWdyzehC0M7yceiK6bBwD4LDyoD/AGGEuyP4A4P/xf7m13WqOFkRmr DFrmSh00xiVP1ka459tVrc9xp8FFgLrLfZWEkVzclpTVKJwO/Ag8X0trPo+qfq4MI3sm I21vV2CkrtmPHPV9m0WH98aVkvHL+WA8AWLNxg8OqbE58L4YOXVfiAl/V8Ff6wC3h5ZY m3QSl7PZmuyTqnMmNq8TlVOvwxs0jKHp/j/shE+8e4BYhOmJDhAtGMSOSQxO48Bz+Elv sHINUxwp3Sec8iXgMWobQ5fz/D03sm/bFfVv27fgiTlmIU2CfRVRob1rN/ZwXtZ0AMtg 4kVg== X-Gm-Message-State: AFqh2kqdKFjuAYF0sAxpWXPIdlnICW+9XyOCezcIJDLSidRgxYAVx1Tl OGi65mJ6Us/FmMek/zHLzgaGhLQidN9JYg== X-Google-Smtp-Source: AMrXdXsw1Ce+yGtFLE0D5V9UxvgIwIrzlKyElmR8S+ttZazlYps/vaC0I/wfysE5B/iAMz0hp+yQig== X-Received: by 2002:a05:6a20:e61b:b0:af:7ed7:d370 with SMTP id my27-20020a056a20e61b00b000af7ed7d370mr65721673pzb.43.1673060824648; Fri, 06 Jan 2023 19:07:04 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::ee35]) by smtp.gmail.com with ESMTPSA id q1-20020aa79821000000b005821db4ff2csm1786180pfl.69.2023.01.06.19.07.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 19:07:04 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 3/4] concurrencykit: Update to 0.7.0 Date: Fri, 6 Jan 2023 19:06:59 -0800 Message-Id: <20230107030700.1371576-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230107030700.1371576-1-raj.khem@gmail.com> References: <20230107030700.1371576-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 07 Jan 2023 03:07:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100430 Enable riscv as it is supported now Signed-off-by: Khem Raj --- ...mpoiler-detection-logic-for-cross-co.patch | 89 +++++++++++++++++++ .../concurrencykit/concurrencykit/cross.patch | 62 ------------- .../concurrencykit/concurrencykit_git.bb | 10 +-- 3 files changed, 93 insertions(+), 68 deletions(-) create mode 100644 meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch delete mode 100644 meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch new file mode 100644 index 0000000000..57a587b39e --- /dev/null +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch @@ -0,0 +1,89 @@ +From e1dcd27e816520bdabc69511d90c4a2ebc242831 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 6 Jan 2023 18:51:34 -0800 +Subject: [PATCH] configure: Fix compoiler detection logic for + cross-compilation + +We can not run binaries during cross compile, so poke at compiler to +figure out if it is clang or gcc, for OE we do not have other compilers +in opensource world if there are we can extend this logic + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +--- + configure | 56 ++++++++++++++++--------------------------------------- + 1 file changed, 16 insertions(+), 40 deletions(-) + +diff --git a/configure b/configure +index 9066abb..e382e61 100755 +--- a/configure ++++ b/configure +@@ -661,48 +661,24 @@ if test "$PROFILE"; then + fi + + printf "Finding suitable compiler........" +-if test ! -x "${CC}"; then +- CC=`pathsearch "${CC:-cc}"` +- if test -z "$CC" -o ! -x "$CC"; then +- CC=`pathsearch "${CC:-gcc}"` +- fi ++if test -z "$CC"; then ++ if test ! -x "${CC}"; then ++ CC=`pathsearch "${CC:-cc}"` ++ if test -z "$CC" -o ! -x "$CC"; then ++ CC=`pathsearch "${CC:-gcc}"` ++ fi ++ fi ++ assert "$CC" "not found" ++fi ++if `$CC --version | grep gcc >& /dev/null`; then ++ COMPILER=gcc ++elif `$CC --version | grep clang >& /dev/null`; then ++ COMPILER=clang ++else ++ COMPILER="not found" + fi +-assert "$CC" "not found" +- +-cat << EOF > .1.c +-#include +-int main(void) { +-#if defined(_WIN32) +-#if defined(__MINGW64__) +- puts("mingw64"); +- return (0); +-#elif defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION >= 3) +- puts("mingw32"); +- return (0); +-#else +- return (1); +-#endif /* __MINGW32__ && __MINGW32_MAJOR_VERSION >= 3 */ +-#elif defined(__clang__) && (__clang_major__ >= 3) +- puts("clang"); +- return (0); +-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5110) +- puts("suncc"); +- return (0); +-#elif defined(__GNUC__) && (__GNUC__ >= 4) +- puts("gcc"); +- return (0); +-#else +- return (1); +-#endif +-} +-EOF +- +-$CC -o .1 .1.c +-COMPILER=`./.1 2> /dev/null` +-r=$? +-rm -f .1.c .1 + +-if test "$r" -ne 0; then ++if $COMPILER = "not found"; then + assert "" "update compiler" + else + echo "success [$CC]" +-- +2.39.0 + diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch b/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch deleted file mode 100644 index 9e5058f2ca..0000000000 --- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ab0eec78382bd00ce533aec2c84fd50c1733033d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 5 Jan 2013 19:42:51 -0800 - ---- - configure | 32 ++++++++++++++++++-------------- - 1 file changed, 18 insertions(+), 14 deletions(-) - -diff --git a/configure b/configure -index 76c2812..78ce2ff 100755 ---- a/configure -+++ b/configure -@@ -535,14 +535,18 @@ else - GZIP_SUFFIX=".gz" - fi - --printf "Finding suitable compiler........" --CC=`pathsearch "${CC:-cc}"` --if test -z "$CC" -o ! -x "$CC"; then -- CC=`pathsearch "${CC:-gcc}"` -+if test -z "$CC"; then -+ printf "Finding suitable compiler........" -+ CC=`pathsearch "${CC:-cc}"` -+ if test -z "$CC" -o ! -x "$CC"; then -+ CC=`pathsearch "${CC:-gcc}"` -+ fi - fi - assert "$CC" "not found" - --cat << EOF > .1.c -+if test -z "$COMPILER"; then -+ -+ cat << EOF > .1.c - #include - int main(void) { - #if defined(_WIN32) -@@ -569,16 +573,16 @@ int main(void) { - #endif - } - EOF -+ $CC -o .1 .1.c -+ COMPILER=`./.1` -+ r=$? -+ rm -f .1.c .1 - --$CC -o .1 .1.c --COMPILER=`./.1` --r=$? --rm -f .1.c .1 -- --if test "$r" -ne 0; then -- assert "" "update compiler" --else -- echo "success [$CC]" -+ if test "$r" -ne 0; then -+ assert "" "update compiler" -+ else -+ echo "success [$CC]" -+ fi - fi - - if test "$COMPILER" = "suncc"; then diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb index 0018064119..cb65250e9a 100644 --- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb +++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb @@ -7,16 +7,15 @@ LICENSE = "BSD-2-Clause & Apache-2.0" HOMEPAGE = "http://concurrencykit.org" SECTION = "base" -PV = "0.5.1+git${SRCPV}" -SRCREV = "f97d3da5c375ac2fc5a9173cdd36cb828915a2e1" +PV = "0.7.0+git${SRCPV}" +SRCREV = "6e8e5bec2e2f8cef2072a68579cbb07ababf3331" LIC_FILES_CHKSUM = "file://LICENSE;md5=a0b24c1a8f9ad516a297d055b0294231" SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \ - file://cross.patch \ -" + file://0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch" S = "${WORKDIR}/git" -COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64).*-linux*" +COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*" inherit autotools-brokensep @@ -26,7 +25,6 @@ PLAT ?= "${HOST_ARCH}" do_configure () { export PLATFORM=${PLAT} - export COMPILER='gcc' ${S}/configure \ --prefix=${prefix} \ --includedir=${includedir} \ From patchwork Sat Jan 7 03:07:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 17804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 111D0C64981 for ; Sat, 7 Jan 2023 03:07:12 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.13025.1673060826712566110 for ; Fri, 06 Jan 2023 19:07:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CAuaqZoI; spf=pass (domain: gmail.com, ip: 209.85.215.179, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f179.google.com with SMTP id e10so2378644pgc.9 for ; Fri, 06 Jan 2023 19:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lAYmldtmrDpd4Bhk/MMPocFyTh8wSkROwWl+5NzavZA=; b=CAuaqZoIk/WiNFvbvUGRyqwU07DSqWAehQX5jtqVo63bHjG2QwB8LpxASBgx1MI5jK 7yMuDwKTgb2ByBKmVCwKT/GHX2ZzkrzwkmqSqC6r/VImoPXy5Qxy7aV6QU9RBTIgKR07 zge/KkT69dowimMZ0eiVagw1D+NCMOabE2yj6sC6KVpYXY8HyJnfQXgAFF8U8x0Kw7Pv bqC1qB7ae105uddbqHnO1iOzQJUTkfZeGCFfxrnJC+Dy4WZAFuZ7l5u5dz3erX0PydCT Mm/O7U9sRlsIBCOUC3zwfAMT3F2VZsaboMekoDFfCGk3rNpCWBfOaLhiw0RBuGfInghs 1C5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lAYmldtmrDpd4Bhk/MMPocFyTh8wSkROwWl+5NzavZA=; b=HV5dOf3BEaxqVH+t8g7BjUliZXurBZ0h5BJrXD3w7189Ze7eY9AAf8FWwnFGlqZohh R2klkrbDu8lRb/VQM4G+WSnRsX8m6vZeJTJ0fP3VmLaIB2lisA1ahd5gE684HoFBNY7j ltrSVF3M01P4PERKOTmCG0ZCO9RN9dnw4vw63kL/wZOI3Iyum9uim/Wl1/cAxxziRXtm C1LGwz+zPMdC86DF2szSWfugxe6pspfmXseTX0SkQC/GXJ9z3jWWxqqhlj7leLpKgHyN 0zOhV1Ye7bl3F2euSmeeHngYeVWUx62tqtgKjtu94dMXJXPg9GmUoUhdMXmRf9p/T2r0 M3DA== X-Gm-Message-State: AFqh2kq9xa4gBvBOJGslFLHYusFwLprotoY3LNduJetgOqXYDAKDSiZh PCGtZ9ihdUdxxnOXwi/EpL7KsjUV1qIQfw== X-Google-Smtp-Source: AMrXdXs6FJYpGRzfiD8kTi0T440xnlMf1GAqx5KLrRAwv+RWNmW+u/Bu5FBAOvz7owXOvhWIheZvsw== X-Received: by 2002:a05:6a00:414c:b0:581:7c46:debd with SMTP id bv12-20020a056a00414c00b005817c46debdmr38100902pfb.24.1673060825732; Fri, 06 Jan 2023 19:07:05 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::ee35]) by smtp.gmail.com with ESMTPSA id q1-20020aa79821000000b005821db4ff2csm1786180pfl.69.2023.01.06.19.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 19:07:05 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Peter Bergin , Khem Raj Subject: [meta-oe][PATCH 4/4] sysbench: Upgrade 0.4.12 -> 1.0.20 Date: Fri, 6 Jan 2023 19:07:00 -0800 Message-Id: <20230107030700.1371576-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230107030700.1371576-1-raj.khem@gmail.com> References: <20230107030700.1371576-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 07 Jan 2023 03:07:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100432 From: Peter Bergin Use system cuncurrencykit and enable riscv Signed-off-by: Peter Bergin Signed-off-by: Khem Raj --- ...modifier-to-tmp-variable-in-memory-t.patch | 40 ------------------- ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 18 +++++---- 2 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb => sysbench_1.0.20.bb} (57%) diff --git a/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch b/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch deleted file mode 100644 index d628e81b56..0000000000 --- a/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c1ebf893e32a0a77e820484d48a903523fef7c1b Mon Sep 17 00:00:00 2001 -From: Vasily Tarasov -Date: Fri, 10 Jun 2016 14:33:48 -0400 -Subject: [PATCH] Adding volatile modifier to tmp variable in memory test - -Issue explanation: - -./sysbench/sysbench --test=memory --num-threads=16 \ - --memory-block-size=268435456 \ - --memory-total-size=137438953472 \ - --memory-oper=read \ - --memory-access-mode=seq \ - --memory-scope=local run - -Without this commit the time to run the above command is 0.0004 seconds. -With this commit the time is greater than 3 seconds. Essentially, -without the volatile modifier, the compiler optimizes read access so -that no real access happens. - -Upstream-Status: Backport [part of v1.0.0 https://github.com/akopytov/sysbench/commit/8753cb93be4c0b81a20b704ced91e7a422da52b1] - -(cherry picked from commit 8753cb93be4c0b81a20b704ced91e7a422da52b1) -Signed-off-by: massimo toscanelli ---- - sysbench/tests/memory/sb_memory.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysbench/tests/memory/sb_memory.c b/sysbench/tests/memory/sb_memory.c -index 2e8998f..7d22bb9 100644 ---- a/sysbench/tests/memory/sb_memory.c -+++ b/sysbench/tests/memory/sb_memory.c -@@ -244,7 +244,7 @@ sb_request_t memory_get_request(int tid) - int memory_execute_request(sb_request_t *sb_req, int thread_id) - { - sb_mem_request_t *mem_req = &sb_req->u.mem_request; -- int tmp = 0; -+ volatile int tmp = 0; - int idx; - int *buf, *end; - log_msg_t msg; diff --git a/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb b/meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb similarity index 57% rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb index 4ac78fb8fd..098954af37 100644 --- a/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +++ b/meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb @@ -2,20 +2,22 @@ SUMMARY = "System performance benchmark" HOMEPAGE = "http://github.com/akopytov/sysbench" SECTION = "console/tests" LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -inherit autotools +DEPENDS = "libtool libaio luajit concurrencykit" + +inherit autotools-brokensep pkgconfig # The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from # Launchpad until the next release is available from Github. -SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz \ - file://0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch \ - " +SRC_URI = "git://github.com/akopytov/sysbench.git;protocol=https;branch=master" +SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557" + +S = "${WORKDIR}/git" -SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d" -SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e" +COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*" -EXTRA_OECONF += "--enable-largefile" +EXTRA_OECONF += "--enable-largefile --with-system-luajit --with-system-ck --without-gcc-arch" PACKAGECONFIG ??= "" PACKAGECONFIG[aio] = "--enable-aio,--disable-aio,libaio," PACKAGECONFIG[mysql] = "--with-mysql \