From patchwork Sat Jul 27 15:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 169942 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1472897ilk; Sat, 27 Jul 2019 08:59:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBvTw3jeuCKzdLC25ie4zD/3chKRAaelrG0K6ZPHwxU8CKhw6WX8rZ56wN4gc75yIW9SO5 X-Received: by 2002:a17:90a:d80b:: with SMTP id a11mr98615766pjv.53.1564243154768; Sat, 27 Jul 2019 08:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564243154; cv=none; d=google.com; s=arc-20160816; b=vNUfNNoFdHUENpwbCPvLtpN8HLq6usjc7T2LW1EHqlQa3vcbov5jxak8tHLPnrJeES 1PS2WYA/I49sBiZNJz2QEAdED81z/xlcjtU5/tsuskoOtYx9aFICfJ26cFcBt9BgDRad VpxvQ7DMb+40k90oDKAduFbV5GOVsmhioF7d8IuONF3hIje4OwqmERbaOBeQdqhlsbzj e6XYzv/E3foF5OBaL1HrZVlmiE/tyHhx4+7n3y0j9XjAQYcyU6Up4U0AhZHOj+t5zayZ wzeyot8SATxFrMV3OLt6OOoAydMBdDssqkreBjnBWTUfIgvxqvsuxSVdLu3J3EHZQw6H dQfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=NV45PjcY7ZBaOYHIz8Utjwj9ZyjT0GuEAcS1STaJBuA=; b=xWRBuhh/XMSnDM1MbrZU1HW61PnlxxmOkto4LeTkRdlx4wYun30fupgkipV73WgnlV Sl8vBsXlmfAakqEH+EIutjX0RorjNTkQzrCKFySCXKnaiu761zJ4M0yOS4Mr7a1v0hjv rN/BV01TV9Gzf0otSoAry1jSzMuIJK3tPQ1xvWndwjXoydTlGlYhPILtSGBZ4l6Q/gxp dF7mODk4Ix2fumW25Ln9Kl5/6Fnokuqd/zFsKwxViT/MxFFo766/0Mo3fiOLVF0ooYHO 1otLieLdpEcvuE4Pow21y2lsyjgTroYOMICdblMUoGpWM33HCEMW5BRC4GXnhjGr6BIl 49Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="lIuQV/vv"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q24si20029773pls.7.2019.07.27.08.59.13; Sat, 27 Jul 2019 08:59:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="lIuQV/vv"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AC7F27F1D4; Sat, 27 Jul 2019 15:59:07 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by mail.openembedded.org (Postfix) with ESMTP id 32E2E6BC44 for ; Sat, 27 Jul 2019 15:59:05 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id i2so25890071plt.1 for ; Sat, 27 Jul 2019 08:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jp1yk7JXBTWFUdvjRN/zJkgtxDtEqrr6dM4dCvtRkRg=; b=lIuQV/vvdc1UEWBmsoYX8UmFBKHe2rFZaH2/ZcGRPA336itfdHUsRMF4oR6kcZnhEt MxMucEQ6SdJCmJ9FziB9m5k7ZdFFRV5czkGOLOUxkrLizlabbDSOfxLqmHQQI3cxsCzo EAECFu5fKn88wYGCroJtZ8GyVtc40kqPFOgRwWAHLUlCkJNEmIaElXPJ0ptKo1Sc4NHd L59TXfdFP1ipueixo4QlIbboRs5la5xVdSJXFwwje/iyMns3gp5yZLEMC/NA9AFBko72 Sk4e81JGFs+oeZ42/RGDfw9lUo9LepEasNdp8uoxnE+O4tfiPhlDLXDdi16qRi5TQPub c/fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jp1yk7JXBTWFUdvjRN/zJkgtxDtEqrr6dM4dCvtRkRg=; b=GJzb7cqVSiL6DDXmvCCu9PmLCkwNnrWaQLtLaSRZXeOJGET6fxNI24uAhXcuFeDbgk eQcCYXJEAZ0lA0iEKIe2o/0DzNMMZx9CwmesDUvuNX7n1EXJUZsHBr5uGkOtR7OfOi/w yBdQs9RuTipedvX+5T+f72pplvGvRjx30qZGKULWeD0HSRvxJwXUXXFVOirP1NMvQ8e/ z4Hocfy3CgAidC24ROyyliVamQWho6PbP9VyM9EQIBsQx0S+d7UTT0FDCCQhTr+qUkID dvFZYAXnxo131yIHc7uRxEgv7GhUYdQ+CR5XzMGOsK2/H8+PuHVlxz44XQ1GS37L78Y3 5mvA== X-Gm-Message-State: APjAAAX8ynMIf9k8zFeifgAE7QPsjBdYf5JSExyEin0hRF2fMrG3/zoR SSQrq6mP0blJNJLpDiBRFi/4PuaIMkQ= X-Received: by 2002:a17:902:ea:: with SMTP id a97mr26413299pla.182.1564243145643; Sat, 27 Jul 2019 08:59:05 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id g2sm57118347pfi.26.2019.07.27.08.59.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 27 Jul 2019 08:59:05 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 27 Jul 2019 08:58:48 -0700 Message-Id: <20190727155849.38385-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/2] ltp: Fix build with glibc 2.30 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...me-check-for-getdents-getdents64-API.patch | 72 +++++++++++++++++++ ...k-for-RES_USE_INET6-during-configure.patch | 68 ++++++++++++++++++ ...e-getdents-getdents64-only-for-glibc.patch | 50 ------------- meta/recipes-extended/ltp/ltp_20190517.bb | 3 +- 4 files changed, 142 insertions(+), 51 deletions(-) create mode 100644 meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch create mode 100644 meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch -- 2.22.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch b/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch new file mode 100644 index 0000000000..bfceadb190 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Add-configure-time-check-for-getdents-getdents64-API.patch @@ -0,0 +1,72 @@ +From 404dfeb4faef213b0450f173b60cd7080edec349 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 26 Jul 2019 10:32:29 -0700 +Subject: [PATCH 1/2] Add configure time check for getdents/getdents64 APIs + +glibc 2.30 has added wrapper for getdents64 this will help in detecting +right condition to use fallback + +Check for getdents API as well while here + +Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012954.html] +Signed-off-by: Khem Raj +--- + configure.ac | 2 ++ + testcases/kernel/syscalls/getdents/getdents.h | 8 ++++++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -65,6 +65,8 @@ AC_CHECK_FUNCS([ \ + fallocate \ + fchownat \ + fstatat \ ++ getdents \ ++ getdents64 \ + kcmp \ + mkdirat \ + mknodat \ +--- a/testcases/kernel/syscalls/getdents/getdents.h ++++ b/testcases/kernel/syscalls/getdents/getdents.h +@@ -23,7 +23,7 @@ + #include + #include "test.h" + #include "lapi/syscalls.h" +- ++#include "config.h" + /* + * See fs/compat.c struct compat_linux_dirent + */ +@@ -34,12 +34,17 @@ struct linux_dirent { + char d_name[]; + }; + ++#if HAVE_GETDENTS ++#include ++#else + static inline int + getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size) + { + return ltp_syscall(__NR_getdents, fd, dirp, size); + } + ++#endif /* HAVE_GETDENTS */ ++ + struct linux_dirent64 { + uint64_t d_ino; + int64_t d_off; +@@ -48,10 +53,13 @@ struct linux_dirent64 { + char d_name[]; + }; + ++#if HAVE_GETDENTS64 ++#include ++#else + static inline int + getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size) + { + return ltp_syscall(__NR_getdents64, fd, dirp64, size); + } +- ++#endif /* HAVE_GETDENTS64 */ + #endif /* GETDENTS_H */ diff --git a/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch b/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch new file mode 100644 index 0000000000..12e47eb2b6 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0002-check-for-RES_USE_INET6-during-configure.patch @@ -0,0 +1,68 @@ +From 7bc134545b7beb09717a60541530c20a1a5740d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 26 Jul 2019 10:55:28 -0700 +Subject: [PATCH 2/2] check for RES_USE_INET6 during configure + +glibc 2.30 has remove RES_USE_INET6 define which has been on its way out +since 2.26 release, this check ensures that we detect it before using it + +Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-July/012955.html] +Signed-off-by: Khem Raj +--- + configure.ac | 13 +++++++++++++ + testcases/network/multicast/mc_gethost/mc_gethost.c | 6 ++++++ + 2 files changed, 19 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 2255b5c181..ed7acccb01 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -91,6 +91,19 @@ AC_CHECK_FUNCS([ \ + vmsplice \ + ]) + ++#check defines ++AC_MSG_CHECKING([for RES_USE_INET6]) ++AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], ++ [[char dummy[RES_USE_INET6];]])], ++ [ ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 1, [Define to 1 if you have the RES_USE_INET6 macro.]) ++ ], ++ [ ++ AC_MSG_RESULT([no]) ++ AC_DEFINE_UNQUOTED([HAVE_RES_USE_INET6], 0, [Define to 1 if you have the RES_USE_INET6 macro.]) ++ ] ++) + # Tools knobs + + # Expect +diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c +index 9cc15d086b..d1cae5441a 100644 +--- a/testcases/network/multicast/mc_gethost/mc_gethost.c ++++ b/testcases/network/multicast/mc_gethost/mc_gethost.c +@@ -17,6 +17,8 @@ + #include + #include + ++#include "config.h" ++ + #ifndef LOG_PERROR + #define LOG_PERROR 0 + #endif +@@ -50,8 +52,12 @@ usage: + argv++, argc--; + } + if (argc >= 1 && !strcmp(*argv, "-6")) { ++#if HAVE_RES_USE_INET6 + af = AF_INET6, size = IN6ADDRSZ; + _res.options |= RES_USE_INET6; ++#else ++ af = AF_INET, size = INADDRSZ; ++#endif + argv++, argc--; + } + if (argc >= 1 && !strcmp(*argv, "-f")) { +-- +2.22.0 + diff --git a/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch b/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch deleted file mode 100644 index d1f7b0746b..0000000000 --- a/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b996b2480fe3a800ffbdc4a0fdc5e8775c575449 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 8 Jan 2016 06:57:04 +0000 -Subject: [PATCH] getdents: define getdents/getdents64 only for glibc - -getdents/getdents64 are implemented in musl and when we define static -functions with same name, it errors out. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - testcases/kernel/syscalls/getdents/getdents.h | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/testcases/kernel/syscalls/getdents/getdents.h b/testcases/kernel/syscalls/getdents/getdents.h -index 702b0bd..860b22e 100644 ---- a/testcases/kernel/syscalls/getdents/getdents.h -+++ b/testcases/kernel/syscalls/getdents/getdents.h -@@ -34,12 +34,13 @@ struct linux_dirent { - char d_name[]; - }; - -+#ifdef __GLIBC__ - static inline int - getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size) - { - return ltp_syscall(__NR_getdents, fd, dirp, size); - } -- -+#endif - struct linux_dirent64 { - uint64_t d_ino; - int64_t d_off; -@@ -48,10 +49,11 @@ struct linux_dirent64 { - char d_name[]; - }; - -+#ifdef __GLIBC__ - static inline int - getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size) - { - return ltp_syscall(__NR_getdents64, fd, dirp64, size); - } -- -+#endif - #endif /* GETDENTS_H */ --- -2.7.4 - diff --git a/meta/recipes-extended/ltp/ltp_20190517.bb b/meta/recipes-extended/ltp/ltp_20190517.bb index 1f3a94bdfa..c62f2618b5 100644 --- a/meta/recipes-extended/ltp/ltp_20190517.bb +++ b/meta/recipes-extended/ltp/ltp_20190517.bb @@ -34,7 +34,6 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ file://0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \ file://0004-guard-mallocopt-with-__GLIBC__.patch \ - file://0005-getdents-define-getdents-getdents64-only-for-glibc.patch \ file://0006-rt_tgsigqueueinfo-disable-test-on-musl.patch \ file://0007-Fix-test_proc_kill-hanging.patch \ file://0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ @@ -42,6 +41,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \ file://0011-direct_io-diotest4-drop-MAP_FIXED.patch \ file://0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch \ + file://0001-Add-configure-time-check-for-getdents-getdents64-API.patch \ + file://0002-check-for-RES_USE_INET6-during-configure.patch \ " S = "${WORKDIR}/git" From patchwork Sat Jul 27 15:58:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 169943 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1473272ilk; Sat, 27 Jul 2019 08:59:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7ETPHJwwvF79A2wHiLpjCbSXCfX7x1IbMiU0E9/BvIwXjn8tFvMlDse1NM7AWHJIB9f+6 X-Received: by 2002:a17:902:aa88:: with SMTP id d8mr96577693plr.274.1564243187650; Sat, 27 Jul 2019 08:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564243187; cv=none; d=google.com; s=arc-20160816; b=xHji3UodN/YqN9GwPVfgi9YrJ5rUwNGAoTrNXtKCjvL3roQhlSU/UND6GU/9GKDp2J 0G4FKaibDTDBUZU04l4+A7j35kT0w5BiGMWxN+e9Ez8hIj2nxzGI3E3PNtKX94s9U9WZ HlVtbgDroR1hYzOJitjCN/Paf5UYyB18IG8jS8I+EROYGYhOm1EcJlUnJzYcsf8DEMKi Xmr0pExzQLPqlwBwfcByxz7Uy3G+jejxAmOhu0c0CmA/X5jMY2LUrXlxnrostPvsv5hI Gvdi+pBeoHFYZNet2S3dEhweH9yZU7auSfq0uqwxyTaDEWdNf8pLpQ8yscUhtV4ZHTvi YFAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=nByi5O0/Fzvc97MxCgP619LTMNgeu+3x1GD5QsK2pu8=; b=GEsnxtfMxhdDPMFCVcTFEfmpbqTKCT1JwkVOEivG24n8HoHsMDRFb+gdyygDwlWbW4 61HfkGHjFajAQnXDCpO0sGD6vwXJ4O4Pb3q1W3fSAbxc3ra7V9Oy3FfgE9MEnASZSV8V GfxEyseUssUBM5sjQD7vo/45/VbIoAakUjEJY4WxudiWAodWO6KPfa+uvJfYP6YhslQz qDLoL3jGI8bkEDA4fIyvKgfPSOCx8nmVSnhzDd2wXqYbaA/kgOUJ+ktvaXoFupaA0sgB tXcEk+YmGnPOKGIP33EYV7LdIKvd1cQKZaZMvZ+aUs8LdA9SGh62cIl2ld0QTOXK6uSQ 8YvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=KIC2cjRF; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id n1si16723658pgf.237.2019.07.27.08.59.47; Sat, 27 Jul 2019 08:59:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=KIC2cjRF; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 836397F1D5; Sat, 27 Jul 2019 15:59:44 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by mail.openembedded.org (Postfix) with ESMTP id 9924C6BC44 for ; Sat, 27 Jul 2019 15:59:05 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id 4so18875457pld.10 for ; Sat, 27 Jul 2019 08:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VWwdgehydkPvhrlij60rpcM++DPLQ3IiI6JYxuzD68s=; b=KIC2cjRFoR6WhpQbpuc+KlfkZj5bQWv5IcbXsEEhaqah+GQyvDBKBk2v7tyyS3w9W1 pM/OCvoRwwHQc1VK3muLwSBjgI/bxDFveFFrEgxq1x3WUMTVBEwCHj8AcEvkpX8am2pG IS/kgx74WxqV+rlyBZ/Wllyp2Q1hBjJP48ofZiWq5UFGyXr/O1mbc7+WAhCkUMn9qCF9 jrEwoR7W30Tq9D+uXtNAOfgb02D+oN8XvSmIMm6EKDY1ASslChKqJOU2/QZkbggiflpQ +oj+DVuhFHCjO6Qjpv2RENz163qJCz5MbckDPoZpIunNkj0xEHZIwF20yOU+M+Fl3WQr wP7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VWwdgehydkPvhrlij60rpcM++DPLQ3IiI6JYxuzD68s=; b=Ga891ciGQDFVZmFA4zHFqoqrY09Ek8B0vjf7q+Gq7vgZ+sJawPGg4/zYh/tf3M7zdV 1QHI/HLBQ3NjEelwq9TbXkwVsu6uALSV6TGfISuBkm6zgZRWQ127KKEoUQMzlTyCeJZX yLsiPIRtUb5C/5cQMOxVb0AtnjVESuEJOSWJcOM5so1KzNrbHZk3yj3Ss+rstuGsp1pP TeK/yLwPXlMY707ml5E+CPkqYk/i5YZvxgGjShkvfK1F+rKnCg2TS/XQSg943XYr6wTu +Su9K4IPAEoi9Sl1iMFfTfVWRwcvF3kWM1fMhpcW1xBTJSAv+cjET9f33b+YDTm9/4Ja NtPA== X-Gm-Message-State: APjAAAV1qEHymys2GZ8EYVD0OJk7jJcUSIJnfBByGXv/sjn7SGaRn5NU Z3AxrUyoV255hjr+/wqer48a7W0qGxw= X-Received: by 2002:a17:902:100a:: with SMTP id b10mr61060931pla.338.1564243146319; Sat, 27 Jul 2019 08:59:06 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id g2sm57118347pfi.26.2019.07.27.08.59.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 27 Jul 2019 08:59:05 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 27 Jul 2019 08:58:49 -0700 Message-Id: <20190727155849.38385-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190727155849.38385-1-raj.khem@gmail.com> References: <20190727155849.38385-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/2] lttng-tools: Fix build with glibc 2.30 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...heck-for-gettid-API-during-configure.patch | 55 +++++++++++++++++++ .../lttng/lttng-tools_2.10.7.bb | 1 + 2 files changed, 56 insertions(+) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch -- 2.22.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch new file mode 100644 index 0000000000..c494cee604 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0001-check-for-gettid-API-during-configure.patch @@ -0,0 +1,55 @@ +From 69c62f5f3cc424b7dd0c8e4097743b39a9c48306 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 27 Jul 2019 08:48:13 -0700 +Subject: [lttng-tools][PATCH] check for gettid API during configure + +Add support for gettid() provided by glibc 2.30+ + +Since version 2.30 glibc provides gettid and it causes conflicts with +locally defined gettid(). Use the local definition of +gettid only if system gettid is not available. + +https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + src/common/compat/tid.h | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7b99f5c..e4bd82c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -190,7 +190,7 @@ AC_CHECK_HEADERS([ \ + # Basic functions check + AC_CHECK_FUNCS([ \ + atexit bzero clock_gettime dup2 fdatasync fls ftruncate \ +- gethostbyname gethostname getpagesize localtime_r memchr memset \ ++ gethostbyname gethostname getpagesize gettid localtime_r memchr memset \ + mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \ + strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \ + strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \ +diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h +index 40f562f..aa07a85 100644 +--- a/src/common/compat/tid.h ++++ b/src/common/compat/tid.h +@@ -25,6 +25,7 @@ + #ifndef LTTNG_TID_H + #define LTTNG_TID_H + ++#if !HAVE_GETTID + #ifdef __linux__ + #include + #endif +@@ -47,5 +48,5 @@ static inline pid_t gettid(void) + return getpid(); + } + #endif +- ++#endif /* HAVE_GETTID */ + #endif /* LTTNG_TID_H */ +-- +2.22.0 + diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb index 469ad111c4..aa6d19d0fa 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb @@ -34,6 +34,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://lttng-sessiond.service \ file://0001-Skip-when-testapp-is-not-present.patch \ file://0002-Fix-check-for-lttng-modules-presence-before-testing.patch \ + file://0001-check-for-gettid-API-during-configure.patch \ " SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373"