All of lore.kernel.org
 help / color / mirror / Atom feed
* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
@ 2021-05-01 21:11 Stafford Horne
  2021-05-01 21:11 ` [OpenRISC] [PATCH v2 1/2] or1k: Add mcmodel option to handle large GOTs Stafford Horne
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Stafford Horne @ 2021-05-01 21:11 UTC (permalink / raw)
  To: openrisc

Changes from v1:
 - Added patch to enabled cmodle=large on crtstuff

This series fixes some bugs found when linking large binaries, both in buildroot
and glibc testing.

Stafford Horne (2):
  or1k: Add mcmodel option to handle large GOTs
  or1k: Use cmodel=large when building crtstuff

 gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
 gcc/config/or1k/or1k.c        | 11 +++++++++--
 gcc/config/or1k/or1k.h        |  7 +++++++
 gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
 gcc/doc/invoke.texi           | 12 +++++++++++-
 libgcc/config.host            |  4 ++--
 libgcc/config/or1k/t-crtstuff |  2 ++
 7 files changed, 80 insertions(+), 5 deletions(-)
 create mode 100644 gcc/config/or1k/or1k-opts.h
 create mode 100644 libgcc/config/or1k/t-crtstuff

-- 
2.26.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 1/2] or1k: Add mcmodel option to handle large GOTs
  2021-05-01 21:11 [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Stafford Horne
@ 2021-05-01 21:11 ` Stafford Horne
  2021-05-01 21:11 ` [OpenRISC] [PATCH v2 2/2] or1k: Use cmodel=large when building crtstuff Stafford Horne
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Stafford Horne @ 2021-05-01 21:11 UTC (permalink / raw)
  To: openrisc

When building libgeos we get an error with:

    linux-uclibc/9.3.0/crtbeginS.o: in function `__do_global_dtors_aux':
    crtstuff.c:(.text+0x118): relocation truncated to fit: R_OR1K_GOT16 against symbol `__cxa_finalize' defined in .text section in
    /home/shorne/work/openrisc/3eb9f9d0f6d8274b2d19753c006bd83f7d536e3c/output/host/or1k-buildroot-linux-uclibc/sysroot/lib/libc.so.

This is caused by GOT code having a limit of 64k.  In OpenRISC this
looks to be the only relocation code pattern to be limited to 64k.

This patch allows specifying a new option -mcmodel=large which can be
used to generate 2 more instructions to construct 32-bit addresses for
up to 4G GOTs.

gcc/ChangeLog:

	PR 99783
	* config/or1k/or1k-opts.h: New file.
	* config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc):
	Support generating gotha relocations if -mcmodel=large is
	specified.
	* config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE):
	New macros.
	* config/or1k/or1k.opt (mcmodel=): New option.
	* doc/invoke.text (OpenRISC Options): Document mcmodel.
---
 gcc/config/or1k/or1k-opts.h | 30 ++++++++++++++++++++++++++++++
 gcc/config/or1k/or1k.c      | 11 +++++++++--
 gcc/config/or1k/or1k.h      |  7 +++++++
 gcc/config/or1k/or1k.opt    | 19 +++++++++++++++++++
 gcc/doc/invoke.texi         | 12 +++++++++++-
 5 files changed, 76 insertions(+), 3 deletions(-)
 create mode 100644 gcc/config/or1k/or1k-opts.h

diff --git a/gcc/config/or1k/or1k-opts.h b/gcc/config/or1k/or1k-opts.h
new file mode 100644
index 00000000000..f791b894fdd
--- /dev/null
+++ b/gcc/config/or1k/or1k-opts.h
@@ -0,0 +1,30 @@
+/* Definitions for option handling for OpenRISC.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   Contributed by Stafford Horne.
+
+   This file is part of GCC.
+
+   GCC is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3, or (at your
+   option) any later version.
+
+   GCC is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GCC; see the file COPYING3.  If not see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef GCC_OR1K_OPTS_H
+#define GCC_OR1K_OPTS_H
+
+/* The OpenRISC code generation models available.  */
+enum or1k_cmodel_type {
+  CMODEL_SMALL,
+  CMODEL_LARGE
+};
+
+#endif /* GCC_OR1K_OPTS_H */
diff --git a/gcc/config/or1k/or1k.c b/gcc/config/or1k/or1k.c
index e772a7addea..27d3fa17995 100644
--- a/gcc/config/or1k/or1k.c
+++ b/gcc/config/or1k/or1k.c
@@ -750,7 +750,14 @@ or1k_legitimize_address_1 (rtx x, rtx scratch)
 	    {
 	      base = gen_sym_unspec (base, UNSPEC_GOT);
 	      crtl->uses_pic_offset_table = 1;
-	      t2 = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, base);
+	      if (TARGET_CMODEL_LARGE)
+		{
+	          emit_insn (gen_rtx_SET (t1, gen_rtx_HIGH (Pmode, base)));
+	          emit_insn (gen_add3_insn (t1, t1, pic_offset_table_rtx));
+	          t2 = gen_rtx_LO_SUM (Pmode, t1, base);
+		}
+	      else
+	        t2 = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, base);
 	      t2 = gen_const_mem (Pmode, t2);
 	      emit_insn (gen_rtx_SET (t1, t2));
 	      base = t1;
@@ -1089,7 +1096,7 @@ print_reloc (FILE *stream, rtx x, HOST_WIDE_INT add, reloc_kind kind)
      no special markup.  */
   static const char * const relocs[RKIND_MAX][RTYPE_MAX] = {
     { "lo", "got", "gotofflo", "tpofflo", "gottpofflo", "tlsgdlo" },
-    { "ha", NULL,  "gotoffha", "tpoffha", "gottpoffha", "tlsgdhi" },
+    { "ha", "gotha", "gotoffha", "tpoffha", "gottpoffha", "tlsgdhi" },
   };
   reloc_type type = RTYPE_DIRECT;
 
diff --git a/gcc/config/or1k/or1k.h b/gcc/config/or1k/or1k.h
index fe01ab81ead..669907e7e74 100644
--- a/gcc/config/or1k/or1k.h
+++ b/gcc/config/or1k/or1k.h
@@ -21,6 +21,8 @@
 #ifndef GCC_OR1K_H
 #define GCC_OR1K_H
 
+#include "config/or1k/or1k-opts.h"
+
 /* Names to predefine in the preprocessor for this target machine.  */
 #define TARGET_CPU_CPP_BUILTINS()		\
   do						\
@@ -37,6 +39,11 @@
     }						\
   while (0)
 
+#define TARGET_CMODEL_SMALL \
+  (or1k_code_model == CMODEL_SMALL)
+#define TARGET_CMODEL_LARGE \
+  (or1k_code_model == CMODEL_LARGE)
+
 /* Storage layout.  */
 
 #define DEFAULT_SIGNED_CHAR 1
diff --git a/gcc/config/or1k/or1k.opt b/gcc/config/or1k/or1k.opt
index 6bd0f3eee6d..cc23e3b8856 100644
--- a/gcc/config/or1k/or1k.opt
+++ b/gcc/config/or1k/or1k.opt
@@ -21,6 +21,9 @@
 ; See the GCC internals manual (options.texi) for a description of
 ; this file's format.
 
+HeaderInclude
+config/or1k/or1k-opts.h
+
 mhard-div
 Target RejectNegative InverseMask(SOFT_DIV)
 Enable generation of hardware divide (l.div, l.divu) instructions.  This is the
@@ -63,6 +66,22 @@ When -mhard-float is selected, enables generation of unordered floating point
 compare and set flag (lf.sfun*) instructions.  By default functions from libgcc
 are used to perform unordered floating point compare and set flag operations.
 
+mcmodel=
+Target RejectNegative Joined Enum(or1k_cmodel_type) Var(or1k_code_model) Init(CMODEL_SMALL)
+Specify the code model used for accessing memory addresses.  Specifying large
+enables generating binaries with large global offset tables.  By default the
+value is small.
+
+Enum
+Name(or1k_cmodel_type) Type(enum or1k_cmodel_type)
+Known code model types (for use with the -mcmodel= option):
+
+EnumValue
+Enum(or1k_cmodel_type) String(small) Value(CMODEL_SMALL)
+
+EnumValue
+Enum(or1k_cmodel_type) String(large) Value(CMODEL_LARGE)
+
 mcmov
 Target RejectNegative Mask(CMOV)
 Enable generation of conditional move (l.cmov) instructions.  By default the
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 096cebc8562..63cc4ec97db 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1135,7 +1135,8 @@ Objective-C and Objective-C++ Dialects}.
 @gccoptlist{-mboard=@var{name}  -mnewlib  -mhard-mul  -mhard-div @gol
 -msoft-mul  -msoft-div @gol
 -msoft-float  -mhard-float  -mdouble-float -munordered-float @gol
--mcmov  -mror  -mrori  -msext  -msfimm  -mshftimm}
+-mcmov  -mror  -mrori  -msext  -msfimm  -mshftimm @gol
+-mcmodel=@var{code-model}}
 
 @emph{PDP-11 Options}
 @gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10 @gol
@@ -26406,6 +26407,15 @@ Enable generation of shift with immediate (@code{l.srai}, @code{l.srli},
 @code{l.slli}) instructions.  By default extra instructions will be generated
 to store the immediate to a register first.
 
+ at item -mcmodel=small
+ at opindex mcmodel=small
+Generate OpenRISC code for the small model: The GOT is limited to 64k. This is
+the default model.
+
+ at item -mcmodel=large
+ at opindex mcmodel=large
+Generate OpenRISC code for the large model: The GOT may grow up to 4G in size.
+
 
 @end table
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 2/2] or1k: Use cmodel=large when building crtstuff
  2021-05-01 21:11 [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Stafford Horne
  2021-05-01 21:11 ` [OpenRISC] [PATCH v2 1/2] or1k: Add mcmodel option to handle large GOTs Stafford Horne
