[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-08-23 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

Xi Ruoyao  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #12 from Xi Ruoyao  ---
Fixed.  If we need a ticket for Go support open a new one.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-08-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #11 from CVS Commits  ---
The master branch has been updated by LuluCheng :

https://gcc.gnu.org/g:4beacf3cb8d128b3b9c8c2d3824693b895414428

commit r14-3405-g4beacf3cb8d128b3b9c8c2d3824693b895414428
Author: Lulu Cheng 
Date:   Tue Aug 22 19:56:21 2023 +0800

libffi: Backport of LoongArch support for libffi.

This is a backport of ,
and contains modifications to commit 5a4774cd4d, as well as the LoongArch
schema portion of commit ee22ecbd11. This is needed for libgo.

libffi/ChangeLog:

PR libffi/108682
* configure.host: Add LoongArch support.
* Makefile.am: Likewise.
* Makefile.in: Regenerate.
* src/loongarch64/ffi.c: New file.
* src/loongarch64/ffitarget.h: New file.
* src/loongarch64/sysv.S: New file.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-24 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #10 from Xi Ruoyao  ---
(In reply to Ian Lance Taylor from comment #9)
> If you really want to you can port the LoongArch changes back to 1.18.  I
> don't think that would be too hard--it's mostly a matter of adding build
> tags in various places.  But it's up to you.

I'd wait for the next update.  People can use the Google Go compiler for now
anyway.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-23 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #9 from Ian Lance Taylor  ---
If you really want to you can port the LoongArch changes back to 1.18.  I don't
think that would be too hard--it's mostly a matter of adding build tags in
various places.  But it's up to you.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-23 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #8 from Xi Ruoyao  ---
(In reply to Ian Lance Taylor from comment #6)
> libgo is running behind right now, but in any case I personally don't have
> plans to add LoongARCH support.  I would be happy to review any patches,
> which would ideally be sent using the process described at
> https://go.dev/doc/gccgo_contribute.

The Go runtime already contains LoongArch support since 1.19 release.  I (and
Xuerui, and some Loongson employees) can help for integrating it with gccgo,
but I guess we cannot do a thing until libgo is updated to use Go runtime >=
1.19.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-22 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #7 from Ian Lance Taylor  ---
To be clear, I will at some point update libgo to newer Go releases, yes.  I'm
working on adding generics support to the frontend.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-22 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #6 from Ian Lance Taylor  ---
libgo is running behind right now, but in any case I personally don't have
plans to add LoongARCH support.  I would be happy to review any patches, which
would ideally be sent using the process described at
https://go.dev/doc/gccgo_contribute.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-05-22 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

Xi Ruoyao  changed:

   What|Removed |Added

 CC||ian at airs dot com

--- Comment #5 from Xi Ruoyao  ---
Ian: is there any plan to update libgo?

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-03-03 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #4 from Xi Ruoyao  ---
(In reply to Andreas Schwab from comment #3)
> libgo/goarch.sh is missing LoongArch support.

We ship a go 1.18 runtime but LoongArch support was added in 1.19.  Updating go
runtime in stage 3 is definitely not possible.

Defer to GCC 14.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-03-03 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #3 from Andreas Schwab  ---
libgo/goarch.sh is missing LoongArch support.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-03-02 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #2 from Xi Ruoyao  ---
I applied the LoongArch port patch (upstream PR 678, config.guess and
config.sub changes stripped and Makefile.am conflict resolved manually) and use
autogen.sh to regenerate the build system.  But libgo build still fails with:

libtool: compile:  /home/xry111/git-repos/gcc-build/./gcc/gccgo
-B/home/xry111/git-repos/gcc-build/./gcc/
-B/home/xry111/gcc-trunk/loongarch64-unknown-linux-gnu/bin/
-B/home/xry111/gcc-trunk/loongarch64-unknown-linux-gnu/lib/ -isystem
/home/xry111/gcc-trunk/loongarch64-unknown-linux-gnu/include -isystem
/home/xry111/gcc-trunk/loongarch64-unknown-linux-gnu/sys-include -O2 -g -I . -c
-fgo-pkgpath=internal/goarch ../../../gcc/libgo/go/internal/goarch/goarch.go
zgoarch.go  -fPIC -o internal/.libs/goarch.o
zgoarch.go:7:14: error: expected ‘;’ or ‘)’ or newline
7 |   _BigEndian =
  |  ^
zgoarch.go:7:3: error: reference to undefined name ‘_BigEndian’
7 |   _BigEndian =
  |   ^
../../../gcc/libgo/go/internal/goarch/goarch.go:18:19: error: reference to
undefined name ‘_BigEndian’
   18 | const BigEndian = _BigEndian
  |   ^
../../../gcc/libgo/go/internal/goarch/goarch.go:21:29: error: reference to
undefined name ‘_DefaultPhysPageSize’
   21 | const DefaultPhysPageSize = _DefaultPhysPageSize
  | ^
../../../gcc/libgo/go/internal/goarch/goarch.go:25:19: error: reference to
undefined name ‘_PCQuantum’
   25 | const PCQuantum = _PCQuantum
  |   ^
../../../gcc/libgo/go/internal/goarch/goarch.go:28:20: error: reference to
undefined name ‘_Int64Align’
   28 | const Int64Align = _Int64Align
  |^
../../../gcc/libgo/go/internal/goarch/goarch.go:35:22: error: reference to
undefined name ‘_MinFrameSize’
   35 | const MinFrameSize = _MinFrameSize
  |  ^
../../../gcc/libgo/go/internal/goarch/goarch.go:39:20: error: reference to
undefined name ‘_StackAlign’
   39 | const StackAlign = _StackAlign
  |^

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-03-02 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

--- Comment #1 from Xi Ruoyao  ---
Merging libffi is a big change and not suitable for stage 3 IMO.

Can we can apply the LoongArch patch locally instead?  It will not affect other
targets and even if does not work perfectly on LoongArch we don't lose
anything.

[Bug libffi/108682] libffi needs to merge upstream to get LoongArch support

2023-03-02 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682

Xi Ruoyao  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||xry111 at gcc dot gnu.org
   Last reconfirmed||2023-03-03