On 03/07/17 14:23, Richard Earnshaw (lists) wrote:
> The existing code in arm/bpabi.h was quite fragile and relied on matching
> specific CPU and/or architecture names.  The introduction of the option
> format for -mcpu and -march broke that in a way that would be non-trivial
> to fix by updating the list.  The hook in that file was always a pain
> as it required every new CPU being added to be add an update here as well
> (easy to miss).
> 
> I've fixed that problem once and for all by adding a new callback into
> the driver to select the correct BE8 behaviour.  This uses features in
> the ISA capabilities list to select whether or not to use BE8 format
> during linking.
> 
> I also noticed that if the user happened to pass both -mbig-endian and
> -mlittle-endian on the command line then the linker spec rules would
> get somewhat confused and potentially do the wrong thing.  I've fixed that
> by marking these options as opposites in the option descriptions.  The
> driver will now automatically suppress overridden options leading to the
> correct desired behavior.
> 
> Whilst fixing this I noticed a couple of anomolus cases in the
> existing BE8 support: we were not generating BE8 format for ARMv6 or
> ARMv7-R targets.  While the ARMv6 status was probably deliberate at
> the time, this is probably not a good idea in the long term as the
> alternative, BE32, has been deprecated by ARM.  After discussion with
> a couple of colleagues I've decided to change this, but to then add an
> option to restore the existing behaviour at the user's option.  So
> this patch introduces two new options (opposites) -mbe8 and -mbe32.
> 
> This is a quiet behavior change, so I'll add a comment to the release
> notes shortly.
> 

And this is the update to wwwdocs.


Index: htdocs/gcc-8/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v
retrieving revision 1.5
diff -p -r1.5 changes.html
*** htdocs/gcc-8/changes.html	20 Jun 2017 10:19:11 -0000	1.5
--- htdocs/gcc-8/changes.html	30 Jun 2017 15:25:58 -0000
*************** a work-in-progress.</h2>
*** 94,99 ****
--- 94,108 ----
      setting unless the compiler has been configured with an explicit
      <code>--with-fpu</code> option.
    </li>
+   <li>
+     The default link behavior for ARMv6 and ARMv7-R targets has been
+     changed to produce BE8 format when generating big-endian images.  A new
+     flag <code>-mbe32</code> can be used to force the linker to produce
+     legacy BE32 format images.  There is no change of behavior for
+     ARMv6-m and other ARMv7 or later targets: these already defaulted
+     to BE8 format.  This change brings GCC into alignment with other
+     compilers for the ARM architecture.
+   </li>
  </ul>
  
  <!-- <h3 id="avr">AVR</h3> -->

Reply via email to