@ 2021-05-01 21:11 ` Stafford Horne
  2021-05-03 10:34 ` [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Giulio Benetti
  2021-08-14 21:01 ` Giulio Benetti
  3 siblings, 0 replies; 11+ messages in thread
From: Stafford Horne @ 2021-05-01 21:11 UTC (permalink / raw)
  To: openrisc

When linking gcc runtime objects into large binaries the link may fail
with the below errors.  This will happen even if we are building with
-mcmodel=large.

    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `deregister_tm_clones':
    crtstuff.c:(.text+0x3c): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_deregisterTMCloneTable'
    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `register_tm_clones':
    crtstuff.c:(.text+0xc0): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_registerTMCloneTable'

This patch builds the gcc crtstuff binaries always with the
-mcmodel=large option to ensure they can be linked into large binaries.

libgcc/ChangeLog:

	PR 99783
	* config.host (or1k-*, tmake_file): Add or1k/t-crtstuff.
	* config/or1k/t-crtstuff: New file.
---
 libgcc/config.host            | 4 ++--
 libgcc/config/or1k/t-crtstuff | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
 create mode 100644 libgcc/config/or1k/t-crtstuff

diff --git a/libgcc/config.host b/libgcc/config.host
index f808b61be70..9e40d4560a3 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1119,12 +1119,12 @@ nios2-*-*)
 	extra_parts="$extra_parts crti.o crtn.o"
 	;;
 or1k-*-linux*)
-	tmake_file="$tmake_file or1k/t-or1k"
+	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
 	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
 	md_unwind_header=or1k/linux-unwind.h
 	;;
 or1k-*-*)
-	tmake_file="$tmake_file or1k/t-or1k"
+	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
 	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
 	;;
 pdp11-*-*)
diff --git a/libgcc/config/or1k/t-crtstuff b/libgcc/config/or1k/t-crtstuff
new file mode 100644
index 00000000000..dcae7f3498e
--- /dev/null
+++ b/libgcc/config/or1k/t-crtstuff
@@ -0,0 +1,2 @@
+# Compile crtbeginS.o and crtendS.o with -mcmodel=large
+CRTSTUFF_T_CFLAGS_S += -mcmodel=large
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-05-01 21:11 [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Stafford Horne
  2021-05-01 21:11 ` [OpenRISC] [PATCH v2 1/2] or1k: Add mcmodel option to handle large GOTs Stafford Horne
  2021-05-01 21:11 ` [OpenRISC] [PATCH v2 2/2] or1k: Use cmodel=large when building crtstuff Stafford Horne
@ 2021-05-03 10:34 ` Giulio Benetti
  2021-05-05  6:30   ` Stafford Horne
  2021-08-14 21:01 ` Giulio Benetti
  3 siblings, 1 reply; 11+ messages in thread
From: Giulio Benetti @ 2021-05-03 10:34 UTC (permalink / raw)
  To: openrisc

Hi Stafford, All,

I've backported this patchset for Buildroot to versions:
- 9.3.0
- 10.3.0

Does it make sense to send them? I don't know if those version will have 
minor versions where these backported patches can be applied.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

On 5/1/21 11:11 PM, Stafford Horne wrote:
> Changes from v1:
>   - Added patch to enabled cmodle=large on crtstuff
> 
> This series fixes some bugs found when linking large binaries, both in buildroot
> and glibc testing.
> 
> Stafford Horne (2):
>    or1k: Add mcmodel option to handle large GOTs
>    or1k: Use cmodel=large when building crtstuff
> 
>   gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
>   gcc/config/or1k/or1k.c        | 11 +++++++++--
>   gcc/config/or1k/or1k.h        |  7 +++++++
>   gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
>   gcc/doc/invoke.texi           | 12 +++++++++++-
>   libgcc/config.host            |  4 ++--
>   libgcc/config/or1k/t-crtstuff |  2 ++
>   7 files changed, 80 insertions(+), 5 deletions(-)
>   create mode 100644 gcc/config/or1k/or1k-opts.h
>   create mode 100644 libgcc/config/or1k/t-crtstuff
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-05-03 10:34 ` [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Giulio Benetti
@ 2021-05-05  6:30   ` Stafford Horne
  2021-05-05  7:51     ` Giulio Benetti
  0 siblings, 1 reply; 11+ messages in thread
From: Stafford Horne @ 2021-05-05  6:30 UTC (permalink / raw)
  To: openrisc

On Mon, May 03, 2021 at 12:34:22PM +0200, Giulio Benetti wrote:
> Hi Stafford, All,
> 
> I've backported this patchset for Buildroot to versions:
> - 9.3.0
> - 10.3.0
> 
> Does it make sense to send them? I don't know if those version will have
> minor versions where these backported patches can be applied.

Do you mean for me/you to send the backported GCC patches for GCC or buildroot?

I don't need backported versions of the toolchains and usually work off the
latest release/master.  If someone wants them let me know.

-Stafford

> Best regards
> -- 
> Giulio Benetti
> Benetti Engineering sas
> 
> On 5/1/21 11:11 PM, Stafford Horne wrote:
> > Changes from v1:
> >   - Added patch to enabled cmodle=large on crtstuff
> > 
> > This series fixes some bugs found when linking large binaries, both in buildroot
> > and glibc testing.
> > 
> > Stafford Horne (2):
> >    or1k: Add mcmodel option to handle large GOTs
> >    or1k: Use cmodel=large when building crtstuff
> > 
> >   gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
> >   gcc/config/or1k/or1k.c        | 11 +++++++++--
> >   gcc/config/or1k/or1k.h        |  7 +++++++
> >   gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
> >   gcc/doc/invoke.texi           | 12 +++++++++++-
> >   libgcc/config.host            |  4 ++--
> >   libgcc/config/or1k/t-crtstuff |  2 ++
> >   7 files changed, 80 insertions(+), 5 deletions(-)
> >   create mode 100644 gcc/config/or1k/or1k-opts.h
> >   create mode 100644 libgcc/config/or1k/t-crtstuff
> > 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-05-05  6:30   ` Stafford Horne
@ 2021-05-05  7:51     ` Giulio Benetti
  0 siblings, 0 replies; 11+ messages in thread
From: Giulio Benetti @ 2021-05-05  7:51 UTC (permalink / raw)
  To: openrisc

Hi Stafford, All,

> Il giorno 5 mag 2021, alle ore 08:30, Stafford Horne <shorne@gmail.com> ha scritto:
> 
> On Mon, May 03, 2021 at 12:34:22PM +0200, Giulio Benetti wrote:
>> Hi Stafford, All,
>> 
>> I've backported this patchset for Buildroot to versions:
>> - 9.3.0
>> - 10.3.0
>> 
>> Does it make sense to send them? I don't know if those version will have
>> minor versions where these backported patches can be applied.
> 
> Do you mean for me/you to send the backported GCC patches for GCC or buildroot?
I mean for GCC, I’ve already sent them for buildroot:
https://patchwork.ozlabs.org/project/buildroot/list/?series=241844

> 
> I don't need backported versions of the toolchains and usually work off the
> latest release/master.  If someone wants them let me know.
I was asking to know if newer minor versions of
binutils and gcc will be released. If yes I could
send your back ported patches here in the 2 mailing lists(binutils and gcc ones).

Giulio Benetti

> 
> -Stafford
> 
>> Best regards
>> -- 
>> Giulio Benetti
>> Benetti Engineering sas
>> 
>>> On 5/1/21 11:11 PM, Stafford Horne wrote:
>>> Changes from v1:
>>>  - Added patch to enabled cmodle=large on crtstuff
>>> 
>>> This series fixes some bugs found when linking large binaries, both in buildroot
>>> and glibc testing.
>>> 
>>> Stafford Horne (2):
>>>   or1k: Add mcmodel option to handle large GOTs
>>>   or1k: Use cmodel=large when building crtstuff
>>> 
>>>  gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
>>>  gcc/config/or1k/or1k.c        | 11 +++++++++--
>>>  gcc/config/or1k/or1k.h        |  7 +++++++
>>>  gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
>>>  gcc/doc/invoke.texi           | 12 +++++++++++-
>>>  libgcc/config.host            |  4 ++--
>>>  libgcc/config/or1k/t-crtstuff |  2 ++
>>>  7 files changed, 80 insertions(+), 5 deletions(-)
>>>  create mode 100644 gcc/config/or1k/or1k-opts.h
>>>  create mode 100644 libgcc/config/or1k/t-crtstuff
>>> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librecores.org/pipermail/openrisc/attachments/20210505/2265ec9c/attachment.htm>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-05-01 21:11 [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Stafford Horne
                   ` (2 preceding siblings ...)
  2021-05-03 10:34 ` [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Giulio Benetti
@ 2021-08-14 21:01 ` Giulio Benetti
  2021-08-14 22:03   ` Stafford Horne
  3 siblings, 1 reply; 11+ messages in thread
From: Giulio Benetti @ 2021-08-14 21:01 UTC (permalink / raw)
  To: openrisc

Hi All,

On 5/1/21 11:11 PM, Stafford Horne wrote:
> Changes from v1:
>   - Added patch to enabled cmodle=large on crtstuff
> 
> This series fixes some bugs found when linking large binaries, both in buildroot
> and glibc testing.
> 
> Stafford Horne (2):
>    or1k: Add mcmodel option to handle large GOTs
>    or1k: Use cmodel=large when building crtstuff
> 
>   gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
>   gcc/config/or1k/or1k.c        | 11 +++++++++--
>   gcc/config/or1k/or1k.h        |  7 +++++++
>   gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
>   gcc/doc/invoke.texi           | 12 +++++++++++-
>   libgcc/config.host            |  4 ++--
>   libgcc/config/or1k/t-crtstuff |  2 ++
>   7 files changed, 80 insertions(+), 5 deletions(-)
>   create mode 100644 gcc/config/or1k/or1k-opts.h
>   create mode 100644 libgcc/config/or1k/t-crtstuff
> 

I've tested this patchset and works as expected.
It fixed libgeos build failure in conjunction with:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3de29b048bca6b4aa4235c647b9328e71801b6

Hope this helps to commit it upstream since I still don't see it, or am 
I wrong?

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-08-14 21:01 ` Giulio Benetti
@ 2021-08-14 22:03   ` Stafford Horne
  2021-08-14 22:05     ` Giulio Benetti
  0 siblings, 1 reply; 11+ messages in thread
From: Stafford Horne @ 2021-08-14 22:03 UTC (permalink / raw)
  To: openrisc

On Sat, Aug 14, 2021 at 11:01:16PM +0200, Giulio Benetti wrote:
> Hi All,
> 
> On 5/1/21 11:11 PM, Stafford Horne wrote:
> > Changes from v1:
> >   - Added patch to enabled cmodle=large on crtstuff
> > 
> > This series fixes some bugs found when linking large binaries, both in buildroot
> > and glibc testing.
> > 
> > Stafford Horne (2):
> >    or1k: Add mcmodel option to handle large GOTs
> >    or1k: Use cmodel=large when building crtstuff
> > 
> >   gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
> >   gcc/config/or1k/or1k.c        | 11 +++++++++--
> >   gcc/config/or1k/or1k.h        |  7 +++++++
> >   gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
> >   gcc/doc/invoke.texi           | 12 +++++++++++-
> >   libgcc/config.host            |  4 ++--
> >   libgcc/config/or1k/t-crtstuff |  2 ++
> >   7 files changed, 80 insertions(+), 5 deletions(-)
> >   create mode 100644 gcc/config/or1k/or1k-opts.h
> >   create mode 100644 libgcc/config/or1k/t-crtstuff
> > 
> 
> I've tested this patchset and works as expected.
> It fixed libgeos build failure in conjunction with:
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3de29b048bca6b4aa4235c647b9328e71801b6
> 
> Hope this helps to commit it upstream since I still don't see it, or am I
> wrong?

You are not wrong, I did not push the changed to GCC yet.  I will do soon.

-Stafford

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-08-14 22:03   ` Stafford Horne
@ 2021-08-14 22:05     ` Giulio Benetti
  2021-08-14 22:25       ` Stafford Horne
  0 siblings, 1 reply; 11+ messages in thread
From: Giulio Benetti @ 2021-08-14 22:05 UTC (permalink / raw)
  To: openrisc

On 8/15/21 12:03 AM, Stafford Horne wrote:
> On Sat, Aug 14, 2021 at 11:01:16PM +0200, Giulio Benetti wrote:
>> Hi All,
>>
>> On 5/1/21 11:11 PM, Stafford Horne wrote:
>>> Changes from v1:
>>>    - Added patch to enabled cmodle=large on crtstuff
>>>
>>> This series fixes some bugs found when linking large binaries, both in buildroot
>>> and glibc testing.
>>>
>>> Stafford Horne (2):
>>>     or1k: Add mcmodel option to handle large GOTs
>>>     or1k: Use cmodel=large when building crtstuff
>>>
>>>    gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
>>>    gcc/config/or1k/or1k.c        | 11 +++++++++--
>>>    gcc/config/or1k/or1k.h        |  7 +++++++
>>>    gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
>>>    gcc/doc/invoke.texi           | 12 +++++++++++-
>>>    libgcc/config.host            |  4 ++--
>>>    libgcc/config/or1k/t-crtstuff |  2 ++
>>>    7 files changed, 80 insertions(+), 5 deletions(-)
>>>    create mode 100644 gcc/config/or1k/or1k-opts.h
>>>    create mode 100644 libgcc/config/or1k/t-crtstuff
>>>
>>
>> I've tested this patchset and works as expected.
>> It fixed libgeos build failure in conjunction with:
>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3de29b048bca6b4aa4235c647b9328e71801b6
>>
>> Hope this helps to commit it upstream since I still don't see it, or am I
>> wrong?
> 
> You are not wrong, I did not push the changed to GCC yet.  I will do soon.

Ah ok, you're the maintainer :-) I thought there was someone else who 
needed to push it :-)

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-08-14 22:05     ` Giulio Benetti
@ 2021-08-14 22:25       ` Stafford Horne
  2021-08-14 22:32         ` Giulio Benetti
  0 siblings, 1 reply; 11+ messages in thread
From: Stafford Horne @ 2021-08-14 22:25 UTC (permalink / raw)
  To: openrisc

On Sun, Aug 15, 2021 at 12:05:37AM +0200, Giulio Benetti wrote:
> On 8/15/21 12:03 AM, Stafford Horne wrote:
> > On Sat, Aug 14, 2021 at 11:01:16PM +0200, Giulio Benetti wrote:
> > > Hi All,
> > > 
> > > On 5/1/21 11:11 PM, Stafford Horne wrote:
> > > > Changes from v1:
> > > >    - Added patch to enabled cmodle=large on crtstuff
> > > > 
> > > > This series fixes some bugs found when linking large binaries, both in buildroot
> > > > and glibc testing.
> > > > 
> > > > Stafford Horne (2):
> > > >     or1k: Add mcmodel option to handle large GOTs
> > > >     or1k: Use cmodel=large when building crtstuff
> > > > 
> > > >    gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
> > > >    gcc/config/or1k/or1k.c        | 11 +++++++++--
> > > >    gcc/config/or1k/or1k.h        |  7 +++++++
> > > >    gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
> > > >    gcc/doc/invoke.texi           | 12 +++++++++++-
> > > >    libgcc/config.host            |  4 ++--
> > > >    libgcc/config/or1k/t-crtstuff |  2 ++
> > > >    7 files changed, 80 insertions(+), 5 deletions(-)
> > > >    create mode 100644 gcc/config/or1k/or1k-opts.h
> > > >    create mode 100644 libgcc/config/or1k/t-crtstuff
> > > > 
> > > 
> > > I've tested this patchset and works as expected.
> > > It fixed libgeos build failure in conjunction with:
> > > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3de29b048bca6b4aa4235c647b9328e71801b6
> > > 
> > > Hope this helps to commit it upstream since I still don't see it, or am I
> > > wrong?
> > 
> > You are not wrong, I did not push the changed to GCC yet.  I will do soon.
> 
> Ah ok, you're the maintainer :-) I thought there was someone else who needed
> to push it :-)

