On Tue, 10 Jan 2023 18:40:19 +0100, Jeremie Courreges-Anglas wrote:

[...]

> (Note that the two "lazy binding failed" error messages were produced
> with a tweaked ld.so to print the symbol name.)
> 
> Below is the diff I used to work around the breakage on amd64. The last
> part of the diff (lang/gcc/8/patches/patch-gcc_genconditions_c) could be
> committed right away I think. ok?

OK for this one.

> I'm not looking for oks for the rest of the diff, but rather for help in
> understanding and fixing the issue at hand.

I'm still trying to figure out the xonly breakage, but I'll get back to
this asap.

> llvm 15 test material: git branch:
> https://github.com/jcourreges/openbsd-src/tree/llvm15-6 amd64 snaps:
> https://pbuild-amd64.wxcvbn.org/pub/OpenBSD/snapshots/amd64/
> 
> 
> Index: lang/gcc/11/Makefile
> =================================================================== RCS
> file: /home/cvs/ports/lang/gcc/11/Makefile,v retrieving revision 1.16
> diff -u -p -r1.16 Makefile --- lang/gcc/11/Makefile 22 Nov 2022 23:26:10
> -0000 1.16 +++ lang/gcc/11/Makefile 2 Jan 2023 20:22:15 -0000 @@ -11,6
> +11,9 @@ ONLY_FOR_ARCHS = aarch64 alpha amd64 arm ONLY_FOR_ARCHS-ada =
> amd64 i386 mips64 powerpc ONLY_FOR_ARCHS-dlang = aarch64 amd64 arm i386
> powerpc powerpc64
> 
> +# XXX lld 15 can't link internal tools like genpreds +USE_LLD = No +
> DPB_PROPERTIES = parallel
> 
>  V = 11.2.0 @@ -130,7 +133,6 @@ MAKE_ENV += ${EXTRA_ENV}
> # powerpc lld can't link C++ code from gcc, "ld: error:
> relocation # refers to a discarded section:" .data.rel.ro.* or #
> .sdata.DW.ref.__gxx_personality_v0 -USE_LLD = No CONFIGURE_ENV +=
> LDFLAGS="-Wl,--relax" .endif
> 
> Index: lang/gcc/8/Makefile
> ===================================================================
> RCS file: /home/cvs/ports/lang/gcc/8/Makefile,v retrieving revision
> 1.61 diff -u -p -r1.61 Makefile --- lang/gcc/8/Makefile 18 Dec 2022
> 16:19:26 -0000 1.61 +++ lang/gcc/8/Makefile 2 Jan 2023 20:21:46 -0000 @@
> -4,12 +4,8 @@ ONLY_FOR_ARCHS = aarch64 alpha amd64 arm # XXX: sparc64
> ONLY_FOR_ARCHS-ada = amd64 hppa i386 mips64 powerpc
> 
> -# powerpc lld can't link C++ code from gcc, "ld: error:
> relocation -# refers to a discarded section:" .data.rel.ro.* or -#
> .sdata.DW.ref.__gxx_personality_v0 -.if ${MACHINE_ARCH:Mpowerpc} +# XXX
> lld 15 can't link internal tools such as genpreds USE_LLD = No -.endif
> 
>  DPB_PROPERTIES = parallel
> 
> Index: lang/gcc/8/patches/patch-gcc_genconditions_c
> =================================================================== RCS
> file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_genconditions_c,v
> retrieving revision 1.2 diff -u -p -r1.2 patch-gcc_genconditions_c
> --- lang/gcc/8/patches/patch-gcc_genconditions_c 11 Mar 2022 19:28:59
> -0000 1.2 +++ lang/gcc/8/patches/patch-gcc_genconditions_c 2 Jan 2023
> 20:21:11 -0000 @@ -6,7 +6,7 @@ Index: gcc/genconditions.c in a generator
> program. As a defensive measure, don't do so when the\n\ table isn't
> going to have anything in it. */\n\ -#if GCC_VERSION >= 3001\n\ -+#if
> GCC_VERSION >= 3001 && __clang_major__ != 13\n\ ++#if GCC_VERSION >=
> 3001 && !defined(__clang_major__)\n\ \n\ /* Do not allow checking to
> confuse the issue. */\n\ #undef CHECKING_P\n\ @@ -15,7 +15,7 @@ Index:
> gcc/genconditions.c optimizing. */\n\ \n\ -#if GCC_VERSION >= 3001\n\
> -+#if GCC_VERSION >= 3001 && __clang_major__ != 13\n\ ++#if GCC_VERSION
> >= 3001 && !defined(__clang_major__)\n\ static const struct c_test
> insn_conditions[] = {\n");
> 
>     traverse_c_tests (write_one_condition, 0); @@ -24,7 +24,7 @@ Index:
> gcc/genconditions.c " const char *p;\n" " puts (\"(define_conditions
> [\");\n" - "#if GCC_VERSION >= 3001\n" -+ "#if GCC_VERSION >=
> 3001 && __clang_major__ != 13\n" ++ "#if GCC_VERSION >= 3001
> && !defined(__clang_major__)\n" " for (i = 0; i < ARRAY_SIZE
> (insn_conditions); i++)\n" " {\n" " printf (\" (%d \\\"\",
> insn_conditions[i].value);\n"
> 
> 
> -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524
> E7EE
> 
>>> application/pgp-signature attachment

Reply via email to