On May 4, 2025, at 03:13, Mark Millard <mark...@yahoo.com> wrote: > On May 4, 2025, at 01:18, Lorenzo Salvadore <develo...@lorenzosalvadore.it> > wrote: > >> On Sunday, May 4th, 2025 at 05:07, Mark Millard <mark...@yahoo.com> wrote: >> >>> >>> >>> FYI: >>> >>> /wrkdirs/usr/ports/lang/gcc15/work/gcc-15.1.0/libgcc/unwind-dw2-fde-dip.c:69:10: >>> error: 'ElfW' redefined [-Werror] >>> 69 | # define ElfW __ElfN >>> | ^~~~ >>> In file included from /usr/include/machine/elf.h:45, >>> from /usr/include/elf.h:37, >>> from >>> /wrkdirs/usr/ports/lang/gcc15/work/gcc-15.1.0/libgcc/unwind-dw2-fde-dip.c:36: >>> /usr/include/sys/elf_generic.h:59:9: note: this is the location of the >>> previous definition >>> 59 | #define ElfW(x) __ElfN(x) >>> | ^~~~ >> >> Hi Mark, >> >> Could you please test the patch below? > > FYI . . . > > I've been using: > > # git -C /usr/ports/ status lang/gcc15-devel/ > On branch main > Your branch is up to date with 'freebsd/main'. > > Untracked files: > (use "git add <file>..." to include in what will be committed) > lang/gcc15-devel/files/patch-libgcc_unwind-dw2-fde-dip.c > > nothing added to commit but untracked files present (use "git add" to track) > > # cat /usr/ports/lang/gcc15-devel/files/patch-libgcc_unwind-dw2-fde-dip.c > --- > /wrkdirs/usr/ports/lang/gcc15-devel/work/gcc-15-20250209/libgcc/unwind-dw2-fde-dip.c.orig > 2025-02-27 22:35:01.497828000 -0800 > +++ > /wrkdirs/usr/ports/lang/gcc15-devel/work/gcc-15-20250209/libgcc/unwind-dw2-fde-dip.c > 2025-02-27 22:37:07.418603000 -0800 > @@ -66,7 +66,6 @@ > #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ > && defined(TARGET_DL_ITERATE_PHDR) \ > && (defined(__DragonFly__) || defined(__FreeBSD__)) > -# define ElfW __ElfN > # define USE_PT_GNU_EH_FRAME > #endif > > for my rare builds of lang/gcc15-devel/ prior to lang/gcc15 > existing. I've used the patch on amd64 as well, even though > it does not get the error. > > For lang/gcc15/ I'm now using: > > # cat /usr/ports/lang/gcc15/files/patch-libgcc_unwind-dw2-fde-dip.c > --- > /wrkdirs/usr/ports/lang/gcc15/work/gcc-15.1.0/libgcc/unwind-dw2-fde-dip.c.orig > 2025-04-25 01:18:04.000000000 -0700 > +++ /wrkdirs/usr/ports/lang/gcc15/work/gcc-15.1.0/libgcc/unwind-dw2-fde-dip.c > 2025-05-03 22:11:41.826654000 -0700 > @@ -66,7 +66,6 @@ > #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ > && defined(TARGET_DL_ITERATE_PHDR) \ > && (defined(__DragonFly__) || defined(__FreeBSD__)) > -# define ElfW __ElfN > # define USE_PT_GNU_EH_FRAME > #endif > > > FreeBSD defines ElfW(x) to translate Linux's convention > to FreeBSD's convention. gcc15 defines ElfW to convert > its convention to FreeBSD's convention. The above take > the point of view that just one of the 2 conversions > should be in use and that leaving the FreeBSD code alone > should be preferred. > > I'll note that the range of things built via lang/gcc15*/ > in my context is small so my use is not all that general > of a test. > > But for building lang/gcc15/ I've done such for the > vintages of main and stable/14 that I happen to have > around. The vintage of releng/14.2 is in process. > ( lang/gcc15 is part of a more general update after a > ports fetch. ) > >> Unfortunately, >> I am overwhelmed with patches testing, I need a bit of help :) > > Okay. > >> Also, could you please check if the issue affects lang/gcc15-devel >> too? > > lang.gcc15-devel has historically failed for aarch64 > without patches in my rare use: thus the patch that > I had previously added into my context. The likes > of: > > https://portsfallout.com/fallout?port=%2Fgcc15-devel&maintainer=&env=&category=&flavor= > > shows such failures for: > > {14[12],134}arm64-{default,quarterly} > main-arm64-default > > when one looks at the logs for those. > > The failures shown for: > > {14[12],134}releng-armv7-{default,quarterly} > main-armv7-default > > are a different issue that happens earlier in the build. > Without that earlier issue, this issue might well show > up as the next problem for armv7 if there is no patch. > > >> Thanks! >> >> Lorenzo Salvadore >> >> --- libgcc/unwind-dw2-fde-dip.c.orig 2025-05-04 08:11:36 UTC >> +++ libgcc/unwind-dw2-fde-dip.c >> @@ -32,7 +32,7 @@ >> >> #include "tconfig.h" >> #include "tsystem.h" >> -#if !defined(inhibit_libc) && !defined(__OpenBSD__) >> +#if !defined(inhibit_libc) && !defined(__OpenBSD__) && !defined(__FreeBSD__) >> #include <elf.h> /* Get DT_CONFIG. */ >> #endif >> #include "coretypes.h" > > I have builds going on aarch64 and amd64. Also, I'll have > to switch machines for armv7 build tests. So, it will be > a while before I test using the above instead of the > patches that I have.
aarch64: [00:18:28] [01] [00:18:24] Finished lang/gcc15 | gcc15-15.1.0: Success amd64: [00:18:24] [12] [00:18:18] Finished lang/gcc15 | gcc15-15.1.0: Success I've not tried the armv7 capable system, given known historical problems with building lang/gcc14+ for armv7 using STANDARD_BOOTSTRAP or the like. === Mark Millard marklmi at yahoo.com