public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h
@ 2024-01-01 11:53 Sergey Bugaev
  2024-01-01 11:53 ` [PATCH gcc 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-01-01 11:53 UTC (permalink / raw)
  To: gcc-patches, bug-hurd

Since it's not i386-specific; this makes it possible to reuse it for other
architectures.

Also, add a warning for the case gnu.h is specified before gnu-user.h, which
would cause gnu-user's version of the spec to override gnu's, and not the other
way around as it's intended. The i?86-gnu target currently specifies them in
the right order, but it's easy to accidentally put them in a wrong order.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 gcc/config/gnu.h      | 16 ++++++++++++++++
 gcc/config/i386/gnu.h | 11 -----------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
index 97baea939..89904cd9b 100644
--- a/gcc/config/gnu.h
+++ b/gcc/config/gnu.h
@@ -31,3 +31,19 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 	builtin_assert ("system=unix");		\
 	builtin_assert ("system=posix");	\
     } while (0)
+
+
+#ifndef GNU_USER_TARGET_STARTFILE_SPEC
+# warning This file should be included after gnu-user.h, to override its STARTFILE_SPEC
+#endif
+
+#undef	STARTFILE_SPEC
+#if defined HAVE_LD_PIE
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index e776144f9..60244bfc8 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -24,17 +24,6 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 #undef GNU_USER_DYNAMIC_LINKER
 #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
 
-#undef	STARTFILE_SPEC
-#if defined HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
-   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
-   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
-#endif
-
 #ifdef TARGET_LIBC_PROVIDES_SSP
 
 /* i386 glibc provides __stack_chk_guard in %gs:0x14.  */
-- 
2.43.0


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

* [PATCH gcc 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-01-01 11:53 [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Sergey Bugaev
@ 2024-01-01 11:53 ` Sergey Bugaev
  2024-01-01 11:53 ` [PATCH gcc 3/3] libgcc: Add basic " Sergey Bugaev
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-01-01 11:53 UTC (permalink / raw)
  To: gcc-patches, bug-hurd

Coupled with a corresponding binutils patch, this produces a toolchain that can
sucessfully build working binaries targeting aarch64-gnu.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 gcc/config.gcc                   |  6 +++
 gcc/config/aarch64/aarch64-gnu.h | 68 ++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)
 create mode 100644 gcc/config/aarch64/aarch64-gnu.h

diff --git a/gcc/config.gcc b/gcc/config.gcc
index f0676c830..d8dd127ad 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1263,6 +1263,12 @@ aarch64*-*-linux*)
 	done
 	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	;;
+aarch64*-*-gnu*)
+        tm_file="${tm_file} elfos.h gnu-user.h gnu.h glibc-stdint.h"
+        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-gnu.h"
+        tmake_file="${tmake_file} aarch64/t-aarch64"
+        tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
+	;;
 aarch64*-wrs-vxworks*)
         tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
         tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
diff --git a/gcc/config/aarch64/aarch64-gnu.h b/gcc/config/aarch64/aarch64-gnu.h
new file mode 100644
index 000000000..ee5494034
--- /dev/null
+++ b/gcc/config/aarch64/aarch64-gnu.h
@@ -0,0 +1,68 @@
+/* Definitions for AArch64 running GNU/Hurd.
+   Copyright (C) 2009-2024 Free Software Foundation, Inc.
+
+   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_AARCH64_GNU_H
+#define GCC_AARCH64_GNU_H
+
+#define GNU_USER_DYNAMIC_LINKER "/lib/ld-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
+#define GNU_TARGET_LINK_SPEC  "%{h*}		\
+   %{static:-Bstatic}				\
+   %{shared:-shared}				\
+   %{symbolic:-Bsymbolic}			\
+   %{!static:%{!static-pie:			\
+     %{rdynamic:-export-dynamic}		\
+     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}} \
+   %{static-pie:-Bstatic -pie --no-dynamic-linker -z text} \
+   -X						\
+   %{mbig-endian:-EB} %{mlittle-endian:-EL}     \
+   -maarch64gnu%{mabi=ilp32:32}%{mbig-endian:b}"
+
+
+#define LINK_SPEC GNU_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_SPEC
+
+#define GNU_USER_TARGET_MATHFILE_SPEC \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC   \
+  GNU_USER_TARGET_MATHFILE_SPEC " " \
+  GNU_USER_TARGET_ENDFILE_SPEC
+
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+	GNU_USER_TARGET_OS_CPP_BUILTINS();	\
+    }						\
+  while (0)
+
+#define TARGET_ASM_FILE_END aarch64_file_end_indicate_exec_stack
+
+/* Uninitialized common symbols in non-PIE executables, even with
+   strong definitions in dependent shared libraries, will resolve
+   to COPY relocated symbol in the executable.  See PR65780.  */
+#undef TARGET_BINDS_LOCAL_P
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
+
+/* Define this to be nonzero if static stack checking is supported.  */
+#define STACK_CHECK_STATIC_BUILTIN 1
+
+#endif  /* GCC_AARCH64_GNU_H */
-- 
2.43.0


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

* [PATCH gcc 3/3] libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-01-01 11:53 [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Sergey Bugaev
  2024-01-01 11:53 ` [PATCH gcc 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
@ 2024-01-01 11:53 ` Sergey Bugaev
  2024-01-03  9:49 ` [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Richard Sandiford
  2024-03-23 14:35 ` [PATCH v2 " Sergey Bugaev
  3 siblings, 0 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-01-01 11:53 UTC (permalink / raw)
  To: gcc-patches, bug-hurd

There is currently no unwinding implementation.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 libgcc/config.host                      |  9 +++++++
 libgcc/config/aarch64/gnu-unwind.h      | 36 +++++++++++++++++++++++++
 libgcc/config/aarch64/heap-trampoline.c |  4 +--
 3 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 libgcc/config/aarch64/gnu-unwind.h

diff --git a/libgcc/config.host b/libgcc/config.host
index 54d06978a..c5b4df2c5 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -448,6 +448,15 @@ aarch64*-*-linux*)
 	tmake_file="${tmake_file} t-dfprules"
 	tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
 	;;
+aarch64*-*-gnu*)
+	extra_parts="$extra_parts crtfastmath.o"
+	md_unwind_header=aarch64/gnu-unwind.h
+	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+	tmake_file="${tmake_file} t-dfprules"
+	tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
+	;;
 aarch64*-*-vxworks7*)
 	extra_parts="$extra_parts crtfastmath.o"
 	md_unwind_header=aarch64/aarch64-unwind.h
diff --git a/libgcc/config/aarch64/gnu-unwind.h b/libgcc/config/aarch64/gnu-unwind.h
new file mode 100644
index 000000000..d9e485a18
--- /dev/null
+++ b/libgcc/config/aarch64/gnu-unwind.h
@@ -0,0 +1,36 @@
+/* DWARF2 EH unwinding support for GNU Hurd: aarch64.
+   Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* Always include AArch64 unwinder header file.  */
+#include "config/aarch64/aarch64-unwind.h"
+
+#ifndef inhibit_libc
+
+#include <signal.h>
+
+/*
+ * TODO: support for aarch64 needs to be implemented.
+ */
+
+#endif /* ifndef inhibit_libc */
diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c
index f22233987..6565584c7 100644
--- a/libgcc/config/aarch64/heap-trampoline.c
+++ b/libgcc/config/aarch64/heap-trampoline.c
@@ -23,7 +23,7 @@ void *allocate_trampoline_page (void);
 void __builtin_nested_func_ptr_created (void *chain, void *func, void **dst);
 void __builtin_nested_func_ptr_deleted (void);
 
-#if defined(__gnu_linux__)
+#if defined(__gnu_linux__) || defined(__gnu_hurd__)
 static const uint32_t aarch64_trampoline_insns[] = {
   0xd503245f, /* hint    34 */
   0x580000b1, /* ldr     x17, .+20 */
@@ -76,7 +76,7 @@ allocate_trampoline_page (void)
 {
   void *page;
 
-#if defined(__gnu_linux__)
+#if defined(__gnu_linux__) || defined(__gnu_hurd__)
   page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC,
 	       MAP_ANON | MAP_PRIVATE, 0, 0);
 #elif __APPLE__
-- 
2.43.0


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

* Re: [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h
  2024-01-01 11:53 [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Sergey Bugaev
  2024-01-01 11:53 ` [PATCH gcc 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
  2024-01-01 11:53 ` [PATCH gcc 3/3] libgcc: Add basic " Sergey Bugaev
@ 2024-01-03  9:49 ` Richard Sandiford
  2024-03-20 19:20   ` Thomas Schwinge
  2024-03-23 14:35 ` [PATCH v2 " Sergey Bugaev
  3 siblings, 1 reply; 17+ messages in thread
From: Richard Sandiford @ 2024-01-03  9:49 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: gcc-patches, bug-hurd, thomas

Sergey Bugaev <bugaevc@gmail.com> writes:
> Since it's not i386-specific; this makes it possible to reuse it for other
> architectures.
>
> Also, add a warning for the case gnu.h is specified before gnu-user.h, which
> would cause gnu-user's version of the spec to override gnu's, and not the other
> way around as it's intended. The i?86-gnu target currently specifies them in
> the right order, but it's easy to accidentally put them in a wrong order.
>
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>

The series looks good to me FWIW, but Thomas should have the final say.

Thanks,
Richard

> ---
>  gcc/config/gnu.h      | 16 ++++++++++++++++
>  gcc/config/i386/gnu.h | 11 -----------
>  2 files changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
> index 97baea939..89904cd9b 100644
> --- a/gcc/config/gnu.h
> +++ b/gcc/config/gnu.h
> @@ -31,3 +31,19 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
>  	builtin_assert ("system=unix");		\
>  	builtin_assert ("system=posix");	\
>      } while (0)
> +
> +
> +#ifndef GNU_USER_TARGET_STARTFILE_SPEC
> +# warning This file should be included after gnu-user.h, to override its STARTFILE_SPEC
> +#endif
> +
> +#undef	STARTFILE_SPEC
> +#if defined HAVE_LD_PIE
> +#define STARTFILE_SPEC \
> +  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
> +   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
> +#else
> +#define STARTFILE_SPEC \
> +  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
> +   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
> +#endif
> diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
> index e776144f9..60244bfc8 100644
> --- a/gcc/config/i386/gnu.h
> +++ b/gcc/config/i386/gnu.h
> @@ -24,17 +24,6 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
>  #undef GNU_USER_DYNAMIC_LINKER
>  #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
>  
> -#undef	STARTFILE_SPEC
> -#if defined HAVE_LD_PIE
> -#define STARTFILE_SPEC \
> -  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
> -   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
> -#else
> -#define STARTFILE_SPEC \
> -  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
> -   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
> -#endif
> -
>  #ifdef TARGET_LIBC_PROVIDES_SSP
>  
>  /* i386 glibc provides __stack_chk_guard in %gs:0x14.  */

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

* Re: [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h
  2024-01-03  9:49 ` [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Richard Sandiford
@ 2024-03-20 19:20   ` Thomas Schwinge
  2024-03-23 14:38     ` Sergey Bugaev
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Schwinge @ 2024-03-20 19:20 UTC (permalink / raw)
  To: Richard Sandiford, Sergey Bugaev; +Cc: gcc-patches, bug-hurd

Hi!

On 2024-01-03T09:49:06+0000, Richard Sandiford <richard.sandiford@arm.com> wrote:
> The series looks good to me FWIW, but Thomas should have the final say.

Richard, thanks for your review.

Sergey, great work on aarch64 GNU/Hurd!  (... where these GCC bits
clearly were the less complicated part...)  ;-)

Please re-submit with ChangeLog updates added to the Git commit logs; see
<https://gcc.gnu.org/contribute.html#patches> ->
<https://gcc.gnu.org/codingconventions.html#ChangeLogs>, and/or 'git log'
for guidance.  You may use
'contrib/gcc-changelog/git_check_commit.py --print-changelog' to verify.


Grüße
 Thomas

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

* [PATCH v2 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h
@ 2024-03-23 14:35 ` Sergey Bugaev
  2024-03-23 14:35   ` [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
  2024-03-23 14:35   ` [PATCH v2 3/3] libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
  0 siblings, 2 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-03-23 14:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: bug-hurd, Thomas Schwinge, Richard Sandiford

Since it's not i386-specific; this makes it possible to reuse it for other
architectures.

Also, add a warning for the case gnu.h is specified before gnu-user.h, which
would cause gnu-user's version of the spec to override gnu's, and not the other
way around as it's intended. The i?86-gnu target currently specifies them in
the right order, but it's easy to accidentally put them in a wrong order.

gcc/Changelog:

	* config/i386/gnu.h: Move GNU/Hurd STARTFILE_SPEC from here...
	* config/gnu.h: ...to here.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 gcc/config/gnu.h      | 16 ++++++++++++++++
 gcc/config/i386/gnu.h | 11 -----------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
index ac99f7605..e2a33baf0 100644
--- a/gcc/config/gnu.h
+++ b/gcc/config/gnu.h
@@ -31,3 +31,19 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 	builtin_assert ("system=unix");		\
 	builtin_assert ("system=posix");	\
     } while (0)
+
+
+#ifndef GNU_USER_TARGET_STARTFILE_SPEC
+# warning This file should be included after gnu-user.h, to override its STARTFILE_SPEC
+#endif
+
+#undef	STARTFILE_SPEC
+#if defined HAVE_LD_PIE
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index 3f42714d1..af1d55887 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -24,17 +24,6 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
 #undef GNU_USER_DYNAMIC_LINKER
 #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
 
-#undef	STARTFILE_SPEC
-#if defined HAVE_LD_PIE
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
-   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
-#else
-#define STARTFILE_SPEC \
-  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
-   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
-#endif
-
 #ifdef TARGET_LIBC_PROVIDES_SSP
 
 /* i386 glibc provides __stack_chk_guard in %gs:0x14.  */
-- 
2.44.0


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

* [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-03-23 14:35 ` [PATCH v2 " Sergey Bugaev
@ 2024-03-23 14:35   ` Sergey Bugaev
  2024-04-02 17:26     ` Richard Sandiford
  2024-03-23 14:35   ` [PATCH v2 3/3] libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
  1 sibling, 1 reply; 17+ messages in thread
From: Sergey Bugaev @ 2024-03-23 14:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: bug-hurd, Thomas Schwinge, Richard Sandiford

Coupled with a corresponding binutils patch, this produces a toolchain that can
sucessfully build working binaries targeting aarch64-gnu.

gcc/Changelog:

	* config.gcc: Recognize aarch64*-*-gnu* targets.
	* config/aarch64/aarch64-gnu.h: New file.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 gcc/config.gcc                   |  6 +++
 gcc/config/aarch64/aarch64-gnu.h | 68 ++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)
 create mode 100644 gcc/config/aarch64/aarch64-gnu.h

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 87a5c92b6..9d935164c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1264,6 +1264,12 @@ aarch64*-*-linux*)
 	done
 	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	;;
+aarch64*-*-gnu*)
+        tm_file="${tm_file} elfos.h gnu-user.h gnu.h glibc-stdint.h"
+        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-gnu.h"
+        tmake_file="${tmake_file} aarch64/t-aarch64"
+        tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
+	;;
 aarch64*-wrs-vxworks*)
         tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
         tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
diff --git a/gcc/config/aarch64/aarch64-gnu.h b/gcc/config/aarch64/aarch64-gnu.h
new file mode 100644
index 000000000..ee5494034
--- /dev/null
+++ b/gcc/config/aarch64/aarch64-gnu.h
@@ -0,0 +1,68 @@
+/* Definitions for AArch64 running GNU/Hurd.
+   Copyright (C) 2009-2024 Free Software Foundation, Inc.
+
+   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_AARCH64_GNU_H
+#define GCC_AARCH64_GNU_H
+
+#define GNU_USER_DYNAMIC_LINKER "/lib/ld-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
+#define GNU_TARGET_LINK_SPEC  "%{h*}		\
+   %{static:-Bstatic}				\
+   %{shared:-shared}				\
+   %{symbolic:-Bsymbolic}			\
+   %{!static:%{!static-pie:			\
+     %{rdynamic:-export-dynamic}		\
+     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}} \
+   %{static-pie:-Bstatic -pie --no-dynamic-linker -z text} \
+   -X						\
+   %{mbig-endian:-EB} %{mlittle-endian:-EL}     \
+   -maarch64gnu%{mabi=ilp32:32}%{mbig-endian:b}"
+
+
+#define LINK_SPEC GNU_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_SPEC
+
+#define GNU_USER_TARGET_MATHFILE_SPEC \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC   \
+  GNU_USER_TARGET_MATHFILE_SPEC " " \
+  GNU_USER_TARGET_ENDFILE_SPEC
+
+#define TARGET_OS_CPP_BUILTINS()		\
+  do						\
+    {						\
+	GNU_USER_TARGET_OS_CPP_BUILTINS();	\
+    }						\
+  while (0)
+
+#define TARGET_ASM_FILE_END aarch64_file_end_indicate_exec_stack
+
+/* Uninitialized common symbols in non-PIE executables, even with
+   strong definitions in dependent shared libraries, will resolve
+   to COPY relocated symbol in the executable.  See PR65780.  */
+#undef TARGET_BINDS_LOCAL_P
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
+
+/* Define this to be nonzero if static stack checking is supported.  */
+#define STACK_CHECK_STATIC_BUILTIN 1
+
+#endif  /* GCC_AARCH64_GNU_H */
-- 
2.44.0


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

* [PATCH v2 3/3] libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-03-23 14:35 ` [PATCH v2 " Sergey Bugaev
  2024-03-23 14:35   ` [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
@ 2024-03-23 14:35   ` Sergey Bugaev
  1 sibling, 0 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-03-23 14:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: bug-hurd, Thomas Schwinge, Richard Sandiford

There is currently no unwinding implementation.

libgcc/ChangeLog:

	* config.host: Recognize aarch64*-*-gnu* hosts.
	* config/aarch64/gnu-unwind.h: New file.
	* config/aarch64/heap-trampoline.c
	(allocate_trampoline_page): Support GNU/Hurd.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 libgcc/config.host                      |  9 +++++++
 libgcc/config/aarch64/gnu-unwind.h      | 36 +++++++++++++++++++++++++
 libgcc/config/aarch64/heap-trampoline.c |  4 +--
 3 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 libgcc/config/aarch64/gnu-unwind.h

diff --git a/libgcc/config.host b/libgcc/config.host
index 59a42d3a0..e75a7af64 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -448,6 +448,15 @@ aarch64*-*-linux*)
 	tmake_file="${tmake_file} t-dfprules"
 	tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
 	;;
+aarch64*-*-gnu*)
+	extra_parts="$extra_parts crtfastmath.o"
+	md_unwind_header=aarch64/gnu-unwind.h
+	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+	tmake_file="${tmake_file} t-dfprules"
+	tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
+	;;
 aarch64*-*-vxworks7*)
 	extra_parts="$extra_parts crtfastmath.o"
 	md_unwind_header=aarch64/aarch64-unwind.h
diff --git a/libgcc/config/aarch64/gnu-unwind.h b/libgcc/config/aarch64/gnu-unwind.h
new file mode 100644
index 000000000..d9e485a18
--- /dev/null
+++ b/libgcc/config/aarch64/gnu-unwind.h
@@ -0,0 +1,36 @@
+/* DWARF2 EH unwinding support for GNU Hurd: aarch64.
+   Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+/* Always include AArch64 unwinder header file.  */
+#include "config/aarch64/aarch64-unwind.h"
+
+#ifndef inhibit_libc
+
+#include <signal.h>
+
+/*
+ * TODO: support for aarch64 needs to be implemented.
+ */
+
+#endif /* ifndef inhibit_libc */
diff --git a/libgcc/config/aarch64/heap-trampoline.c b/libgcc/config/aarch64/heap-trampoline.c
index 885df629d..26957a3ee 100644
--- a/libgcc/config/aarch64/heap-trampoline.c
+++ b/libgcc/config/aarch64/heap-trampoline.c
@@ -29,7 +29,7 @@ void *allocate_trampoline_page (void);
 void __gcc_nested_func_ptr_created (void *chain, void *func, void *dst);
 void __gcc_nested_func_ptr_deleted (void);
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__gnu_hurd__)
 static const unsigned char aarch64_trampoline_insns[6][4] = {
   {0x5f, 0x24, 0x03, 0xd5}, /* hint    34 */
   {0xb1, 0x00, 0x00, 0x58}, /* ldr     x17, .+20 */
@@ -82,7 +82,7 @@ allocate_trampoline_page (void)
 {
   void *page;
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__gnu_hurd__)
   page = mmap (0, getpagesize (), PROT_WRITE | PROT_EXEC,
 	       MAP_ANON | MAP_PRIVATE, 0, 0);
 #elif __APPLE__
-- 
2.44.0


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

* Re: [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h
  2024-03-20 19:20   ` Thomas Schwinge
@ 2024-03-23 14:38     ` Sergey Bugaev
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Bugaev @ 2024-03-23 14:38 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: Richard Sandiford, gcc-patches, bug-hurd

On Wed, Mar 20, 2024 at 10:20 PM Thomas Schwinge <tschwinge@baylibre.com> wrote:
> Hi!

Hi Thomas,

> Sergey, great work on aarch64 GNU/Hurd!  (... where these GCC bits
> clearly were the less complicated part...)  ;-)

thanks! (and indeed they were :)

> Please re-submit with ChangeLog updates added to the Git commit logs; see
> <https://gcc.gnu.org/contribute.html#patches> ->
> <https://gcc.gnu.org/codingconventions.html#ChangeLogs>, and/or 'git log'
> for guidance.  You may use
> 'contrib/gcc-changelog/git_check_commit.py --print-changelog' to verify.

Done so, and git_check_commit.py seems happy with my attempt. I
rebased (fixing a trivial merge conflict) and posted v2, please take a
look.

Sergey

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-03-23 14:35   ` [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
@ 2024-04-02 17:26     ` Richard Sandiford
  2024-04-05 12:13       ` Sergey Bugaev
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Sandiford @ 2024-04-02 17:26 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: gcc-patches, bug-hurd, Thomas Schwinge

Sergey Bugaev <bugaevc@gmail.com> writes:
> Coupled with a corresponding binutils patch, this produces a toolchain that can
> sucessfully build working binaries targeting aarch64-gnu.
>
> gcc/Changelog:
>
> 	* config.gcc: Recognize aarch64*-*-gnu* targets.
> 	* config/aarch64/aarch64-gnu.h: New file.
>
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  gcc/config.gcc                   |  6 +++
>  gcc/config/aarch64/aarch64-gnu.h | 68 ++++++++++++++++++++++++++++++++
>  2 files changed, 74 insertions(+)
>  create mode 100644 gcc/config/aarch64/aarch64-gnu.h

I don't know if you're waiting on me, but just in case: this and patch 3
still LGTM if Thomas is OK with them.

Thanks,
Richard

> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 87a5c92b6..9d935164c 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -1264,6 +1264,12 @@ aarch64*-*-linux*)
>  	done
>  	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
>  	;;
> +aarch64*-*-gnu*)
> +        tm_file="${tm_file} elfos.h gnu-user.h gnu.h glibc-stdint.h"
> +        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-gnu.h"
> +        tmake_file="${tmake_file} aarch64/t-aarch64"
> +        tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
> +	;;
>  aarch64*-wrs-vxworks*)
>          tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
>          tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
> diff --git a/gcc/config/aarch64/aarch64-gnu.h b/gcc/config/aarch64/aarch64-gnu.h
> new file mode 100644
> index 000000000..ee5494034
> --- /dev/null
> +++ b/gcc/config/aarch64/aarch64-gnu.h
> @@ -0,0 +1,68 @@
> +/* Definitions for AArch64 running GNU/Hurd.
> +   Copyright (C) 2009-2024 Free Software Foundation, Inc.
> +
> +   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_AARCH64_GNU_H
> +#define GCC_AARCH64_GNU_H
> +
> +#define GNU_USER_DYNAMIC_LINKER "/lib/ld-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
> +
> +#define CPP_SPEC "%{pthread:-D_REENTRANT}"
> +
> +#define GNU_TARGET_LINK_SPEC  "%{h*}		\
> +   %{static:-Bstatic}				\
> +   %{shared:-shared}				\
> +   %{symbolic:-Bsymbolic}			\
> +   %{!static:%{!static-pie:			\
> +     %{rdynamic:-export-dynamic}		\
> +     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}} \
> +   %{static-pie:-Bstatic -pie --no-dynamic-linker -z text} \
> +   -X						\
> +   %{mbig-endian:-EB} %{mlittle-endian:-EL}     \
> +   -maarch64gnu%{mabi=ilp32:32}%{mbig-endian:b}"
> +
> +
> +#define LINK_SPEC GNU_TARGET_LINK_SPEC AARCH64_ERRATA_LINK_SPEC
> +
> +#define GNU_USER_TARGET_MATHFILE_SPEC \
> +  "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}"
> +
> +#undef ENDFILE_SPEC
> +#define ENDFILE_SPEC   \
> +  GNU_USER_TARGET_MATHFILE_SPEC " " \
> +  GNU_USER_TARGET_ENDFILE_SPEC
> +
> +#define TARGET_OS_CPP_BUILTINS()		\
> +  do						\
> +    {						\
> +	GNU_USER_TARGET_OS_CPP_BUILTINS();	\
> +    }						\
> +  while (0)
> +
> +#define TARGET_ASM_FILE_END aarch64_file_end_indicate_exec_stack
> +
> +/* Uninitialized common symbols in non-PIE executables, even with
> +   strong definitions in dependent shared libraries, will resolve
> +   to COPY relocated symbol in the executable.  See PR65780.  */
> +#undef TARGET_BINDS_LOCAL_P
> +#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
> +
> +/* Define this to be nonzero if static stack checking is supported.  */
> +#define STACK_CHECK_STATIC_BUILTIN 1
> +
> +#endif  /* GCC_AARCH64_GNU_H */

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-02 17:26     ` Richard Sandiford
@ 2024-04-05 12:13       ` Sergey Bugaev
  2024-04-09  7:27         ` Thomas Schwinge
  0 siblings, 1 reply; 17+ messages in thread
From: Sergey Bugaev @ 2024-04-05 12:13 UTC (permalink / raw)
  To: richard.sandiford, Thomas Schwinge; +Cc: gcc-patches, bug-hurd

Hello,

On Tue, Apr 2, 2024 at 8:26 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
> I don't know if you're waiting on me, but just in case: this and patch 3
> still LGTM if Thomas is OK with them.

Thanks. Thomas asked me to resubmit with Changelog entries added (but
hasn't pointed out anything else), so this is waiting for him to
confirm that this looks OK now.

Sergey

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-05 12:13       ` Sergey Bugaev
@ 2024-04-09  7:27         ` Thomas Schwinge
  2024-04-09  8:04           ` Sergey Bugaev
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Schwinge @ 2024-04-09  7:27 UTC (permalink / raw)
  To: gcc-patches, Sergey Bugaev; +Cc: bug-hurd, richard.sandiford

Hi!

On 2024-04-05T15:13:33+0300, Sergey Bugaev <bugaevc@gmail.com> wrote:
> On Tue, Apr 2, 2024 at 8:26 PM Richard Sandiford
> <richard.sandiford@arm.com> wrote:
>> I don't know if you're waiting on me, but just in case: this and patch 3
>> still LGTM if Thomas is OK with them.
>
> Thanks. Thomas asked me to resubmit with Changelog entries added (but
> hasn't pointed out anything else), so this is waiting for him to
> confirm that this looks OK now.

Thanks, pushed to trunk branch:

  - commit 532c57f8c3a15b109a46d3e2b14d60a5c40979d5 "Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h"
  - commit 9670a2326333caa8482377c00beb65723b7b4b26 "aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)"
  - commit 46c91665f4bceba19aed56f5bd6e934c548b84ff "libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)"


Grüße
 Thomas

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-09  7:27         ` Thomas Schwinge
@ 2024-04-09  8:04           ` Sergey Bugaev
  2024-04-09 16:24             ` Palmer Dabbelt
  0 siblings, 1 reply; 17+ messages in thread
From: Sergey Bugaev @ 2024-04-09  8:04 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gcc-patches, bug-hurd, richard.sandiford

On Tue, Apr 9, 2024 at 10:27 AM Thomas Schwinge <tschwinge@baylibre.com> wrote:
> Thanks, pushed to trunk branch:
>
>   - commit 532c57f8c3a15b109a46d3e2b14d60a5c40979d5 "Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h"
>   - commit 9670a2326333caa8482377c00beb65723b7b4b26 "aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)"
>   - commit 46c91665f4bceba19aed56f5bd6e934c548b84ff "libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)"

\o/ Thanks a lot!

This will unblock merging the aarch64-gnu glibc port upstream.

I assume the buildbot failure that I just got an email about is
unrelated; it's failing on some RISC-V thing.

Sergey

P.S. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114629

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-09  8:04           ` Sergey Bugaev
@ 2024-04-09 16:24             ` Palmer Dabbelt
  2024-04-09 16:57               ` Sergey Bugaev
  2024-04-10  7:12               ` Regeneration of 'gcc/config/riscv/riscv.opt.urls' (was: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)) Thomas Schwinge
  0 siblings, 2 replies; 17+ messages in thread
From: Palmer Dabbelt @ 2024-04-09 16:24 UTC (permalink / raw)
  To: bugaevc; +Cc: tschwinge, gcc-patches, bug-hurd, richard.sandiford

On Tue, 09 Apr 2024 01:04:34 PDT (-0700), bugaevc@gmail.com wrote:
> On Tue, Apr 9, 2024 at 10:27 AM Thomas Schwinge <tschwinge@baylibre.com> wrote:
>> Thanks, pushed to trunk branch:
>>
>>   - commit 532c57f8c3a15b109a46d3e2b14d60a5c40979d5 "Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h"
>>   - commit 9670a2326333caa8482377c00beb65723b7b4b26 "aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)"
>>   - commit 46c91665f4bceba19aed56f5bd6e934c548b84ff "libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)"
>
> \o/ Thanks a lot!
>
> This will unblock merging the aarch64-gnu glibc port upstream.
>
> I assume the buildbot failure that I just got an email about is
> unrelated; it's failing on some RISC-V thing.

Sorry if I missed something here, do you have a pointer?

>
> Sergey
>
> P.S. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114629

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-09 16:24             ` Palmer Dabbelt
@ 2024-04-09 16:57               ` Sergey Bugaev
  2024-04-10  0:04                 ` Palmer Dabbelt
  2024-04-10  7:12               ` Regeneration of 'gcc/config/riscv/riscv.opt.urls' (was: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)) Thomas Schwinge
  1 sibling, 1 reply; 17+ messages in thread
From: Sergey Bugaev @ 2024-04-09 16:57 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: gcc-patches, bug-hurd

On Tue, Apr 9, 2024 at 7:24 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
> > I assume the buildbot failure that I just got an email about is
> > unrelated; it's failing on some RISC-V thing.
>
> Sorry if I missed something here, do you have a pointer?

The buildbot failure emails reference [0] and [1].

[0]: https://builder.sourceware.org/buildbot/#/builders/269/builds/4216
[1]: https://builder.sourceware.org/buildbot/#/builders/269/builds/4218

 Specifically, the "git diff_1" step seems to be failing with

    diff --git a/gcc/config/riscv/riscv.opt.urls
b/gcc/config/riscv/riscv.opt.urls
    index da31820e234..351f7f0dda2 100644
    --- a/gcc/config/riscv/riscv.opt.urls
    +++ b/gcc/config/riscv/riscv.opt.urls
    @@ -89,3 +89,5 @@ UrlSuffix(gcc/RISC-V-Options.html#index-minline-strncmp)
     minline-strlen
     UrlSuffix(gcc/RISC-V-Options.html#index-minline-strlen)

    +; skipping UrlSuffix for 'mtls-dialect=' due to finding no URLs
    +

I don't know what to make of that, but it seems unrelated to my
aarch64-gnu changes.

Sergey

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

* Re: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)
  2024-04-09 16:57               ` Sergey Bugaev
@ 2024-04-10  0:04                 ` Palmer Dabbelt
  0 siblings, 0 replies; 17+ messages in thread
From: Palmer Dabbelt @ 2024-04-10  0:04 UTC (permalink / raw)
  To: bugaevc; +Cc: gcc-patches, bug-hurd

On Tue, 09 Apr 2024 09:57:11 PDT (-0700), bugaevc@gmail.com wrote:
> On Tue, Apr 9, 2024 at 7:24 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>> > I assume the buildbot failure that I just got an email about is
>> > unrelated; it's failing on some RISC-V thing.
>>
>> Sorry if I missed something here, do you have a pointer?
>
> The buildbot failure emails reference [0] and [1].
>
> [0]: https://builder.sourceware.org/buildbot/#/builders/269/builds/4216
> [1]: https://builder.sourceware.org/buildbot/#/builders/269/builds/4218
>
>  Specifically, the "git diff_1" step seems to be failing with
>
>     diff --git a/gcc/config/riscv/riscv.opt.urls
> b/gcc/config/riscv/riscv.opt.urls
>     index da31820e234..351f7f0dda2 100644
>     --- a/gcc/config/riscv/riscv.opt.urls
>     +++ b/gcc/config/riscv/riscv.opt.urls
>     @@ -89,3 +89,5 @@ UrlSuffix(gcc/RISC-V-Options.html#index-minline-strncmp)
>      minline-strlen
>      UrlSuffix(gcc/RISC-V-Options.html#index-minline-strlen)
>
>     +; skipping UrlSuffix for 'mtls-dialect=' due to finding no URLs
>     +
>
> I don't know what to make of that, but it seems unrelated to my
> aarch64-gnu changes.

I'd never heard of it either, looks like a new thing we're supposed to 
do when toching the options.  I just sent 
<https://inbox.sourceware.org/gcc-patches/20240410000338.3926-1-palmer@rivosinc.com/>, 
I'm sure there's a better way to do it...

>
> Sergey

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

* Regeneration of 'gcc/config/riscv/riscv.opt.urls' (was: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64))
  2024-04-09 16:24             ` Palmer Dabbelt
  2024-04-09 16:57               ` Sergey Bugaev
@ 2024-04-10  7:12               ` Thomas Schwinge
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Schwinge @ 2024-04-10  7:12 UTC (permalink / raw)
  To: Palmer Dabbelt, Sergey Bugaev
  Cc: gcc-patches, bug-hurd, richard.sandiford, Tatsuyuki Ishi

Hi!

On 2024-04-09T09:24:29-0700, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> On Tue, 09 Apr 2024 01:04:34 PDT (-0700), bugaevc@gmail.com wrote:
>> On Tue, Apr 9, 2024 at 10:27 AM Thomas Schwinge <tschwinge@baylibre.com> wrote:
>>> Thanks, pushed to trunk branch:
>>>
>>>   - commit 532c57f8c3a15b109a46d3e2b14d60a5c40979d5 "Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h"
>>>   - commit 9670a2326333caa8482377c00beb65723b7b4b26 "aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)"
>>>   - commit 46c91665f4bceba19aed56f5bd6e934c548b84ff "libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64)"
>>
>> \o/ Thanks a lot!
>>
>> This will unblock merging the aarch64-gnu glibc port upstream.

\o/


>> I assume the buildbot failure that I just got an email about is
>> unrelated; it's failing on some RISC-V thing.
>
> Sorry if I missed something here, do you have a pointer?

<https://inbox.sourceware.org/20240409074850.ED7BD385841C@sourceware.org>
and several more such messages, requesting:

    --- a/gcc/config/riscv/riscv.opt.urls
    +++ b/gcc/config/riscv/riscv.opt.urls
    @@ -89,3 +89,5 @@ UrlSuffix(gcc/RISC-V-Options.html#index-minline-strncmp)
     minline-strlen
     UrlSuffix(gcc/RISC-V-Options.html#index-minline-strlen)
     
    +; skipping UrlSuffix for 'mtls-dialect=' due to finding no URLs
    +

To be fixed by
<https://inbox.sourceware.org/20240409145724.9640-1-ishitatsuyuki@gmail.com>
"Regenerate opt.urls".


Grüße
 Thomas

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

end of thread, other threads:[~2024-04-10  7:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-01 11:53 [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Sergey Bugaev
2024-01-01 11:53 ` [PATCH gcc 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
2024-01-01 11:53 ` [PATCH gcc 3/3] libgcc: Add basic " Sergey Bugaev
2024-01-03  9:49 ` [PATCH gcc 1/3] Move GNU/Hurd startfile spec from config/i386/gnu.h to config/gnu.h Richard Sandiford
2024-03-20 19:20   ` Thomas Schwinge
2024-03-23 14:38     ` Sergey Bugaev
2024-03-23 14:35 ` [PATCH v2 " Sergey Bugaev
2024-03-23 14:35   ` [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev
2024-04-02 17:26     ` Richard Sandiford
2024-04-05 12:13       ` Sergey Bugaev
2024-04-09  7:27         ` Thomas Schwinge
2024-04-09  8:04           ` Sergey Bugaev
2024-04-09 16:24             ` Palmer Dabbelt
2024-04-09 16:57               ` Sergey Bugaev
2024-04-10  0:04                 ` Palmer Dabbelt
2024-04-10  7:12               ` Regeneration of 'gcc/config/riscv/riscv.opt.urls' (was: [PATCH v2 2/3] aarch64: Add support for aarch64-gnu (GNU/Hurd on AArch64)) Thomas Schwinge
2024-03-23 14:35   ` [PATCH v2 3/3] libgcc: Add basic support for aarch64-gnu (GNU/Hurd on AArch64) Sergey Bugaev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).