Re: Broken build

2020-06-02 Thread Hans-Peter Nilsson via Gcc-patches
> From: Alexandre Oliva 
> Date: Tue, 2 Jun 2020 13:29:03 +0200

> Hello, Anthony, H-P,
> 
> On May 27, 2020, Anthony Green  wrote:
> 
> > Hans-Peter Nilsson via Gcc-patches  writes:
> >> And here's an improper bug report.
> >> 
> >> One of the commits between cfdff3eeb90..5c8344e7289 caused every
> >> single *linked* test to fail for cris-elf, like:
> 
> > I can confirm that the moxie-elf test cases don't link either.
> 
> I believe the problem reported by Hans-Peter was fixed in the follow up
> I put in the other day,

FAOD: confirmed.  (And thanks for fixing it promptly.)

brgds, H-P


Re: Broken build

2020-06-02 Thread Alexandre Oliva
Hello, Anthony, H-P,

On May 27, 2020, Anthony Green  wrote:

> Hans-Peter Nilsson via Gcc-patches  writes:
>> And here's an improper bug report.
>> 
>> One of the commits between cfdff3eeb90..5c8344e7289 caused every
>> single *linked* test to fail for cris-elf, like:

> I can confirm that the moxie-elf test cases don't link either.

I believe the problem reported by Hans-Peter was fixed in the follow up
I put in the other day, but I happened to stumble across more recent
test results you've posted, and it looks like you're still running into
problems.


> It looks like setting ldscript in the board description file doesn't
> work.  In my case that means "-Tsim.ld" isn't being passed through and
> we can't link anymore.  Here's moxie-sim.exp:

> https://github.com/moxielogic/moxie-test-gcc/blob/7c707e187f101922e3ef7f6e23dbbd1890f9e8dd/moxie-sim.exp#L42

Looking more closely, I realized I used ldscripts instead of ldscript in
the recent changes.  That would explain at least the outputs.exp
failures.  Would you please let me know whether the patch below brings
you back to the state before the revamp patch went in?

Failing that, could you possibly share a gcc.log with me?

Thanks in advance,


diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp 
b/gcc/testsuite/gcc.misc-tests/outputs.exp
index c3c6c2d..06a32db 100644
--- a/gcc/testsuite/gcc.misc-tests/outputs.exp
+++ b/gcc/testsuite/gcc.misc-tests/outputs.exp
@@ -48,7 +48,7 @@ set skip_lto ![check_effective_target_lto]
 # We do not compile to an executable, because that requires naming an output.
 set link_options ""
 set dest [target_info name]
