Message ID | 9FD839CC-67AD-43A8-B28F-11F78BB6BC94@arm.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 24661 invoked by alias); 7 Nov 2017 10:41:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 24578 invoked by uid 89); 7 Nov 2017 10:40:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0048.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Nov 2017 10:40:57 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com (10.160.211.19) by AM3PR08MB0104.eurprd08.prod.outlook.com (10.160.211.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 7 Nov 2017 10:40:53 +0000 Received: from AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::2891:52f2:59:8e54]) by AM3PR08MB0101.eurprd08.prod.outlook.com ([fe80::2891:52f2:59:8e54%16]) with mapi id 15.20.0197.020; Tue, 7 Nov 2017 10:40:52 +0000 From: Alan Hayward <Alan.Hayward@arm.com> To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> CC: nd <nd@arm.com> Subject: [PATCH] Better make rules for IPA objects Date: Tue, 7 Nov 2017 10:40:52 +0000 Message-ID: <9FD839CC-67AD-43A8-B28F-11F78BB6BC94@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM3PR08MB0104; 6:cOrccUSoer6dLsMy62LD/GDJXpBxyCs4HZOMIbP+oavbfZSJqJrz15LCkrSSS14/+94zXntN/VHlggDtWFGowaXx7D5ulKzJea6aR0wdcCrxxQdi5uRIINQfwCHRLIgtaJOCSw0iqUG9ZuXLhhWIpX6X3R0a6uepkYvYjsZLoQ+HO1/HtT1UE6F5hNjZyp061mIVhApSYqxQWVS/PkrBlQWYQk8wRVeocgP1AHnsFQ4bI7MDY9Js3DCUsXzC4J994XkTW0phc598KAOYB62GwISKcYAhFZocJ5QXuPzIxwWOQUJqGd2szStZTHNX59ZZZBrb+wFy7/Nc4aq9sLGPj1aL6/pkW4cmp9JK093mHjw=; 5:wLcGdRgBEDQLhQ4KANJ+8cFgAYXskSI8BHE0QQMkB2SzJLwYzG65fRzkS63we6rib3s3hgnICUma6231lVcmTDqjGRGwT5tPzz03GYVTI/UgcFoNa65BgxpIXTq6tVG7PwvzdEeaAF3N8MnmqoUNpZN4O1wvgKBNfNqVcGHJu+A=; 24:SpbdmqZUh4zUAi85RHGd6NTvcTmX12wlR/09TbcYstFad0VLevz4jDOLvPM/C7Cou2DkSqmgBrGNiZgITRrPa9/+NXZXC8Cl6z5+7G4Y9RI=; 7:6T9j1XQQIQrJEHfI/De6BG9rEbu3XDs3i3S3d9T9jiucUGjI/TbIWQHEEODckoebo0bSARyI0BVqIZVASvTFOe8x6x7pIYRT8olvnLzUdqvIq3xinHnlwCfJHzqop+hoGB2roeagsUR6ozgm+adZr3uDy2abd7ks6SeJ6XER1+sZolLOOwWZyqWtrQfCjmVcGWOb0az7UZp155IqSpzMGVH91alDidfXJIULDwkXH1o9SscZutCk2AEFO4+LOolH x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 0b040e0c-f422-4702-2451-08d525cc04e7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:AM3PR08MB0104; x-ms-traffictypediagnostic: AM3PR08MB0104: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: <AM3PR08MB0104A5858E6859E44F22FF9D97510@AM3PR08MB0104.eurprd08.prod.outlook.com> x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(3231021)(6055026)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM3PR08MB0104; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM3PR08MB0104; x-forefront-prvs: 0484063412 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(189002)(199003)(377424004)(305945005)(478600001)(2906002)(54356999)(7736002)(6512007)(50986999)(53936002)(2501003)(86362001)(14454004)(36756003)(25786009)(105586002)(2900100001)(106356001)(101416001)(2351001)(33656002)(5660300001)(316002)(6916009)(6116002)(102836003)(3846002)(5250100002)(5640700003)(97736004)(189998001)(6506006)(82746002)(8676002)(6436002)(81156014)(81166006)(8936002)(99286004)(66066001)(72206003)(4326008)(3280700002)(3660700001)(68736007)(83716003)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR08MB0104; H:AM3PR08MB0101.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <A6543BD5C7131945B2E3B73FC4FD9C9D@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b040e0c-f422-4702-2451-08d525cc04e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2017 10:40:52.6262 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0104 X-IsSubscribed: yes |
Commit Message
Alan Hayward
Nov. 7, 2017, 10:40 a.m. UTC
This patch strengthens the rule for compiling arch/ and common/ files into IPA. In the existing code, "foo-ipa.o" will try to match: foo-generated.c foo-ipa.c gdbserver/foo.c common/foo.c arch/foo.c If this potentially matched multiple files, then the first is matched. This patch changes the IPA rules so that files in arch/ and common/ are explicitly listed using the directory name. A future patch could be added to remove the ambiguity from the first three matches. I'm not planning on making that change. This changed is required as part of moving aarch64 to use flexible target descriptors. Alan. 2017-11-07 Alan Hayward <alan.hayward@arm.com> gdbserver: * Makefile.in: Update arch and common rules. * configure.srv: Explicitly mark arch/ and common/ files.
Comments
Ping. > On 7 Nov 2017, at 10:18, Alan Hayward <Alan.Hayward@arm.com> wrote: > > This patch strengthens the rule for compiling arch/ and common/ files > into IPA. > > In the existing code, "foo-ipa.o" will try to match: > foo-generated.c > foo-ipa.c > gdbserver/foo.c > common/foo.c > arch/foo.c > > If this potentially matched multiple files, then the first is matched. > > This patch changes the IPA rules so that files in arch/ and common/ are > explicitly listed using the directory name. > > A future patch could be added to remove the ambiguity from the first three > matches. I'm not planning on making that change. > > This changed is required as part of moving aarch64 to use flexible target > descriptors. > > Alan. > > 2017-11-07 Alan Hayward <alan.hayward@arm.com> > > gdbserver: > * Makefile.in: Update arch and common rules. > * configure.srv: Explicitly mark arch/ and common/ files. > > diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in > index 8e73563b103f720ddd5e77607c3190a2959903f5..1bd4cf93cce192f060c362665fd5df9f4c323f24 100644 > --- a/gdb/gdbserver/Makefile.in > +++ b/gdb/gdbserver/Makefile.in > @@ -563,11 +563,11 @@ arch/%.o: ../arch/%.c > $(IPAGENT_COMPILE) $< > $(POSTCOMPILE) > > -%-ipa.o: ../common/%.c > +common/%-ipa.o: ../common/%.c > $(IPAGENT_COMPILE) $< > $(POSTCOMPILE) > > -%-ipa.o: ../arch/%.c > +arch/%-ipa.o: ../arch/%.c > $(IPAGENT_COMPILE) $< > $(POSTCOMPILE) > > diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv > index 515c6dc8b3e57574286149ebdca37da149218a35..82c3dc237c3fb6baeb2a72cd9ed66d8c7556d72a 100644 > --- a/gdb/gdbserver/configure.srv > +++ b/gdb/gdbserver/configure.srv > @@ -133,7 +133,7 @@ case "${target}" in > srv_linux_thread_db=yes > srv_linux_btrace=yes > ipa_obj="linux-i386-ipa.o linux-x86-tdesc-ipa.o" > - ipa_obj="${ipa_obj} i386-ipa.o" > + ipa_obj="${ipa_obj} arch/i386-ipa.o" > ;; > i[34567]86-*-lynxos*) srv_regobj="" > srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o" > @@ -383,7 +383,7 @@ case "${target}" in > srv_linux_thread_db=yes > srv_linux_btrace=yes > ipa_obj="linux-amd64-ipa.o linux-x86-tdesc-ipa.o" > - ipa_obj="${ipa_obj} amd64-ipa.o" > + ipa_obj="${ipa_obj} arch/amd64-ipa.o" > ;; > x86_64-*-mingw*) srv_regobj="" > srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o” > >
Alan Hayward <Alan.Hayward@arm.com> writes: > -%-ipa.o: ../common/%.c > +common/%-ipa.o: ../common/%.c > $(IPAGENT_COMPILE) $< > $(POSTCOMPILE) We don't have common/ directory in GDBserver build tree, so common/%-ipa.o is useless. Secondly, this "%-ipa.o: ../common/%.c" is removed, common/*.c files can't be built for IPA. Please remove this change. With your patch applied, fail to build libinproctrace.so on x86_64-linux. g++ -std=gnu++11 -shared -fPIC -Wl,--soname=libinproctrace.so -Wl,--no-undefined -g -O2 -I. -I../../../binutils-gdb/gdb/gdbserver -I../../../binutils-gdb/gdb/gdbserver/../common -I../../../binutils-gdb/gdb/gdbserver/../regformats -I../../../binutils-gdb/gdb/gdbserver/.. -I../../../binutils-gdb/gdb/gdbserver/../../include -I../../../binutils-gdb/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wformat-nonliteral -Werror -DGDBSERVER \ -static-libstdc++ -static-libgcc -Wl,--dynamic-list=../../../binutils-gdb/gdb/gdbserver/proc-service.list -o libinproctrace.so ax-ipa.o common-utils-ipa.o errors-ipa.o format-ipa.o print-utils-ipa.o regcache-ipa.o remote-utils-ipa.o rsp-low-ipa.o tdesc-ipa.o tracepoint-ipa.o utils-ipa.o vec-ipa.o linux-amd64-ipa.o linux-x86-tdesc-ipa.o arch/amd64-ipa.o -ldl -pthread g++: error: common-utils-ipa.o: No such file or directory g++: error: errors-ipa.o: No such file or directory g++: error: format-ipa.o: No such file or directory g++: error: print-utils-ipa.o: No such file or directory g++: error: rsp-low-ipa.o: No such file or directory g++: error: vec-ipa.o: No such file or directory Makefile:412: recipe for target 'libinproctrace.so' failed This and (https://sourceware.org/ml/gdb-patches/2017-10/msg00888.html) worry me more. You miss something important in the development workflow to make sure your patches posted are well-tested.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 8e73563b103f720ddd5e77607c3190a2959903f5..1bd4cf93cce192f060c362665fd5df9f4c323f24 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -563,11 +563,11 @@ arch/%.o: ../arch/%.c $(IPAGENT_COMPILE) $< $(POSTCOMPILE) -%-ipa.o: ../common/%.c +common/%-ipa.o: ../common/%.c $(IPAGENT_COMPILE) $< $(POSTCOMPILE) -%-ipa.o: ../arch/%.c +arch/%-ipa.o: ../arch/%.c $(IPAGENT_COMPILE) $< $(POSTCOMPILE) diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index 515c6dc8b3e57574286149ebdca37da149218a35..82c3dc237c3fb6baeb2a72cd9ed66d8c7556d72a 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -133,7 +133,7 @@ case "${target}" in srv_linux_thread_db=yes srv_linux_btrace=yes ipa_obj="linux-i386-ipa.o linux-x86-tdesc-ipa.o" - ipa_obj="${ipa_obj} i386-ipa.o" + ipa_obj="${ipa_obj} arch/i386-ipa.o" ;; i[34567]86-*-lynxos*) srv_regobj="" srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o" @@ -383,7 +383,7 @@ case "${target}" in srv_linux_thread_db=yes srv_linux_btrace=yes ipa_obj="linux-amd64-ipa.o linux-x86-tdesc-ipa.o" - ipa_obj="${ipa_obj} amd64-ipa.o" + ipa_obj="${ipa_obj} arch/amd64-ipa.o" ;; x86_64-*-mingw*) srv_regobj="" srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.oâ€