dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: dejagnu multilib options and dg-{add|additional-}options


From: Vidya Praveen
Subject: FW: dejagnu multilib options and dg-{add|additional-}options
Date: Thu, 25 Jul 2013 13:26:19 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

I was wondering if it's more appropriate to post this message here since
it's more to do with the way multilib options are added in dejagnu.

Regards
VP

----- Forwarded message from Vidya Praveen -----

Date: Mon, 22 Jul 2013 10:59:51 +0100
To: "address@hidden" <address@hidden>
Subject: dejagnu multilib options and dg-{add|additional-}options

Hello,

There are 42 test files (25 under gcc.dg) that specifies

{ dg-add-options bind_pic_locally }

in the regression testsuite. The procedure add_options_for_bind_pic_locally
from lib/target-supports.exp adds -fPIE or -fpie when -fPIC or -fpic is passed
respectively. But this is added before the dejagnu multilib options are added.
So when -fPIC is passed as a multilib option, -fPIE will be unset by -fPIC 
(see gcc/common.opt). This should have been the behaviour since the patch
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01026.html that brings all -fPIC
& -fPIE variants in a Negative loop, was applied. 

I tried fixing this in dejagnu/target.exp by adding the multilib options before
the other options:

default_target_compile:

<       append add_flags " [board_info $dest multilib_flags]"
---
>       set add_flags " [board_info $dest multilib_flags] $add_flags"

and ran regressions for x86_64-unknown-linux-gnu before and after the change.
The only difference in the results after the change was 24 new PASSes which
are from the testcases which either use bind_pic_locally or that use -fno-pic.

(Interestingly, there are many test files that bind_pic_locally pass without
any issue before and after the change.)

I tend to think that the options added from the test files should always win.
Please correct me if I'm wrong. If I'm right, is dejagnu/target.exp is the 
best place to fix this and the way it tried to fix? Any better suggestions?

Though this case is to do with -fPIC, I'm sure there are other options which
when they come as multilib options might have same issue with the some of the
options added by the test files or the default options.

Regards
VP


----- End forwarded message -----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]