-foreach i { ldflags libs ldscripts } {
+foreach i { ldflags libs ldscript } {
 if {[board_info $dest exists $i]} {
set skip ""
foreach opt [split [board_info $dest $i]] {
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index d591cb3..87eeb7d 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -287,7 +287,7 @@ proc dg-additional-files { args } {
 
 set gcc_adjusted_linker_flags 0
 
-# Add -Wl, before any file names in ldflags, libs, and ldscripts, so
+# Add -Wl, before any file names in ldflags, libs, and ldscript, so
 # that default object files or libraries do not change the names of
 # gcc auxiliary outputs.
 
@@ -300,7 +300,7 @@ proc gcc_adjust_linker_flags {} {
 
 if {![is_remote host]} {
set dest [target_info name]
-   foreach i { ldflags libs ldscripts } {
+   foreach i { ldflags libs ldscript } {
if {[board_info $dest exists $i]} {
set opts [board_info $dest $i]
set nopts {}


-- 
Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/
Free Software Evangelist  Stallman was right, but he's left :(
GNU Toolchain Engineer   Live long and free, and prosper ethically


Re: Broken build

2020-05-27 Thread Alexandre Oliva
On May 27, 2020, Hans-Peter Nilsson  wrote:

>> I ask because this error suggests an empty argument passed to
>> GCC.

> And ignored before your rewrite?

Or absent.  It turned out my massaging of ldflags et al turned
consecutive blanks into empty arguments.  I posted a patch for that and
most of the other fallout at
https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546659.html

Jeff Law has already aprpoved it, and I'll probably check it in very
shortly, as soon as I get a few more test results.  Please be sure to
let me know in case it does not fix the problem for you.

-- 
Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/
Free Software Evangelist  Stallman was right, but he's left :(
GNU Toolchain Engineer   Live long and free, and prosper ethically


Re: Broken build

2020-05-27 Thread Anthony Green
Hans-Peter Nilsson via Gcc-patches  writes:

> And here's an improper bug report.
>
> One of the commits between cfdff3eeb90..5c8344e7289 caused every
> single *linked* test to fail for cris-elf, like:

I can confirm that the moxie-elf test cases don't link either.

It looks like setting ldscript in the board description file doesn't
work.  In my case that means "-Tsim.ld" isn't being passed through and
we can't link anymore.  Here's moxie-sim.exp:

https://github.com/moxielogic/moxie-test-gcc/blob/7c707e187f101922e3ef7f6e23dbbd1890f9e8dd/moxie-sim.exp#L42

Thanks for looking, Alex.

AG



Re: Broken build

2020-05-27 Thread Hans-Peter Nilsson via Gcc-patches
> From: Alexandre Oliva 
> Date: Wed, 27 May 2020 16:30:07 +0200

> On May 26, 2020, Hans-Peter Nilsson  wrote:
> 
> >> Here's a proper patch submission.
> 
> > And here's an improper bug report.
> 
> :-)
> 
> Thanks, H-P,
> 
> > xgcc: error: : No such file or directory
> 
> Interesting...  If you cut the command line that you included in
> your so-called improper bug report ;-) do you get this error?

Aha: no.

> I ask because this error suggests an empty argument passed to
> GCC.

And ignored before your rewrite?  Maybe.  If so, I'm guessing
there are lots of build systems out there carrying this kind of
gem.

>  This
> test is the very kind of scenario (with multiple compiler inputs) in
> which the testsuite would implicitly arrange to pass "-dumpbase ''" to
> the compiler driver.  I don't see -dumpbase in the command line, though,
> but there might somehow be a '' not visible in gcc.log.
> 
> Could I possibly ask what build and host systems you've used, and what
> your dejagnu board configuration file looks like?

Debian 9, x86_64.  (Nothing Canadian.)

Oops, I'm using a local baseboard file, but it looks mostly like
the cris-sim.exp baseboard file in Debian's dejagnu-1.6-1.1 (I'd
guess also the official dejagnu-1.6; I doubt there are
CRIS-specific distro diffs).  Diffs are in the copyright header,
some ";" cleanups, and some target selector supposed-cleanup.

To wit, the lines
 set cris_ldopt "-sim3"
and
 set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $cris_ldopt"
are the same.

> > -L/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib
> > -sim3 -lm -o
> 
> Is it correct to assume that -sim3 is NOT a separate command-line
> option,

No, see above: it's a separate command-line option.

> and that there is a directory named newlib-sim3 ?

No, see cris.h:LIB_SPEC and STARTFILE_SPEC.

> > Can you please have a look?
> 
> Sure, thanks!  Sorry about this undesirable surprise.

Thanks for looking.

brgds, H-P


Re: Broken build

2020-05-27 Thread Alexandre Oliva
On May 26, 2020, Hans-Peter Nilsson  wrote:

>> Here's a proper patch submission.

> And here's an improper bug report.

:-)

Thanks, H-P,

> xgcc: error: : No such file or directory

Interesting...  If you cut the command line that you included in
your so-called improper bug report ;-) do you get this error?

I ask because this error suggests an empty argument passed to GCC.  This
test is the very kind of scenario (with multiple compiler inputs) in
which the testsuite would implicitly arrange to pass "-dumpbase ''" to
the compiler driver.  I don't see -dumpbase in the command line, though,
but there might somehow be a '' not visible in gcc.log.


Could I possibly ask what build and host systems you've used, and what
your dejagnu board configuration file looks like?


> -L/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib
> -sim3 -lm -o

Is it correct to assume that -sim3 is NOT a separate command-line
option, and that there is a directory named newlib-sim3 ?

> Can you please have a look?

Sure, thanks!  Sorry about this undesirable surprise.

-- 
Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/
Free Software Evangelist  Stallman was right, but he's left :(
GNU Toolchain Engineer   Live long and free, and prosper ethically


Broken build (was: Re: drop -aux{dir,base}, revamp -dump{dir,base})

2020-05-26 Thread Hans-Peter Nilsson via Gcc-patches
> From: Alexandre Oliva 
> Date: Tue, 26 May 2020 15:52:57 +0200

> On May 26, 2020, Richard Biener  wrote:
> 
> > xgcc: error: unrecognized command-line option '-dumpbase'^M
> 
> > xg++: error: unrecognized command-line option '-dA'; did you mean '-A'
> 
> Here's a proper patch submission.

And here's an improper bug report.

One of the commits between cfdff3eeb90..5c8344e7289 caused every
single *linked* test to fail for cris-elf, like:

xgcc: error: : No such file or directory

as in (excerpt from gcc.log):
spawn -ignore SIGHUP 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/gcc/xgcc 
-B/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/gcc/ 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/20010124-1.c
 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/20010124-1-lib.c
 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
 -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers 
-fdiagnostics-color=never -fdiagnostics-urls=never -w -O1 -fno-tree-dse 
-fno-tree-loop-distribute-patterns -fno-tracer -fno-ipa-ra 
-fno-inline-functions -Wl,--allow-multiple-definition -isystem 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib/targ-include
 -isystem 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/gcc/newlib/libc/include 
-B/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cr
 is-elf/./libgloss/cris/ 
-L/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libgloss/cris
 -L/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/gcc/libgloss/cris  
-B/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib/
 
-L/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib
 -sim3 -lm -o 
/netapp/hp3_storage/hp/autotest/hpautotest-gcc1/cris-elf/gccobj/gcc/testsuite/gcc/20010124-1.x1
xgcc: error: : No such file or directory

The only commit in that range that touches gcc.c was
"1dedc12d186 2020-05-26 ol...@adacore.com revamp dump and aux output names"

At bf40f0ba9503, or in LAST_UPDATED parlance,
Tue May 26 23:52:15 UTC 2020 (revision 
56f03cd12be:7d94d872509:bf40f0ba95037f235b007a55a7682646a0578b26)
(after every follow-up commit at the time of this writing) this
is still broken.

Can you please have a look?

brgds, H-P


Fix broken build for AVR and SPU targets

2014-02-12 Thread Senthil Kumar Selvaraj
The below patch fixes the build for AVR and SPU targets, which got broken
when the signature of build_function_call_vec changed. The patch passes
vNULL for the extra parameter added (arg_loc), which I hope is ok for
builtins?

If ok, could someone commit please? I don't have commit access.

Regards
Senthil

gcc/ChangeLog

2014-02-12  Senthil Kumar Selvaraj  senthil_kumar.selva...@atmel.com

* config/avr/avr-c.c (avr_resolve_overloaded_builtin): Pass vNULL for 
arg_loc.
* config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise.


diff --git gcc/config/avr/avr-c.c gcc/config/avr/avr-c.c
index 98650e0..101d280 100644
--- gcc/config/avr/avr-c.c
+++ gcc/config/avr/avr-c.c
@@ -115,7 +115,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
fndecl, void *vargs)
   fold = targetm.builtin_decl (id, true);
 
   if (fold != error_mark_node)
-fold = build_function_call_vec (loc, fold, args, NULL);
+fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
 
   break; // absfx
 
@@ -181,7 +181,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
fndecl, void *vargs)
   fold = targetm.builtin_decl (id, true);
 
   if (fold != error_mark_node)
-fold = build_function_call_vec (loc, fold, args, NULL);
+fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
 
   break; // roundfx
 
@@ -238,7 +238,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
fndecl, void *vargs)
   fold = targetm.builtin_decl (id, true);
 
   if (fold != error_mark_node)
-fold = build_function_call_vec (loc, fold, args, NULL);
+fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
 
   break; // countlsfx
 }
diff --git gcc/config/spu/spu-c.c gcc/config/spu/spu-c.c
index 411496d..9d7aa5a 100644
--- gcc/config/spu/spu-c.c
+++ gcc/config/spu/spu-c.c
@@ -181,7 +181,7 @@ spu_resolve_overloaded_builtin (location_t loc, tree 
fndecl, void *passed_args)
   return error_mark_node;
 }
 
