Re: RFC: Changing AC_PROG_CC to AC_PROG_CC_C99 in top level configure

2021-05-02 Thread Alan Modra via Gcc-patches
On Fri, Apr 30, 2021 at 03:48:00PM -0600, Jeff Law via Gcc-patches wrote:
> 
> On 4/30/2021 12:36 PM, Simon Marchi via Gcc-patches wrote:
> > On 2021-04-26 7:32 a.m., Nick Clifton via Gdb-patches wrote:> Hi Guys,
> > >Given that gcc, gdb and now binutils are all now requiring C99 as a
> > >minimum version of C, are there any objections to updating
> > >configure.ac to reflect this ?
> > > 
> > > Cheers
> > >Nick
> > > 
> > > diff --git a/configure.ac b/configure.ac
> > > index a721316d07b..59b4194fb24 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -1278,7 +1278,7 @@ else
> > > WINDMC_FOR_BUILD="\$(WINDMC)"
> > >   fi
> > > 
> > > -AC_PROG_CC
> > > +AC_PROG_CC_C99
> > >   AC_PROG_CXX
> > > 
> > >   # We must set the default linker to the linker used by gcc for the 
> > > correct
> > Hi Nick,
> > 
> > I think this fix is obvious enough, I encourage you to push it, that
> > will fix the build failure many people get in opcodes/ppc-dis.c.  We'll
> > just remove the line later when we upgrade to Autoconf 2.71, as simple
> > as that.  For now we use 2.69.  If that matters, you have my OK for the
> > GDB side of things.
> 
> That works for me.  I'd just sent Alan the trivial patch to make ppc-dis.c
> compile again with C89, but if we're going to update configure.ac
> appropriately, then it wouldn't be needed.

Yes, I prefer the configure fix too.  If we state we require C99 in
binutils then we ought to be able to use C99..

Nick, does the configure.ac change also need to go in all subdirs, to
support people running make in say ld/ rather than running make in the
top build dir?

-- 
Alan Modra
Australia Development Lab, IBM


[committed] libstdc++: Move unix.org reference to https

2021-05-02 Thread Gerald Pfeifer
commit f58541b2a42002c23267ce872b63d71e275e545d
Author: Gerald Pfeifer 
Date:   Mon May 3 02:00:07 2021 +0200

libstdc++: Move unix.org reference to https

libstdc++-v3/ChangeLog:

* doc/xml/manual/ctype.xml: Move unix.org reference to https.
* doc/html/manual/facets.html: Regenerate.

diff --git a/libstdc++-v3/doc/html/manual/facets.html 
b/libstdc++-v3/doc/html/manual/facets.html
index 828b52f49bb..90f2e26e990 100644
--- a/libstdc++-v3/doc/html/manual/facets.html
+++ b/libstdc++-v3/doc/html/manual/facets.html
@@ -62,7 +62,7 @@ characters.
 . Copyright ?? 1998 ISO. 

   ISO/IEC 9899:1999 Programming languages - C
 . Copyright ?? 1999 ISO. 

-   http://www.unix.org/version3/ieee_std.html"; 
target="_top">
+   https://www.unix.org/version3/ieee_std.html"; 
target="_top">
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)

   . Copyright ?? 1999 
@@ -748,4 +748,4 @@ java.util.Locale, java.util.ResourceBundle
 ??Home??Chapter??9.??
   Containers
   
-
\ No newline at end of file
+
diff --git a/libstdc++-v3/doc/xml/manual/ctype.xml 
b/libstdc++-v3/doc/xml/manual/ctype.xml
index 55930c1751f..a1c580f94ad 100644
--- a/libstdc++-v3/doc/xml/manual/ctype.xml
+++ b/libstdc++-v3/doc/xml/manual/ctype.xml
@@ -168,7 +168,7 @@ characters.
   
   
http://www.w3.org/1999/xlink";
- xlink:href="http://www.unix.org/version3/ieee_std.html";>
+ xlink:href="https://www.unix.org/version3/ieee_std.html";>
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)

   


