From patchwork Mon Aug 19 14:53:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768474 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C4416C6A0 for ; Mon, 19 Aug 2024 14:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079209; cv=fail; b=EoyhJopwHC4HF5slllMooz8LA+8HA5q+P4lnMo6yrHSgnHoy0CP34cE78PGe1n8FNo7b/LPv5yGYQ1yvDOTvr/p1Mq6UWMpwsowapQHuDiipptnfXhbQIs/h+N8Z8YORU8tvIpcc6y8cBIsy8PnWzIYTbMx2yXwQjugONHnboBI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079209; c=relaxed/simple; bh=m4ukiOGIsibsa9KJM60XGEwJE/KeekEJsQYaff9RJug=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=TiuqozAr3kMtxjUiAB14SLOpi0PdpKKLCL/wTFH7BC00l9NJPFDY/MjeaFARbi4HLWoteaQgP6s1p80IDFp3ppSp7fl04zW/EjeLlcnSDu89Li96DFFe3Jhq7B/vIGjDlKBUfCC22mk6gnzkfLKhJl6wCPPbbmO8zuo2SRpB1BI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Lb1LCVjE; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=OdJLqTmL; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Lb1LCVjE"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="OdJLqTmL" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6ujP003650; Mon, 19 Aug 2024 14:53:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b= Lb1LCVjENCR3pDlyMX8iaylIdB42brXtQ+NmLSvtAL5zALyZ83IfkIspW9f4TxW/ JW6nYGW7uqRob8nBl4hWJUrtDnUdtiUlSDdJV6zr2DSVg8ZidOV691AhsLHLcw+V R4Z0XtXh8x1BUlXNKoV3AFwmwYMr+Aw97s1u1WHa7H2aWpXr9UGvxzEeG1iihAKD 13aLqYYO6GObXIaOqSZ09dNrq24WnFPGVwd89d3MUQpQzmlIdvi1mJjOLbsnneyY 6Y8Zz9JaLnh8QZSvyBmgsNHP3SxtsgvkzTLcckepSVubvtumTjo95OGGMGch33Vo ncbFxZcrrt4zi/NRuZLGVg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m4utt8a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:21 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbHb3018978; Mon, 19 Aug 2024 14:53:20 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2043.outbound.protection.outlook.com [104.47.51.43]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 413h4266bx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QlL6vDvtez4TXqBBrF15yPXArU3LQp3RA4lJrvjJyT+F0qSsfV3vR6Rb7EcDPYTKUqKSy+q+eJbljvk16ZByxw6EXgTH9e1LJyHX2PMWP0DdWWHLuAoTVZ4BK3EOEL/ovweIwWbCMGsP0j73+xDvmNPjUshk9Xq9yTwuYLJ4frWq5HVE/0uTCXUgpG8HIMXscMRMvu10983LmWYTy1vE3eLFzuHb19keREdNM2wDt89xArn+JedOwZEDoPafK6UCdZxwokuzMC3T+0UkJWaafsYxfRkahaxq7PW0BE4EaIDEVHkJMJUgy30MMUKX+1hN7pqx8MJCsW48O19qKrDNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b=NMvzwhs4gKDC2llerBPTBIH9F6NUulzirXBqHtIUwW5GJPG9z5P3nZCOatAY5yiE7PVvC8F2yG++61OaPZblrxazQs4UQw/iydmfp3MkcGDDXZHj94dFDZ7hiru6aEW+i5488pFXSy31yfeZX9GMJlUPpyKzmfaVkJRTKNSO+yMXzLxul/KVKQNh1mfD+HO4dQmxNGJw/EsQRenb1xE42vYRa7rCdXLmPU3zZJko7KXpg/vZ4pS6h+3e9PjcaktB+lP7cxl+Ccwnt2xcGSG7okKE59RVUyZPfc+3uc2hObgGFdj0MKOWLzZ9xZYVavvS0a99lBfKGbyF/YuGcRlhwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b=OdJLqTmLajo42f4tgypGnAriIXdxo0d/2sXmjgbsLqg92sP6al8zeuPOOFQLfsSoHP4AtWSmluVKPv1QuSsFhtwHmtq2EMGMxiL35byvDgmGKOPvWRUV1/8zfsue5jyv4u1ybXKL2xcRl67tCRbvVhB7RdxoOXvPXntImfuXFpQ= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by SJ0PR10MB5630.namprd10.prod.outlook.com (2603:10b6:a03:3d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Mon, 19 Aug 2024 14:53:17 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%2]) with mapi id 15.20.7875.016; Mon, 19 Aug 2024 14:53:17 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Andrii Nakryiko , Eduard Zingerman , Yonghong Song , Alexei Starovoitov , Jose Marchesi , David Faust Subject: [PATCH 2/3] selftest/bpf: _GNU_SOURCE redefined in g++ Date: Mon, 19 Aug 2024 15:53:06 +0100 Message-Id: <20240819145307.1366227-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240819145307.1366227-1-cupertino.miranda@oracle.com> References: <20240819145307.1366227-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: AM0PR07CA0022.eurprd07.prod.outlook.com (2603:10a6:208:ac::35) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|SJ0PR10MB5630:EE_ X-MS-Office365-Filtering-Correlation-Id: 99a33d83-9593-4a9d-c7d9-08dcc05ea8e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: pU80UHipWhTuilLxztYSraYmn7iwnmqXaaNxPrkaW4V3XQHUPYaabSU3rOZoYupzByAFgCXVgXpjjrzFQbLeBrA0Evv2bm2WI+pr+CeVttQa0EoyUHKzzq2ZkIMhpg9Pnq4oxeyTAZPwcl+HLS+yzdZIxKEDiX+d4upqv7rpms/Xq9QuSuNdKi8oMQcR01ktfZFHN+XGeNOOLR3BXWUqikeybzVOiYeGsawter6crnnlzh+O7ZZ1LyPrzrt3cOZvzEwzXnD5h/dyDAyXexQRhiQymYjv16JyqBWTmdJ9AdS+4Ipt4mGE1C8vq0hfIVP57Wi7CAMyApWcCxTkMZirmKSbFZ3yKBg9EeYmelRx6UUa59cJoN7mIbjfALgxbuNy354ls7mOGs7tcdg9zTwtSM/ft9NY0q2aeU1l837f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mIzkru1VpjZ9xRTVDHC7uXyH3vdx6yJCyyT89O2TtZ5TsVi7UwGZDs8H0/Dtcg8Y7+OiTr9o1pM+K1yvoOzV7Zz7pEGDrEx9wqFO2YzigfRW4GGdbcCmZvtUrrV/eN5Uf+Bzj/ecqQrQl2K4k0u1RFHONrh70bZ7Y2ayE9r6AUln6wwwET9CT/7XeSsNK4AdSpeg3dDQc8Isu8/PxtI2pTDDcP5lEwtcPeZOZNodONEGhECT8MixAS1SZSmZbk72OB1iqy2eMkpHbsbUOSqoVTVnftgaFk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99a33d83-9593-4a9d-c7d9-08dcc05ea8e9 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 14:53:17.5707 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MTG5X9H/gVe6kgUgIju2bLN6/cDy+gztqHqO04vhKyHEWnokSsMwl4C7PbSnLO7Nj9Cv1jIn5Ga0VzgALqfivbL0bdAyXZpyV5kOMJJ7Xtk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5630 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-19_13,2024-08-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190099 X-Proofpoint-ORIG-GUID: miIlkAOL5CsMzjHUSqpnq346VAinco56 X-Proofpoint-GUID: miIlkAOL5CsMzjHUSqpnq346VAinco56 X-Patchwork-Delegate: bpf@iogearbox.net The following commit: commit cc937dad85aea4ab9e4f9827d7ea55932c86906b Author: Edward Liaw Date: Tue Jun 25 22:34:45 2024 +0000 selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk introduces "-D_GNU_SOURCE=" to generic CFLAGS used within bpf selfttests makefiles which include lib.mk. g++ by default sets the _GNU_SOURCE flag internally which reports the following warning and subsequent error: : error: "_GNU_SOURCE" redefined [-Werror] : note: this is the location of the previous definition This patch removes that _GNU_SOURCE definition from CFLAGS when compiling CPP files. Signed-off-by: Cupertino Miranda Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Jose Marchesi Cc: David Faust --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index ded6e22b3076..f06c51bfd522 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -741,7 +741,7 @@ $(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp # Make sure we are able to include and link libbpf against c++. $(OUTPUT)/test_cpp: test_cpp.cpp $(OUTPUT)/test_core_extern.skel.h $(BPFOBJ) $(call msg,CXX,,$@) - $(Q)$(CXX) $(CFLAGS) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@ + $(Q)$(CXX) $(subst -D_GNU_SOURCE=,,$(CFLAGS)) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@ # Benchmark runner $(OUTPUT)/bench_%.o: benchs/bench_%.c bench.h $(BPFOBJ)