From patchwork Tue Nov 28 08:27:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 170602 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3762576vqx; Tue, 28 Nov 2023 00:27:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiZ8AdHgPTUhuy6SrF90CPJt3NA+XHs5HSG1Hv0b2TX4exzKarIIOBYWI/7IyReeU0Ah98 X-Received: by 2002:a05:622a:6087:b0:423:a073:8938 with SMTP id hf7-20020a05622a608700b00423a0738938mr13557272qtb.7.1701160065633; Tue, 28 Nov 2023 00:27:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701160065; cv=pass; d=google.com; s=arc-20160816; b=k8wSvMBrtIBGwpambU9MVqE39TYm5pT+Jc/1OFyx6ZO9BGoERRw7x3ANUPd1nMfTEl v7VZckTA+sJbEPIIjdLZ92QTJutlupt/YW5b1Oif2XxN3ZySBy1/KS1rVTc2ZswJAmnS MV8lO5IMdeR48Iqgzoo9JVUeQvsdd6PPQK1it1Nj4bnVhxi6h8HZdf3vbznlnPsA++l0 eWdzrauzTcTHRlhZzTx/jlH+ojKjIp7LsI+qIDWDG0fLKtl+dDCidE10sYk0ZMh3w2LD f1Bbg9Eg5VtvH+M11cKLa9/Ei5M7p6CvreomgGhJRIxkAaxysj8XKrY1KFp/X1Jya9jQ Au4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=z8RvFbbtt3BdYmIjgOHCR6qmLEtUr7GxvXxDVceQvGI=; fh=NXemEfxTRbZtBxUkxR2ehQUaYlcDfMdzPkO8MChVQE4=; b=Xxxe20Dj5YNVZ1ZZZPMgfTbekIZIkAAWBcm6+K8Op6/V5J9PX5pxUkw4j2yY5vxDcH Tn6ALYsq0q+7Pmy/VjfJPWX7FDwgYMkYd2p76vIejqvdVeMF7xUcpi4+JYJQj1KT2mGs 1QTCHMmE3Gnr/BQyoxthv379g5oCeWgSQNoV46KS2a4TbR0EeORk5oaB6V9NtWkSPD4Y VPYY2uU4VzvmXnv/7vljbEWFzfkEaPnhRtz81Z5IkiSqYe4Nbag3xMpEkBULSxyUgMuU RCb9x6m5TgesqXJugyPXGDD7zz58p+I+NdGjPCfKn0MQqSmzwg1gyiiZ8Yrxesgtia48 gIAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DHrMymN5; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y8-20020a05622a004800b0041983be87b9si10898277qtw.629.2023.11.28.00.27.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 00:27:45 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DHrMymN5; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6890F3857706 for ; Tue, 28 Nov 2023 08:27:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id BF8EA3858298 for ; Tue, 28 Nov 2023 08:27:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF8EA3858298 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BF8EA3858298 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701160041; cv=none; b=DuMYMRwGJrxWYpoxX45UefnCrW8AYPjN9dB7JB8InmGKcc1y+Yzb47VZ2AOHdF9VSx4OUkAGi3QbbN+zoQfBwERr06Pvv8uE9cpVwAahkUdSOjXz3tZ9a7ViWC68HLy0nUiXkO2gCIjHOmqDo2ZsZe5NW4qWPQJGBR3To53mqzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701160041; c=relaxed/simple; bh=5UFj9LdOclnctIkxYehusS+bVVG/xE4DJ6YThbaF8D8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Q19Bq39yyS8m7i0YdwIZ0lUR7aWGOMT8Ulj1VSdRaz5kLmIkvqbowTomXErhwwiesga3/lI7DG1nxvFqJLZaSWCI3Si8DscSbBT6XodNxZmTm53PVZ8SdBECAZz/9Mdbhen8/M8HqhdGSzSGOAxPb/sJ7O7yYe68MPgpwqDljQ8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701160039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z8RvFbbtt3BdYmIjgOHCR6qmLEtUr7GxvXxDVceQvGI=; b=DHrMymN5GR8VOy3L8KPHQfUst7N0gwukQTuGFcufXcx4AJlp16JGxMxu9J+Np1Wqk7cH/q bv9bQXilcbnMK68Ema/IbInsdtAyDlv/6MlG/Gshc8HhRJ48XMDiDXFerqEHdaUE90ZAvT 0nR9D43Ex+Gw033vvYYFDxPc0xKx01o= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-12-lpSrP9dVOJyu6sAFJW2MAA-1; Tue, 28 Nov 2023 03:27:17 -0500 X-MC-Unique: lpSrP9dVOJyu6sAFJW2MAA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9903F38107AC for ; Tue, 28 Nov 2023 08:27:17 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.8.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73E81492BE7; Tue, 28 Nov 2023 08:27:17 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [pushed] analyzer: install header files for use by plugins [PR109077] Date: Tue, 28 Nov 2023 03:27:15 -0500 Message-Id: <20231128082716.1437220-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783795617080729587 X-GMAIL-MSGID: 1783795617080729587 PLUGIN_ANALYZER_INIT was added in r11-5583-g66dde7bc64b75d, but we haven't been installing the analyzer's headers files. Fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. I compared the before/after results of "make install" and confirmed that it now installs the analyzer headers. With this patch I was also able to successfully compile and run an out-of-tree build of the cpython analyzer plugin (PR analyzer/107646). Pushed to trunk as r14-5899-g594ef1ff707866. gcc/ChangeLog: PR analyzer/109077 * Makefile.in (PLUGIN_HEADERS): Add analyzer headers. (install-plugin): Keep the directory structure for files in "analyzer". --- gcc/Makefile.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 753f2f36618..b79421e7252 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3821,7 +3821,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \ lcm.h cfgloopmanip.h file-prefix-map.h builtins.def $(INSN_ATTR_H) \ pass-instances.def params.list $(srcdir)/../include/gomp-constants.h \ - $(EXPR_H) + $(EXPR_H) $(srcdir)/analyzer/*.h # generate the 'build fragment' b-header-vars s-header-vars: Makefile @@ -3844,8 +3844,9 @@ install-gengtype: installdirs gengtype$(exeext) gtype.state # Install the headers needed to build a plugin. install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype -# We keep the directory structure for files in config, common/config or -# c-family and .def files. All other files are flattened to a single directory. +# We keep the directory structure for files in analyzer, config, common/config +# or c-family and .def files. +# All other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ @@ -3857,7 +3858,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype else continue; \ fi; \ case $$path in \ - "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ + "$(srcdir)"/analyzer/* \ + | "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ *) base=`basename $$path` ;; \