-  return build_function_call_vec (loc, match, fnargs, NULL);
+  return build_function_call_vec (loc, vNULL, match, fnargs, NULL);
 #undef SCALAR_TYPE_P
 }
 


Re: Fix broken build for AVR and SPU targets

2014-02-12 Thread Marek Polacek
On Wed, Feb 12, 2014 at 01:43:39PM +0530, Senthil Kumar Selvaraj wrote:
 The below patch fixes the build for AVR and SPU targets, which got broken
 when the signature of build_function_call_vec changed. The patch passes
 vNULL for the extra parameter added (arg_loc), which I hope is ok for
 builtins?

Sorry.
 
 If ok, could someone commit please? I don't have commit access.

I can commit it for you, if someone acks it (looks obvious enough to
me...).
 
 Regards
 Senthil
 
 gcc/ChangeLog
 
 2014-02-12  Senthil Kumar Selvaraj  senthil_kumar.selva...@atmel.com
 
   * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Pass vNULL for 
 arg_loc.
   * config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise.
 
 
 diff --git gcc/config/avr/avr-c.c gcc/config/avr/avr-c.c
 index 98650e0..101d280 100644
 --- gcc/config/avr/avr-c.c
 +++ gcc/config/avr/avr-c.c
 @@ -115,7 +115,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
 fndecl, void *vargs)