Yeah, I pushed it now.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large
  2021-08-14 22:25       ` Stafford Horne
@ 2021-08-14 22:32         ` Giulio Benetti
  0 siblings, 0 replies; 11+ messages in thread
From: Giulio Benetti @ 2021-08-14 22:32 UTC (permalink / raw)
  To: openrisc

On 8/15/21 12:25 AM, Stafford Horne wrote:
> On Sun, Aug 15, 2021 at 12:05:37AM +0200, Giulio Benetti wrote:
>> On 8/15/21 12:03 AM, Stafford Horne wrote:
>>> On Sat, Aug 14, 2021 at 11:01:16PM +0200, Giulio Benetti wrote:
>>>> Hi All,
>>>>
>>>> On 5/1/21 11:11 PM, Stafford Horne wrote:
>>>>> Changes from v1:
>>>>>     - Added patch to enabled cmodle=large on crtstuff
>>>>>
>>>>> This series fixes some bugs found when linking large binaries, both in buildroot
>>>>> and glibc testing.
>>>>>
>>>>> Stafford Horne (2):
>>>>>      or1k: Add mcmodel option to handle large GOTs
>>>>>      or1k: Use cmodel=large when building crtstuff
>>>>>
>>>>>     gcc/config/or1k/or1k-opts.h   | 30 ++++++++++++++++++++++++++++++
>>>>>     gcc/config/or1k/or1k.c        | 11 +++++++++--
>>>>>     gcc/config/or1k/or1k.h        |  7 +++++++
>>>>>     gcc/config/or1k/or1k.opt      | 19 +++++++++++++++++++
>>>>>     gcc/doc/invoke.texi           | 12 +++++++++++-
>>>>>     libgcc/config.host            |  4 ++--
>>>>>     libgcc/config/or1k/t-crtstuff |  2 ++
>>>>>     7 files changed, 80 insertions(+), 5 deletions(-)
>>>>>     create mode 100644 gcc/config/or1k/or1k-opts.h
>>>>>     create mode 100644 libgcc/config/or1k/t-crtstuff
>>>>>
>>>>
>>>> I've tested this patchset and works as expected.
>>>> It fixed libgeos build failure in conjunction with:
>>>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3c3de29b048bca6b4aa4235c647b9328e71801b6
>>>>
>>>> Hope this helps to commit it upstream since I still don't see it, or am I
>>>> wrong?
>>>
>>> You are not wrong, I did not push the changed to GCC yet.  I will do soon.
>>
>> Ah ok, you're the maintainer :-) I thought there was someone else who needed
>> to push it :-)
> 
> Yeah, I pushed it now.

Awesome, just seen now. Buildroot is already Openrisc toolchain bug 
free, only we have to wait for external toolchain to be rebuilt with 
suck patches. So we've got OpenRisc back to life :-).

Thank you!
-- 
Giulio Benetti
Benetti Engineering sas

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-08-14 22:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 21:11 [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Stafford Horne
2021-05-01 21:11 ` [OpenRISC] [PATCH v2 1/2] or1k: Add mcmodel option to handle large GOTs Stafford Horne
2021-05-01 21:11 ` [OpenRISC] [PATCH v2 2/2] or1k: Use cmodel=large when building crtstuff Stafford Horne
2021-05-03 10:34 ` [OpenRISC] [PATCH v2 0/2] OpenRISC support for cmodel=large Giulio Benetti
2021-05-05  6:30   ` Stafford Horne
2021-05-05  7:51     ` Giulio Benetti
2021-08-14 21:01 ` Giulio Benetti
2021-08-14 22:03   ` Stafford Horne
2021-08-14 22:05     ` Giulio Benetti
2021-08-14 22:25       ` Stafford Horne
2021-08-14 22:32         ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.