This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix up LTO TARGET_OPTION_NODE handling on x86 (PR lto/64374)

On 02/24/15 15:56, Jakub Jelinek wrote:
On Tue, Feb 24, 2015 at 10:21:23PM +0100, Jan Hubicka wrote:
On Tue, Feb 24, 2015 at 08:48:19PM +0100, Jan Hubicka wrote:
Thanks, the i386 parts of the patch are OK, but I think you want to add the reverse
transformation, too.  I.e. if someone compiles with -fPIC but links without.

I've only done it this way because that is what
ix86_option_override_internal was doing, but supposedly only because the
command line option is only about the non-PIC variants.
So I agree that the other direction makes sense too and will adjust it.

My plan to fix the testcase was to put it into ix86_function_specific_restore
which would save need for a new hook. But I am fine either way (just can't
approve the newhook)

The way the streaming in now works is that we don't have a gcc_options
structure anywhere, so if it was done in the *_restore hook, you'd need
to *_save it first and then restore.

I see, we call cl_target_option_restore but not the hook.  Oh well, then.

No, we call cl_target_option_stream_in and the new hook is the target
specific overrider of that function.

BTW, the -fpic -> -fno-pic change passed bootstrap/regtest on x86_64-linux
and i686-linux too, here is the updated patch:

2015-02-24  Jakub Jelinek  <>

	PR lto/64374
	* target.def (target_option_stream_in): New target hook.
	* tree-streamer-in.c (streamer_read_tree_bitfields): Invoke
	targetm.target_option.post_stream_in if non-NULL.
	* doc/tm.texi: Updated.
	* config/i386/i386.c (ix86_function_specific_post_stream_in): New

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]