fold = targetm.builtin_decl (id, true);
  
if (fold != error_mark_node)
 -fold = build_function_call_vec (loc, fold, args, NULL);
 +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
  
break; // absfx
  
 @@ -181,7 +181,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
 fndecl, void *vargs)
fold = targetm.builtin_decl (id, true);
  
if (fold != error_mark_node)
 -fold = build_function_call_vec (loc, fold, args, NULL);
 +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
  
break; // roundfx
  
 @@ -238,7 +238,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
 fndecl, void *vargs)
fold = targetm.builtin_decl (id, true);
  
if (fold != error_mark_node)
 -fold = build_function_call_vec (loc, fold, args, NULL);
 +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
  
break; // countlsfx
  }
 diff --git gcc/config/spu/spu-c.c gcc/config/spu/spu-c.c
 index 411496d..9d7aa5a 100644
 --- gcc/config/spu/spu-c.c
 +++ gcc/config/spu/spu-c.c
 @@ -181,7 +181,7 @@ spu_resolve_overloaded_builtin (location_t loc, tree 
 fndecl, void *passed_args)
return error_mark_node;
  }
  
 -  return build_function_call_vec (loc, match, fnargs, NULL);
 +  return build_function_call_vec (loc, vNULL, match, fnargs, NULL);
  #undef SCALAR_TYPE_P
  }
  

Marek


Re: Fix broken build for AVR and SPU targets

2014-02-12 Thread Jakub Jelinek
On Wed, Feb 12, 2014 at 10:16:37AM +0100, Marek Polacek wrote:
 On Wed, Feb 12, 2014 at 01:43:39PM +0530, Senthil Kumar Selvaraj wrote:
  The below patch fixes the build for AVR and SPU targets, which got broken
  when the signature of build_function_call_vec changed. The patch passes
  vNULL for the extra parameter added (arg_loc), which I hope is ok for
  builtins?
 
 Sorry.
  
  If ok, could someone commit please? I don't have commit access.
 
 I can commit it for you, if someone acks it (looks obvious enough to
 me...).

Ok for trunk.

  2014-02-12  Senthil Kumar Selvaraj  senthil_kumar.selva...@atmel.com
  
  * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Pass vNULL for 
  arg_loc.
  * config/spu/spu-c.c (spu_resolve_overloaded_builtin): Likewise.
  
  
  diff --git gcc/config/avr/avr-c.c gcc/config/avr/avr-c.c
  index 98650e0..101d280 100644
  --- gcc/config/avr/avr-c.c
  +++ gcc/config/avr/avr-c.c
  @@ -115,7 +115,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
  fndecl, void *vargs)
 fold = targetm.builtin_decl (id, true);
   
 if (fold != error_mark_node)
  -fold = build_function_call_vec (loc, fold, args, NULL);
  +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
   
 break; // absfx
   
  @@ -181,7 +181,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
  fndecl, void *vargs)
 fold = targetm.builtin_decl (id, true);
   
 if (fold != error_mark_node)
  -fold = build_function_call_vec (loc, fold, args, NULL);
  +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
   
 break; // roundfx
   
  @@ -238,7 +238,7 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree 
  fndecl, void *vargs)
 fold = targetm.builtin_decl (id, true);
   
 if (fold != error_mark_node)
  -fold = build_function_call_vec (loc, fold, args, NULL);
  +fold = build_function_call_vec (loc, vNULL, fold, args, NULL);
   
 break; // countlsfx
   }
  diff --git gcc/config/spu/spu-c.c gcc/config/spu/spu-c.c
  index 411496d..9d7aa5a 100644
  --- gcc/config/spu/spu-c.c
  +++ gcc/config/spu/spu-c.c
  @@ -181,7 +181,7 @@ spu_resolve_overloaded_builtin (location_t loc, tree 
  fndecl, void *passed_args)
 return error_mark_node;
   }
   
  -  return build_function_call_vec (loc, match, fnargs, NULL);
  +  return build_function_call_vec (loc, vNULL, match, fnargs, NULL);
   #undef SCALAR_TYPE_P
   }
   
 
   Marek

Jakub


[google gcc-4_8] gcov-tools: minor fix for broken build for arm

2014-01-31 Thread 沈涵
Hi Rong, while building for arm toolchain on chromeos, GCOV_LOCKED is
not defined, which leads to redefinition of cs_all, this is observed
on google/gcc-4_8 branch.

Patch below, tested on chromeos for arm and x86_64 arch.

Ok for google/gcc-4_8 branch?

diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 76f6104..bbce3a6 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -559,10 +559,6 @@ gcov_exit_merge_summary (const struct gcov_info
*gi_ptr, struct gcov_summary *pr
 {
   struct gcov_ctr_summary *cs_prg, *cs_tprg, *cs_all;
   unsigned t_ix;
-#if !GCOV_LOCKED
-  /* summary for all instances of program.  */
-  struct gcov_ctr_summary *cs_all;
-#endif

   /* Merge the summaries.  */
   for (t_ix = 0; t_ix  GCOV_COUNTERS_SUMMABLE; t_ix++)


Han


Re: [google gcc-4_8] gcov-tools: minor fix for broken build for arm

2014-01-31 Thread Rong Xu
Thanks for catching this, and the fix.
OK for google branch.

-Rong

On Fri, Jan 31, 2014 at 2:46 PM, Hán Shěn (沈涵) shen...@google.com wrote:
 Hi Rong, while building for arm toolchain on chromeos, GCOV_LOCKED is
 not defined, which leads to redefinition of cs_all, this is observed
 on google/gcc-4_8 branch.

 Patch below, tested on chromeos for arm and x86_64 arch.

 Ok for google/gcc-4_8 branch?

 diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
 index 76f6104..bbce3a6 100644
 --- a/libgcc/libgcov-driver.c
 +++ b/libgcc/libgcov-driver.c
 @@ -559,10 +559,6 @@ gcov_exit_merge_summary (const struct gcov_info
 *gi_ptr, struct gcov_summary *pr
  {
struct gcov_ctr_summary *cs_prg, *cs_tprg, *cs_all;
unsigned t_ix;
 -#if !GCOV_LOCKED
 -  /* summary for all instances of program.  */
 -  struct gcov_ctr_summary *cs_all;
 -#endif

/* Merge the summaries.  */
for (t_ix = 0; t_ix  GCOV_COUNTERS_SUMMABLE; t_ix++)


 Han


Re: [PATCH] Fix broken build on sparc (was Re: [buildbot] r201508: Build failures after pass C++ conversion)

2013-08-07 Thread Eric Botcazou
 I think it's r201508, but in any case, I'm attaching a patch which fixes
 this build error.  Only very lightly tested so far, with configure
 --target=sparc-linux with buildhost x86_64.  Was able to build a cc1
 and step through the changed code in the debugger, though am getting
 cc1: error: no include path in which to search for stdc-predef.h

Looks good, please install if not already done.

-- 
Eric Botcazou


Re: [PATCH] Fix broken build on sparc (was Re: [buildbot] r201508: Build failures after pass C++ conversion)

2013-08-07 Thread David Malcolm
On Wed, 2013-08-07 at 15:25 +0200, Eric Botcazou wrote:
 Looks good, please install if not already done.
Thanks; I've now committed this to trunk as r201569.



[PATCH] Fix broken build on sparc (was Re: [buildbot] r201508: Build failures after pass C++ conversion)

2013-08-06 Thread David Malcolm
On Tue, 2013-08-06 at 14:12 +0200, Jan-Benedict Glaw wrote:
 On Tue, 2013-08-06 14:10:11 +0200, Jan-Benedict Glaw jbg...@lug-owl.de 
 wrote:
  And probably also for sparc{,64}-linux:
  
  g++ -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
  -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
  -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic 
  -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  
  -DHAVE_CONFIG_H -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. 
  -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include  
  -I../../../../gcc/gcc/../libdecnumber 
  -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
  -I../../../../gcc/gcc/../libbacktrace\
  ../../../../gcc/gcc/config/sparc/sparc.c -o sparc.o
  ../../../../gcc/gcc/config/sparc/sparc.c:1043:27: error: expected 
  primary-expression before ‘.’ token
 pass_work_around_errata.pass, /* pass */
 ^
 
 This was wrong, it's probably caused by r201511: Rewrite how
 instances of passes are cloned.

I think it's r201508, but in any case, I'm attaching a patch which fixes
this build error.  Only very lightly tested so far, with configure
--target=sparc-linux with buildhost x86_64.  Was able to build a cc1
and step through the changed code in the debugger, though am getting
cc1: error: no include path in which to search for stdc-predef.h
commit 8abbe9fbce66bdb1b03281fc06bc86707b5b3cf6
Author: David Malcolm dmalc...@redhat.com
Date:   Tue Aug 6 13:32:32 2013 -0400

gcc/
	* config/sparc/sparc.c (insert_pass_work_around_errata): Move
	into...
	(sparc_option_override): ...and port to new C++ pass API.
	* config/sparc/t-sparc (sparc.o): Add dep on CONTEXT_H

diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 66c33f7..7080b33 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3.  If not see
 #include df.h
 #include opts.h
 #include tree-pass.h
+#include context.h
 
 /* Processor costs */
 
@@ -1038,14 +1039,6 @@ make_pass_work_around_errata (gcc::context *ctxt)
   return new pass_work_around_errata (ctxt);
 }
 
-struct register_pass_info insert_pass_work_around_errata =
-{
-  pass_work_around_errata.pass,	/* pass */
-  dbr,/* reference_pass_name */
-  1,	/* ref_pass_instance_number */
-  PASS_POS_INSERT_AFTER			/* po_op */
-};
-
 /* Helpers for TARGET_DEBUG_OPTIONS.  */
 static void
 dump_target_flag_bits (const int flags)
@@ -1495,6 +1488,14 @@ sparc_option_override (void)
  (essentially) final form of the insn stream to work on.
  Registering the pass must be done at start up.  It's convenient to
  do it here.  */
+  opt_pass *errata_pass = make_pass_work_around_errata (g);
+  struct register_pass_info insert_pass_work_around_errata =
+{
+  errata_pass,		/* pass */
+  dbr,			/* reference_pass_name */
+  1,			/* ref_pass_instance_number */
+  PASS_POS_INSERT_AFTER	/* po_op */
+};
   register_pass (insert_pass_work_around_errata);
 }
 
diff --git a/gcc/config/sparc/t-sparc b/gcc/config/sparc/t-sparc
index 664f4a4..62ad3f7 100644
--- a/gcc/config/sparc/t-sparc
+++ b/gcc/config/sparc/t-sparc
@@ -24,7 +24,7 @@ sparc.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(FUNCTION_H) $(EXCEPT_H) $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
   $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TM_P_H) debug.h $(TARGET_H) \
   $(TARGET_DEF_H) $(COMMON_TARGET_H) $(GIMPLE_H) $(TREE_PASS_H) \
-  langhooks.h reload.h $(PARAMS_H) $(DF_H) $(OPTS_H) \
+  langhooks.h reload.h $(PARAMS_H) $(DF_H) $(OPTS_H) $(CONTEXT_H) \
   gt-sparc.h
 
 sparc-c.o: $(srcdir)/config/sparc/sparc-c.c \


[SH] Broken build due to tree.h not being included anymore

2012-07-08 Thread Oleg Endo
Hello,

The recent change that removed the inclusion of tree.h in several places
broke the SH target in one place in sh.md, where stuff from tree.h was
used directly.  I've moved those lines in question into a new function
in sh.c.
Tested with make all-gcc.

OK to install?

Cheers,
Oleg

ChangeLog:

* config/sh/sh.md (*return_i): Move trap_exit attribute check
to ...
* config/sh/sh.c (sh_cfun_trap_exit_p): ... this new function.
* config/sh/sh-protos.h: Declare it.

Index: gcc/config/sh/sh-protos.h
===
--- gcc/config/sh/sh-protos.h	(revision 189359)
+++ gcc/config/sh/sh-protos.h	(working copy)
@@ -106,6 +106,7 @@
 extern bool sh_expand_t_scc (rtx *);
 extern rtx sh_gen_truncate (enum machine_mode, rtx, int);
 extern bool sh_vector_mode_supported_p (enum machine_mode);
+extern bool sh_cfun_trap_exit_p (void);
 #endif /* RTX_CODE */
 
 extern const char *output_jump_label_table (void);
Index: gcc/config/sh/sh.c
===
--- gcc/config/sh/sh.c	(revision 189359)
+++ gcc/config/sh/sh.c	(working copy)
@@ -9309,6 +9309,15 @@
   != NULL_TREE)  TARGET_SH2A);
 }
 
