From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30816 invoked by alias); 13 Nov 2013 16:57:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30790 invoked by uid 89); 13 Nov 2013 16:57:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: service87.mimecast.com Received: from Unknown (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Nov 2013 16:57:18 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 13 Nov 2013 16:57:09 +0000 Received: from [10.1.208.33] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 13 Nov 2013 16:57:06 +0000 Message-ID: <5283AF62.1080601@arm.com> Date: Wed, 13 Nov 2013 18:00:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Joey Ye CC: "gcc-patches@gcc.gnu.org" Subject: Re: [patch] [arm] New option for PIC offset unfixed References: <000001cedf74$bd1bf710$3753e530$@arm.com> <528207A5.9070702@arm.com> <000001cee038$2a027e80$7e077b80$@arm.com> <52834B21.5080305@arm.com> <000001cee05a$0b8dbd80$22a93880$@arm.com> <52835F95.4050805@arm.com> <45520D6299C11E4588128526465332BB3BDBAD147A@SAROVARA.Asiapac.Arm.com> In-Reply-To: <45520D6299C11E4588128526465332BB3BDBAD147A@SAROVARA.Asiapac.Arm.com> X-MC-Unique: 113111316570904501 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg01493.txt.bz2 On 13/11/13 15:57, Joey Ye wrote: >=20 >=20 >> -----Original Message----- >> From: Richard Earnshaw >> Sent: Wednesday, November 13, 2013 19:17 >> To: Joey Ye >> Cc: gcc-patches@gcc.gnu.org >> Subject: Re: [patch] [arm] New option for PIC offset unfixed >> >> On 13/11/13 10:20, Joey Ye wrote: >>>>> + if (TARGET_VXWORKS_RTP) >>>>>>> + arm_pic_data_is_text_relative =3D 0; >>>>> >>>>> Why is this needed? Surely, even a VxWorks user should have the >>>>> right to force the compiler to behave differently. You've set >>>>> things up through >>> the >>>>> default, now just accept what the user has asked for. >>> The reason is that TARGET_VXWORKS_RTP isn't a compile time value to >>> initiate arm.opt. Instead it is true only when -mrtp is specified in >>> runtime. Also enable text relative may result in runtime error on >>> vxworks, it is better to prevent it here. >> >> I'd be happier if this was only done if the command-line option was not >> explicitly set on the command line. > So you are suggesting change like this: > + Target Report Var(arm_pic_data_is_text_relative) Init(-1) >=20 > + if (arm_pic_data_is_text_relative < 0 && TARGET_VXWORKS_RTP) > + arm_pic_data_is_text_relative =3D 0; > + else > + arm_pic_data_is_text_relative =3D 1; >=20 No, use the global_options_set structure to find out if the user has set the value.