On Fri, Mar 04, 2022 at 11:40:10AM -0600, Glenn Washburn wrote: > On Thu, 03 Mar 2022 13:47:29 -0500 > Robbie Harwood <rharw...@redhat.com> wrote: > > Glenn Washburn <developm...@efficientek.com> writes: > > > Robbie Harwood <rharw...@redhat.com> wrote:
[...] > > For completeness, here's what happens if one just defines to grub_abort > > without further modification: > > > > $ uname -m > > x86_64 > > $ ./bootstrap > > ... > > $ ./configure --enable-grub-mkfont > > ... > > $ make > > ... > > gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -DGRUB_MACHINE_PCBIOS=1 > > -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem > > /usr/lib/gcc/x86_64-linux-gnu/11/include -I../include -I../include > > -DGRUB_FILE=\"lib/gnulib/regex.c\" -I. -I. -I.. -I.. -I../include > > -I../include -I../grub-core/lib/libgcrypt-grub/src/ > > -I../grub-core/lib/posix_wrap -I../grub-core/lib/gnulib > > -I../grub-core/lib/gnulib -D_FILE_OFFSET_BITS=64 -std=gnu99 -Os -m32 -Wall > > -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment > > -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero > > -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit > > -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces > > -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type > > -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs > > -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label > > -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings > > -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls > > -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes > > -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch > > -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla > > -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros > > -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs > > -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -mrtd > > -mregparm=3 -falign-functions=1 -falign-loops=1 -falign-jumps=1 > > -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow > > -Wa,-mx86-used-note=no -msoft-float -fno-dwarf2-cfi-asm > > -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables > > -fno-ident -fno-PIE -fno-pie -fno-stack-protector -Wtrampolines -Werror > > -ffreestanding -fno-builtin -Wno-undef -Wno-sign-compare -Wno-unused > > -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code > > -Wno-conversion -MT lib/gnulib/regexp_module-regex.o -MD -MP -MF > > lib/gnulib/.deps-core/regexp_module-regex.Tpo -c -o > > lib/gnulib/regexp_module-regex.o `test -f 'lib/gnulib/regex.c' || echo > > './'`lib/gnulib/regex.c > > In file included from ../grub-core/lib/gnulib/libc-config.h:36, > > from lib/gnulib/regex.c:23: > > lib/gnulib/regcomp.c: In function ‘regerror’: > > ../config.h:145:19: error: implicit declaration of function ‘grub_abort’; > > did you mean ‘grub_reboot’? [-Werror=implicit-function-declaration] > > 145 | # define abort grub_abort > > | ^~~~~~~~~~ > > lib/gnulib/regcomp.c:509:5: note: in expansion of macro ‘abort’ > > 509 | abort (); > > | ^~~~~ > > ../config.h:145:19: error: nested extern declaration of ‘grub_abort’ > > [-Werror=nested-externs] > > 145 | # define abort grub_abort > > | ^~~~~~~~~~ > > lib/gnulib/regcomp.c:509:5: note: in expansion of macro ‘abort’ > > 509 | abort (); > > | ^~~~~ > > cc1: all warnings being treated as errors > > ... > > $ git diff > > diff --git a/config.h.in b/config.h.in > > index 0fca0597d..8ad4aa0ac 100644 > > --- a/config.h.in > > +++ b/config.h.in > > @@ -142,7 +142,7 @@ typedef __UINT_FAST32_TYPE__ uint_fast32_t; > > * a prototype for abort(), so leave this as a macro that doesn't take > > * arguments. > > */ > > -# define abort __builtin_trap > > +# define abort grub_abort > > Thank you for letting me know what you tried and what was not working. > It turns out the issue was more complicated and different than I was let > on to believe based on the comment above. And while my link solution > could be part of the solution, its not necessary. > > I'll send my changes to this thread shortly, unless you want me to roll > a v9. Thanks for getting this within a hare's breath of the finish line. Glenn, I am OK with improving this but I want to take v8 first to not delay gnulib bump any longer. So, please post your patch(es) when Robbie patches are in (Monday or Tuesday). Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel