From patchwork Fri Jun 14 17:14:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13698974 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 553A217FADB; Fri, 14 Jun 2024 17:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718385359; cv=fail; b=gAkN1AAqPOiun6n6SXsPDa9l1IzNaQPETkKj4AXO9b3cSC3wj2Za4ph1SALfMHt+ReyEMelpjQHqNE+dfD4s7RIvlFRh0dp7JBztEt67vhaeySQopohiH1ByXkVihO6rwhvhnjfHlRZXWJLp6RZJ6gTR//Ivc8C2z6RiaogelOU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718385359; c=relaxed/simple; bh=WdU5V2L8uT4AR3B+A5cI5ajW/H+Qgp0BPRjuA6k8tQ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=JgruWvNw3EngCvDT96qiyCmVy0y/UUMk8LbRNjRQCcnszKB69gS3afX3EvOhJxs62l/oKyM7RTiyLQL726zwfZ6I3nptG78yAHzd5+uHWqQHoIRH3ApAYTuNuAtUtYOrbWBydEWMujwqVcs28mnSl23sWebKffJIqe/ELMxapEk= 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=jqAFZUOy; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=v2QoLbq8; arc=fail smtp.client-ip=205.220.177.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="jqAFZUOy"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="v2QoLbq8" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45EDH0Kl028777; Fri, 14 Jun 2024 17:15:51 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=CTK5uummU8kivbhjOTVtyBG7+Z2HdxyHAAOMyo5Qb68=; b= jqAFZUOybJzQVarXDDPJt0V0Vr11DuwSwX2H7rdlQCLPtA/M7bL/rvScpe+lGDt5 Grxuu+oCJ0ouj/mqAZB6ETObcrxNxyQaXdV6/L9a0//zutt5r04AE/fzwMnL7V+B q09KYbgL0NT55eLl5yvhFWRaAhRTeC6IhnaG5o2v89/SSsb29cFRGvvLKKqC0PII 6b3/gAUhQvcsIg7Scr6SInHxmoBZsTF95bM1J68wxih737kjvnHCdyPmkVM+Vpsb kMQ4DSdMLiHwapj6fK23c14D5NzV5zJ9J11PaxBHbQMQaGnvEUlCIWwZOK7o6wP2 /0bRXVpHqFYq+CGoB6iMwA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ymh3pc2by-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2024 17:15:51 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45EGd8sO036740; Fri, 14 Jun 2024 17:15:50 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2174.outbound.protection.outlook.com [104.47.58.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ynce1ync4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2024 17:15:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ft19erXQrn5DLZ88v7owWjA0B1QGGqRbx3jKpu2RWDoGydStNGiG1l0TRv8mBmDh4Px2tSHqnm8UoOqcjVztczSicIoufYbXHPzKywGHuNwU6TaeUKqE7G33UyWopkSKBWPvs40n58/O0HdD0mS9IpFRlYeBJ7sFBDxLFUAF5zn8EcPl3gbmDHdd4q1CDUOmWb5XFStkDGmy0i8iiG8j2jb3XPlM84giQzrH35V/7TF7Yprt1wT9xh790ZARQNspFG0Va5rY05TNNayPYZ58QRd07R0hKu22TQmz6d7M59M27m0AFsnVF3vVb4l2SP+peeiI0I/SjM3Afy7HaVp16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CTK5uummU8kivbhjOTVtyBG7+Z2HdxyHAAOMyo5Qb68=; b=G1ULGFOcsWrtHr1z3Z6BjdNHl4Z3hFmuJqXa9xqL8O070KiDg6FrZV4fC4rF/GqkdP5BxYwi8AbveP70H792hTMIxDb9t8o2lEOMV92NrwfMkn7Di2CgrHeSQpA5iGB7eMe9pz19W7sx7vClK19/jUelcHAmzhdEiOvenQeFTvUxYMD80HxbVOwfVB6ZkCzfrDPkjgH4sffcNWnBGAZE53V/mVN8he/tW3MfFB6HIoSiJVX5Nfv/UX9592cp+0yDORfqocVY/h61C+ahhRMrglr4hb2e5q04jsGKThYaNQJjvdwYuhzcBxnRMu/n/J9bWpMWbuXQyPsraqF4sQzEuA== 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=CTK5uummU8kivbhjOTVtyBG7+Z2HdxyHAAOMyo5Qb68=; b=v2QoLbq8Wbt3IS73isGmJMLS4hGESiTYjoOmrhzbY2yAk8k7VxKuRaj1V72UTN8/kTDSVeKIM/d6K66lhwD/upMi39nD1DJS0CGRJjNLSUgtSzcmkrFL8yzawOpdrkFM3WDOf2hr0fJxsy5r3LVnf+/XManQiX+TNhogPpcHa4A= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV8PR10MB7847.namprd10.prod.outlook.com (2603:10b6:408:1ec::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.24; Fri, 14 Jun 2024 17:15:48 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::5a47:2d75:eef9:1d29]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::5a47:2d75:eef9:1d29%6]) with mapi id 15.20.7677.024; Fri, 14 Jun 2024 17:15:48 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v4 1/3] kbuild: add mod(name,file)_flags to assembler flags for module objects Date: Fri, 14 Jun 2024 13:14:26 -0400 Message-ID: <20240614171428.968174-2-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240614171428.968174-1-kris.van.hees@oracle.com> References: <20240614171428.968174-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR01CA0012.prod.exchangelabs.com (2603:10b6:208:10c::25) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV8PR10MB7847:EE_ X-MS-Office365-Filtering-Correlation-Id: fdd8017a-f7f8-428a-ff09-08dc8c95a246 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|7416011|376011; X-Microsoft-Antispam-Message-Info: iRsG2jmALG8HhKtVZYPtHyK9PucXblaT/UY9uMFw9h7EgybaqPKzhL7OhHgaxsbSnflPzPzD0flBqRYUFZzpScjUQk8ztnCAOQmL15pcTKdvNGFfc3YMqdLjYF3Bqv/afFOk/nmeY/7ehDUUjEsD4QZsHVsIEItmnTNPqqAuPz0i0GE+bB/2rHHXGImQ0tH05uyQAjRGFYKtuO3iDTYOPMOyYgqcN4ir7HYsuRMa2xzGtwYHnDvdwb/Iz9dl6QLX3+v73laH6Jt8o4qAmq98KNfO9xdCzQ6EFWXRpp5BJMpnb0FJ84pIpNaoJh73jwmNfO39UDIy7iuNl0c3+tgBpgbHRoiE2zSXBvyOGNshjz9LUjnZwyIQtyRL/x0siATxz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S:(13230037)(1800799021)(366013)(7416011)(376011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Zk0x1s7kHtmwRHaiQypLGkGSqGDpIu//qr8Cqqhkgvd7DTPcv3UAmxZiKgRYOpfrtQXLH0/i0cHVmdfnFJsCYtozWlqTPMu5ELgZ2VdrHMK+v/SviDsA/duYDiehJKD3pbAraRYiYtVDTBmYxdAFTJ/JdSWxRl4BVMSx3N31nUyND1UzBIeuQEGMtaAuZJmKZTKhEpsy44H/Y5MimdXWIhR8g3lKa7o4AMrqg5znDaVj/UZiIFKZJlzprYi+mMcy9Fe0S/2goVVI/k11+TOkc9ccJ9xGLbqSABz+zji9G66W4OPyy8iGBnkOZB/sNjtxDK/QuYqBLGchs6fJe7Nau/D2m9o21rL/tSOlu3EqgkUEFBx03setD9xJN1j0hMCrG78qHmgsdVqfAux5kBC4RXfV4QblJ3S89DX6lIvjQXZ02ZQIN2T+eS8H6BmJm8zAP5eHks+1OPKT6pV0PJGq0hASo1Fj1HEF7rvmCML1q1/RfmoU94bZ8eZoBcA+7dF1yvlGQKGPorFmYAZ3P1BQT1YHJGbJuMKVvpiPS/cRX94m2azqqjuUafbi+aDoMpR19698GVa2h1MJ7EaROmmjfvASQyrvtzdPXRmFMYmgVtAk/lCNv/eNIeSHGC8e82s3wZYHTuJzQRkI4enNitf3Vp1mW6INYoPor7aXu5hGaP564Pcpnn/q5F1uNB+QFM5UeqUka2zdgw96Q6y6U1FKD2B6rbOPukQEVoH12BWVLHoHulEZAWgDw7mZ8a0i/eZdHyrRKXB/vFK9tq6IMtyFMglr5tbVzu6UxEwxHizjGovAnDbZMKscvNcXALW5C6uowEz6IQYG3Js9U6CY7P+dRox3HTub5/bYPKEAMr9rG0NqaMO/eoJ2tezJ00cas6bSmM2umOYvPlbXD1BW0NBWQ6gd+g8aacb7pp2Bww+JToF83lFF8hpSDljRDis93YbYt054ZpqDJ7nEb60zda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2X+vCK6rB3RuMX3FsDfGpX8wB58Nw9m4p3TTJHQ/m4tTGS2N+UdzgA6u3O2stt9xG37tUzTpyBWOS0xsY56r/LeniGNB95ugrAROiAVMMmiZXTqLfqUJ80hhEbUjgKY19LUOHgmyJJW9/pAPSWL0O9p92+r/STKxKVK1UoIdf1VTmEZJK0J/gn6RWwg/sPy9Dz3VQOWzmlqdBQ8tnSfNewvofCsMj9FwxbcRZRnzZVW06zW8EFtoDVQ0ohV2eUk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdd8017a-f7f8-428a-ff09-08dc8c95a246 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 17:15:48.1172 (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: pfT/+l3mRre/FeoCiGFD0nvxpDW5XiLRsrxJGbaIlgq5jlqp3gVbVHLFmyxW0PE+yQ7CB9Z81h1LmtO8+HYSiu+N1CzgoNjOSyK/C4GTNGk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR10MB7847 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-06-14_15,2024-06-14_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 mlxlogscore=805 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406140118 X-Proofpoint-GUID: ztja67lz8PJYxdMRto5ozWDpnBDwy7D- X-Proofpoint-ORIG-GUID: ztja67lz8PJYxdMRto5ozWDpnBDwy7D- Module objects compiled from C source can be identified by the presence of -DKBUILD_MODFILE and -DKBUILD_MODNAME on their compile command lines. However, module objects from assembler source do not have this defines. Add $(modfile_flags) to modkern_aflags (similar to modkern_cflahs), and add $(modname_flags) to a_flags (similar to c_flags). Signed-off-by: Kris Van Hees --- scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3179747cbd2c..a2524ffd046f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -234,7 +234,7 @@ modkern_rustflags = \ modkern_aflags = $(if $(part-of-module), \ $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE), \ - $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL)) + $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL) $(modfile_flags)) c_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ -include $(srctree)/include/linux/compiler_types.h \ @@ -244,7 +244,7 @@ c_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ rust_flags = $(_rust_flags) $(modkern_rustflags) @$(objtree)/include/generated/rustc_cfg a_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ - $(_a_flags) $(modkern_aflags) + $(_a_flags) $(modkern_aflags) $(modname_flags) cpp_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ $(_cpp_flags)