Glenn Washburn <developm...@efficientek.com> writes: > Robbie Harwood <rharw...@redhat.com> wrote: > >> If you have a patch that makes this work, I don't have a problem with >> it. However, I was unable to make that work in practice. > > Can you provide some specifics on what problem you were running in to? > Was it a link issue at build time? platform specific? Did it build > fine, but blew up in testing? Did you try using the linker options I > suggested above?
No, nor am I about to. This is code that I have, that builds, that I'm submitting to grub. If you want a different approach, that's fine - you're welcome to write a patch to do that instead. I have built this bike shed and I *really* do not care what color it is, nor do I appreciate being asked to test other people's proposals for them: you're presumably just as capable of building the code yourself and seeing if something works or doesn't. This is v8 of the series and I'm pretty much done caring about it at this point. 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 # endif /* !_GL_INLINE_HEADER_BEGIN */ /* gnulib doesn't build cleanly with older compilers. */ $ Be well, --Robbie
signature.asc
Description: PGP signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel