Christophe Lyon as MVE reviewer for the AArch32 (arm) port.

2024-09-26 Thread Ramana Radhakrishnan
I am pleased to announce that the GCC Steering Committee has appointed
Christophe Lyon as a MVE Reviewer for the AArch32 port.

Please join me in congratulating Christophe on his new role.

Christophe, please update your listings in the MAINTAINERS file.

Regards,
Ramana


gcc-12-20240926 is now available

2024-09-26 Thread GCC Administrator via Gcc
Snapshot gcc-12-20240926 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/12-20240926/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 12 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-12 revision 596d857e68d727703458639af05a6c4b3ea1ddb1

You'll find:

 gcc-12-20240926.tar.xz   Complete GCC

  SHA256=6d7dfec7c859973cb8eb234145bccfafbefbcb12dce7ff3795e2882849af8720
  SHA1=0c190cd846f85b465259f0d39022f5074edc93b7

Diffs from 12-20240919 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-12
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Meaning of flag_pic

2024-09-26 Thread Enrico via Gcc
I am trying to understand how 'flag_pic' works.
It is used extensively in TARGET_OPTION_OVERRIDE functions in the form 'if
(flag_pic) ... '.
The flags fPic and fpic have a default value of -1, so as far as I
understand, if the two flags are not set in the command line, all 'if
(flag_pic)' will be true because of the default value -1 (since I can see
that flag_pic is a define to global_options.x_flag_pic)

It doesn't look correct to me, but this test is used so many times that I
am sure I am missing something.
Can you please enlighten me?

Thank you,
Best regards
Enrico


Re: Meaning of flag_pic

2024-09-26 Thread Jakub Jelinek via Gcc
On Thu, Sep 26, 2024 at 11:20:15PM +0200, Enrico via Gcc wrote:
> I am trying to understand how 'flag_pic' works.
> It is used extensively in TARGET_OPTION_OVERRIDE functions in the form 'if
> (flag_pic) ... '.
> The flags fPic and fpic have a default value of -1, so as far as I
> understand, if the two flags are not set in the command line, all 'if
> (flag_pic)' will be true because of the default value -1 (since I can see
> that flag_pic is a define to global_options.x_flag_pic)
> 
> It doesn't look correct to me, but this test is used so many times that I
> am sure I am missing something.

Yes, you are missing gcc/opts.cc (finish_options)
  if (!opts->x_flag_opts_finished)
{
  /* We initialize opts->x_flag_pie to -1 so that targets can set a
 default value.  */
  if (opts->x_flag_pie == -1)
{
  /* We initialize opts->x_flag_pic to -1 so that we can tell if
 -fpic, -fPIC, -fno-pic or -fno-PIC is used.  */
  if (opts->x_flag_pic == -1)
opts->x_flag_pie = (opts->x_flag_hardened
? /*-fPIE*/ 2 : DEFAULT_FLAG_PIE);
  else
opts->x_flag_pie = 0;
}
  /* If -fPIE or -fpie is used, turn on PIC.  */
  if (opts->x_flag_pie)
opts->x_flag_pic = opts->x_flag_pie;
  else if (opts->x_flag_pic == -1)
opts->x_flag_pic = 0;
  if (opts->x_flag_pic && !opts->x_flag_pie)
opts->x_flag_shlib = 1;
  opts->x_flag_opts_finished = true;
}
The -1 value just means the state of this option hasn't been finalized yet.

Jakub



Re: Meaning of flag_pic

2024-09-26 Thread Enrico via Gcc
Thank you for your answer.
I did see that part of the code, but still I cannot understand, because the
TARGET_OPTION_OVERRIDE is called before the finalization.
So why doing a test on flag_pic before finalization?

Thank you
Best regards
Enrico Bragante

Il gio 26 set 2024, 23:43 Jakub Jelinek  ha scritto:

> On Thu, Sep 26, 2024 at 11:20:15PM +0200, Enrico via Gcc wrote:
> > I am trying to understand how 'flag_pic' works.
> > It is used extensively in TARGET_OPTION_OVERRIDE functions in the form
> 'if
> > (flag_pic) ... '.
> > The flags fPic and fpic have a default value of -1, so as far as I
> > understand, if the two flags are not set in the command line, all 'if
> > (flag_pic)' will be true because of the default value -1 (since I can see
> > that flag_pic is a define to global_options.x_flag_pic)
> >
> > It doesn't look correct to me, but this test is used so many times that I
> > am sure I am missing something.
>
> Yes, you are missing gcc/opts.cc (finish_options)
>   if (!opts->x_flag_opts_finished)
> {
>   /* We initialize opts->x_flag_pie to -1 so that targets can set a
>  default value.  */
>   if (opts->x_flag_pie == -1)
> {
>   /* We initialize opts->x_flag_pic to -1 so that we can tell if
>  -fpic, -fPIC, -fno-pic or -fno-PIC is used.  */
>   if (opts->x_flag_pic == -1)
> opts->x_flag_pie = (opts->x_flag_hardened
> ? /*-fPIE*/ 2 : DEFAULT_FLAG_PIE);
>   else
> opts->x_flag_pie = 0;
> }
>   /* If -fPIE or -fpie is used, turn on PIC.  */
>   if (opts->x_flag_pie)
> opts->x_flag_pic = opts->x_flag_pie;
>   else if (opts->x_flag_pic == -1)
> opts->x_flag_pic = 0;
>   if (opts->x_flag_pic && !opts->x_flag_pie)
> opts->x_flag_shlib = 1;
>   opts->x_flag_opts_finished = true;
> }
> The -1 value just means the state of this option hasn't been finalized yet.
>
> Jakub
>
>