why do we need xtensa-config.h?

2016-09-06 Thread Oleksij Rempel
Hallo all,

i'm one of ath9k-htc-firmware developers. Currently i'm looking for the
way to provide this firmware as opensource/free package for debian. Main
problem seems to be the need to patch gcc xtensa-config.h to make it
suitable for our CPU.

I have fallowing questions:

do we really need this patch?
https://github.com/qca/open-ath9k-htc-firmware/blob/master/local/patches/gcc.patch

Is it possible or welcome to extend gcc to be configurable without
patching it all the time?
-- 
Regards,
Oleksij



signature.asc
Description: OpenPGP digital signature


gcc-5-20160906 is now available

2016-09-06 Thread gccadmin
Snapshot gcc-5-20160906 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/5-20160906/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 5 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch 
revision 240017

You'll find:

 gcc-5-20160906.tar.bz2   Complete GCC

  MD5=0e3bd7e9e261b04878479045c0516102
  SHA1=ab6d3d6bb2d9210e5d743ab015a284ca6bffc983

Diffs from 5-20160830 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-5
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.


Re: why do we need xtensa-config.h?

2016-09-06 Thread Thomas Schwinge
Hi!

Neither do I really know anything about Xtensa, nor do I have a lot of
experience in these parts of GCC back ends, but:

On Tue, 6 Sep 2016 20:42:53 +0200, Oleksij Rempel  
wrote:
> i'm one of ath9k-htc-firmware developers. Currently i'm looking for the
> way to provide this firmware as opensource/free package for debian. Main
> problem seems to be the need to patch gcc xtensa-config.h to make it
> suitable for our CPU.
> 
> I have fallowing questions:
> 
> do we really need this patch?
> https://github.com/qca/open-ath9k-htc-firmware/blob/master/local/patches/gcc.patch

That I can't tell.  ;-)

> Is it possible or welcome to extend gcc to be configurable without
> patching it all the time?

Yes, I would think.  The macros modified in the above patch to GCC's
include/xtensa-config.h file look like these ought to be modifiable with
-m* options defined by the Xtensa back end, and you'd then assign
specific defaults to a specific CPU variant, and build GCC (or build a
multilib) for that configuration.

This file include/xtensa-config.h is #included in
gcc/config/xtensa/xtensa.h and libgcc/config/xtensa/crti.S,
libgcc/config/xtensa/crtn.S, libgcc/config/xtensa/lib1funcs.S,
libgcc/config/xtensa/lib2funcs.S, but I have not checked how the macro
definitions are actually used.

In gcc/doc/install.texi I read:

@anchor{xtensa-x-elf}
@heading xtensa*-*-elf
This target is intended for embedded Xtensa systems using the
@samp{newlib} C library.  It uses ELF but does not support shared
objects.  Designed-defined instructions specified via the
Tensilica Instruction Extension (TIE) language are only supported
through inline assembly.

The Xtensa configuration information must be specified prior to
building GCC@.  The @file{include/xtensa-config.h} header
file contains the configuration information.  If you created your
own Xtensa configuration with the Xtensa Processor Generator, the
downloaded files include a customized copy of this header file,
which you can use to replace the default header file.

@html

@end html
@anchor{xtensa-x-linux}
@heading xtensa*-*-linux*
[...]

Hmm.  CCing Sterling Augustine who is listed as the Xtensa CPU Port
Maintainer.


Grüße
 Thomas


signature.asc
Description: PGP signature