[committed] wwwdocs: Remove link to Intel AVX-512{VL, BW, DQ} Programming Reference

2021-05-02 Thread Gerald Pfeifer
Links like this to intel.com keep breaking or redirecting to generic
pages, so simply remove this now.

Pushed.

Gerald
---
 htdocs/git.html | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/htdocs/git.html b/htdocs/git.html
index 50fdd56a..8edde126 100644
--- a/htdocs/git.html
+++ b/htdocs/git.html
@@ -326,8 +326,7 @@ in Git.
 
   avx-512vlbwdq
   The goal of this branch is to implement the Intel AVX-512{VL,BW,DQ}
-  Programming Reference
-  (https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf";>link).
+  Programming Reference.
   The branch is maintained by Yukhin Kirill kirill.yuk...@intel.com>.
   Patches should be marked with the tag [AVX512] wwwdocs: in the 
subject
-- 
2.31.1


[committed] wwwdocs: Update link to Fedora rebuild gcc-4.3.0

2021-05-02 Thread Gerald Pfeifer
This moved from www.redhat.com to listman.redhat.com.

Pushed.

Gerald
---
 htdocs/gcc-4.3/porting_to.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/htdocs/gcc-4.3/porting_to.html b/htdocs/gcc-4.3/porting_to.html
index 5777519a..630290ce 100644
--- a/htdocs/gcc-4.3/porting_to.html
+++ b/htdocs/gcc-4.3/porting_to.html
@@ -526,7 +526,9 @@ svn diff -r529854:529855 
http://svn.apache.org/repos/asf/ant/core/trunk/src/main
 Links
 
 
-Jakub Jelinek, https://www.redhat.com/archives/fedora-devel-list/2008-January/msg00128.html";>Mass
 rebuild status with gcc-4.3.0-0.4 of rawhide-20071220
+Jakub Jelinek,
+https://listman.redhat.com/archives/fedora-devel-list/2008-January/msg00128.html";>
+Mass rebuild status with gcc-4.3.0-0.4 of rawhide-20071220
 
 
 
-- 
2.31.1


PING^1 [PATCH 1/2] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs

2021-05-02 Thread H.J. Lu via Gcc-patches
On Tue, Mar 23, 2021 at 3:39 PM H.J. Lu  wrote:
>
> Check if host supports multi-byte NOPs before enabling CET on host.
>
> config/
>
> PR binutils/27397
> * cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
> NOPs.
>
> libiberty/
>
> PR binutils/27397
> * configure: Regenerated.
> ---
>  config/cet.m4   | 19 ---
>  libiberty/configure | 29 +
>  2 files changed, 45 insertions(+), 3 deletions(-)
>
> diff --git a/config/cet.m4 b/config/cet.m4
> index c67fb4f35b6..7718be1afe8 100644
> --- a/config/cet.m4
> +++ b/config/cet.m4
> @@ -130,6 +130,18 @@ fi
>  if test x$may_have_cet = xyes; then
>if test x$cross_compiling = xno; then
>  AC_TRY_RUN([
> +int
> +main ()
> +{
> +  asm ("endbr32");
> +  return 0;
> +}
> +],
> +[have_multi_byte_nop=yes],
> +[have_multi_byte_nop=no])
> +have_cet=no
> +if test x$have_multi_byte_nop = xyes; then
> +  AC_TRY_RUN([
>  static void
>  foo (void)
>  {
> @@ -155,9 +167,10 @@ main ()
>bar ();
>return 0;
>  }
> -],
> -[have_cet=no],
> -[have_cet=yes])
> +  ],
> +  [have_cet=no],
> +  [have_cet=yes])
> +fi
>  if test x$enable_cet = xno -a x$have_cet = xyes; then
>AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
>  fi
> diff --git a/libiberty/configure b/libiberty/configure
> index 2ea7c119809..fc0c953dd1a 100755
> --- a/libiberty/configure
> +++ b/libiberty/configure
> @@ -5396,6 +5396,34 @@ else
>cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
>
> +int
> +main ()
> +{
> +  asm ("endbr32");
> +  return 0;
> +}
> +
> +_ACEOF
> +if ac_fn_c_try_run "$LINENO"; then :
> +  have_multi_byte_nop=yes
> +else
> +  have_multi_byte_nop=no
> +fi
> +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
> +  conftest.$ac_objext conftest.beam conftest.$ac_ext
> +fi
> +
> +have_cet=no
> +if test x$have_multi_byte_nop = xyes; then
> +  if test "$cross_compiling" = yes; then :
> +  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
> +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
> +as_fn_error $? "cannot run test program while cross compiling
> +See \`config.log' for more details" "$LINENO" 5; }
> +else
> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +/* end confdefs.h.  */
> +
>  static void
>  foo (void)
>  {
> @@ -5432,6 +5460,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out 
> conftest$ac_exeext \
>conftest.$ac_objext conftest.beam conftest.$ac_ext
>  fi
>
> +fi
>  if test x$enable_cet = xno -a x$have_cet = xyes; then
>as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" 
> "$LINENO" 5
>  fi
> --
> 2.30.2
>

This patch has been checked into binutils, which also fixes:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99703

Any objections to sync cet.m4 with binutils next week?

-- 
H.J.


Re: [PATCH] nvptx: Fix up nvptx build against latest libstdc++ [PR100375]

2021-05-02 Thread tdevries

On 2021-05-02 10:52, Jakub Jelinek wrote:

Hi!

The r12-220-gd96db15967e78d7cecea3b1cf3169ceb924678ac change
deprecated some non-standard std::pair constructors and that apparently
broke nvptx.c build, where pseudo_node_t is std::pair
and so nullptr (or NULL) needs to be used for the first argument of the
ctors instead of 0.

Tested in x86_64-linux -> nvptx-none cross with CC/CXX latest trunk 
gcc,

ok for trunk?



Hi Jakub,

thanks for taking care of this, LGTM, please apply.

Thanks,
- Tom


2021-05-02  Jakub Jelinek  

PR target/100375
* config/nvptx/nvptx.c (nvptx_sese_pseudo): Use nullptr instead of 0
as first argument of pseudo_node_t constructors.

--- gcc/config/nvptx/nvptx.c.jj 2021-02-10 23:08:50.487460416 +0100
+++ gcc/config/nvptx/nvptx.c2021-05-02 10:39:45.803670287 +0200
@@ -3682,9 +3682,9 @@ nvptx_sese_pseudo (basic_block me, bb_se
   edge e;
   edge_iterator ei;
   int hi_back = depth;
-  pseudo_node_t node_back (0, depth);
+  pseudo_node_t node_back (nullptr, depth);
   int hi_child = depth;
-  pseudo_node_t node_child (0, depth);
+  pseudo_node_t node_child (nullptr, depth);
   basic_block child = NULL;
   unsigned num_children = 0;
   int usd = -dir * sese->dir;
@@ -3751,7 +3751,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   else
{ /* Fallen off graph, backlink to entry node.  */
  hi_back = 0;
- node_back = pseudo_node_t (0, 0);
+ node_back = pseudo_node_t (nullptr, 0);
}
 }

@@ -3772,7 +3772,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   else
{
  /* back edge to entry node */
- sese->push (pseudo_node_t (0, 0));
+ sese->push (pseudo_node_t (nullptr, 0));
}
 }

@@ -3781,7 +3781,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   if (!sese->brackets.length () || !edges || !edges->length ())
 {
   hi_back = 0;
-  node_back = pseudo_node_t (0, 0);
+  node_back = pseudo_node_t (nullptr, 0);
   sese->push (node_back);
 }


Jakub


[PATCH] nvptx: Fix up nvptx build against latest libstdc++ [PR100375]

2021-05-02 Thread Jakub Jelinek via Gcc-patches
Hi!

The r12-220-gd96db15967e78d7cecea3b1cf3169ceb924678ac change
deprecated some non-standard std::pair constructors and that apparently
broke nvptx.c build, where pseudo_node_t is std::pair
and so nullptr (or NULL) needs to be used for the first argument of the
ctors instead of 0.

Tested in x86_64-linux -> nvptx-none cross with CC/CXX latest trunk gcc,
ok for trunk?

2021-05-02  Jakub Jelinek  

PR target/100375
* config/nvptx/nvptx.c (nvptx_sese_pseudo): Use nullptr instead of 0
as first argument of pseudo_node_t constructors.

--- gcc/config/nvptx/nvptx.c.jj 2021-02-10 23:08:50.487460416 +0100
+++ gcc/config/nvptx/nvptx.c2021-05-02 10:39:45.803670287 +0200
@@ -3682,9 +3682,9 @@ nvptx_sese_pseudo (basic_block me, bb_se
   edge e;
   edge_iterator ei;
   int hi_back = depth;
-  pseudo_node_t node_back (0, depth);
+  pseudo_node_t node_back (nullptr, depth);
   int hi_child = depth;
-  pseudo_node_t node_child (0, depth);
+  pseudo_node_t node_child (nullptr, depth);
   basic_block child = NULL;
   unsigned num_children = 0;
   int usd = -dir * sese->dir;
@@ -3751,7 +3751,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   else
{ /* Fallen off graph, backlink to entry node.  */
  hi_back = 0;
- node_back = pseudo_node_t (0, 0);
+ node_back = pseudo_node_t (nullptr, 0);
}
 }
 
@@ -3772,7 +3772,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   else
{
  /* back edge to entry node */
- sese->push (pseudo_node_t (0, 0));
+ sese->push (pseudo_node_t (nullptr, 0));
}
 }
   
@@ -3781,7 +3781,7 @@ nvptx_sese_pseudo (basic_block me, bb_se
   if (!sese->brackets.length () || !edges || !edges->length ())
 {
   hi_back = 0;
-  node_back = pseudo_node_t (0, 0);
+  node_back = pseudo_node_t (nullptr, 0);
   sese->push (node_back);
 }
 

Jakub



Re: [PATCH] i386: Fix up plugin header install on x86 [PR100336]

2021-05-02 Thread Uros Bizjak via Gcc-patches
On Sat, May 1, 2021 at 9:54 PM Jakub Jelinek  wrote:
>
> Hi!
>
> The recent addition of i386-isa.def which is included from i386.h results
> in failures to build gcc plugins, the i386.h header is installed, but
> i386-isa.def is not.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux and
> tested with make install, ok for trunk?
>
> 2021-05-01  Jakub Jelinek  
>
> PR target/100336
> * config/i386/t-i386 (TM_H): Add $(srcdir)/config/i386/i386-isa.def.

OK.

Thanks,
Uros.

> --- gcc/config/i386/t-i386.jj   2021-01-04 10:25:45.428159147 +0100
> +++ gcc/config/i386/t-i386  2021-04-30 11:06:30.176266111 +0200
> @@ -18,7 +18,8 @@
>
>  OPTIONS_H_EXTRA += $(srcdir)/config/i386/stringop.def
>  TM_H += $(srcdir)/config/i386/x86-tune.def \
> -   $(srcdir)/common/config/i386/i386-cpuinfo.h
> +   $(srcdir)/common/config/i386/i386-cpuinfo.h \
> +   $(srcdir)/config/i386/i386-isa.def
>  PASSES_EXTRA += $(srcdir)/config/i386/i386-passes.def
>
>  i386-c.o: $(srcdir)/config/i386/i386-c.c
>
> Jakub
>