[OpenRISC] OpenRISC GCC upstream plan
shorne at gmail.com
Mon Jan 1 13:55:46 CET 2018
Last year Richard sent his work on gcc7 for openrisc.
You can find it here:
which includes the additional relocations both for unmodified or1k, as well as
implementing the l.adrp proposal from
Now that gdb and most of the kernel patches are upstream I have started to look
at these. (sorry for the long delay). The improvements are great, but I would
like to discuss upstream plans for GCC.
>From what we know GCC cannot go upstream due to early patches from Matjaz, and
he has not assigned his FSF copyright.
1. Continue to keep Or1k GCC out of upstream.
2. Clean-room rewrite.
3. Determine if Matjaz's contributions can be deem trivial and upstream the
4. Convince Matjaz to do FSF copyright assignment.
## GCC development History ##
>From CVS, SVN and Git history I have been able to track the following:
2001 - [simons, lampret] Initial development on gcc port in CVS
2002-2003 - [phoenix, simons, mohor] development on gcc-3.1 port CVS
2005 - [phoenix] imported gcc-3.4.4 patches stating (major optimizations for
or32 target) SVN 
2009-2010 [Jeremy Bennett, Jungsook] work on gcc 4.2.2 SVN 
- floating point support
- dwarf support
2010-2012 [Jeremy Bennett, Joern Rennecke] work on gcc 4.5.1 SVN 
- nested functions
- support for c++
2012-2015 [pgavin, julius, stekern, bluecmd] work on gcc-4 and gcc-5 
- rename or32 to or1k
- support PIC
- support TLS
- support Atomics
2016-207 [rth] work on gcc7 
- major optimizations and cleanups
- support for tailcalls
- fix delayslot
- new relocations
- phoenix is Matjaz.
- from 2001 to 2005 we have no history, the original import of gcc with
history is Matjaz's in 2005
If anyone has some more input on the history or an old repo copy it would be
>From what I can gather Matjaz did a bit of work on gcc-3, but I cannot really
determine what. The bulk of the work seems to be the initial bootstrap from
Damjan the work from Jeremy's team and the work from 2012 on.
## Option 3 (Derived works) ##
>From previous discussions I have heard that even if we can determine that
Matjaz's code has been removed/overwritten we cannot upstream the work. That
being because all work since his contributions are derived works.
I have a new argument, that his work is not significant. But its hard to
determine if its trivial compared to the main development.
## Option 2 (Rewrite) ##
If we cannot go ahead with the current code base I would like to start a
cleanroom rewrite. I have looked at the code enough to understand current
features but not enough to be influenced if I start writing from scratch.
Since big chucks of the work are independent works can we reuse them in the
rewrite? For example:
- PIC support
- TLS support
- Floating Point
- Tail Call optimization
Anyone want to help?
## Next Steps ##
- Create a toolchain release of Richards 7.x branch (I have rebased on 7.2.0)
- Gather feedback on Upstreaming/rewrite
 ftp://ftp.gwdg.de/pub/misc/opencores/ml-archive/archives/cvs-checkins/0212/maillist.html#00015 - ftp.gwdg.de cvs-checkin mails
 https://opencores.org/websvn,log?repname=or1k&path=%2For1k%2Ftrunk%2Fgcc%2Fgcc-3.4.4%2Fgcc%2Fconfig%2For32%2F&rev=0&isdir=1 - web svn or1k/trunk/gcc/gcc/3.4.4
More information about the OpenRISC