+/* Returns true if the current function has a trap_exit attribute set.  */
+
+bool
+sh_cfun_trap_exit_p (void)
+{
+  return lookup_attribute (trap_exit, DECL_ATTRIBUTES (current_function_decl))
+	 != NULL_TREE;
+}
+
 /* Implement TARGET_CHECK_PCH_TARGET_FLAGS.  */
 
 static const char *
Index: gcc/config/sh/sh.md
===
--- gcc/config/sh/sh.md	(revision 189360)
+++ gcc/config/sh/sh.md	(working copy)
@@ -9442,8 +9442,7 @@
 		 (crtl-args.info.call_cookie
 			 CALL_COOKIE_RET_TRAMP (1)))
 reload_completed
-lookup_attribute (\trap_exit\,
-			DECL_ATTRIBUTES (current_function_decl)) == NULL_TREE
+! sh_cfun_trap_exit_p ()
 {
   if (TARGET_SH2A  (dbr_sequence_length () == 0)
!current_function_interrupt)


Re: [SH] Broken build due to tree.h not being included anymore

2012-07-08 Thread Steven Bosscher
On Sun, Jul 8, 2012 at 5:43 PM, Oleg Endo oleg.e...@t-online.de wrote:
 Hello,

 The recent change that removed the inclusion of tree.h in several places
 broke the SH target in one place in sh.md, where stuff from tree.h was
 used directly.  I've moved those lines in question into a new function
 in sh.c.

I suppose some breakage was to be expected. I tried auditing all .md
files for usages of things defined in tree.h but I overlooked this
one. Sorry!

 Tested with make all-gcc.

 OK to install?

I can't approve it, but it looks obvious enough.

Ciao!
Steven


Re: [SH] Broken build due to tree.h not being included anymore

2012-07-08 Thread Kaz Kojima
Oleg Endo oleg.e...@t-online.de wrote:
 The recent change that removed the inclusion of tree.h in several places
 broke the SH target in one place in sh.md, where stuff from tree.h was
 used directly.  I've moved those lines in question into a new function
 in sh.c.
 Tested with make all-gcc.
 
 OK to install?

OK.

Regards,
kaz


Re: [SH] Broken build due to tree.h not being included anymore

2012-07-08 Thread Oleg Endo
On Sun, 2012-07-08 at 20:51 +0200, Steven Bosscher wrote:
 On Sun, Jul 8, 2012 at 5:43 PM, Oleg Endo oleg.e...@t-online.de wrote:
  Hello,
 
  The recent change that removed the inclusion of tree.h in several places
  broke the SH target in one place in sh.md, where stuff from tree.h was
  used directly.  I've moved those lines in question into a new function
  in sh.c.
 
 I suppose some breakage was to be expected. I tried auditing all .md
 files for usages of things defined in tree.h but I overlooked this
 one. Sorry!
 

No problem.  Committed as rev 189362.

Cheers,
Oleg