[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 4/6] Drop gnulib no-abort.patch
From: |
Robbie Harwood |
Subject: |
Re: [PATCH v8 4/6] Drop gnulib no-abort.patch |
Date: |
Thu, 03 Mar 2022 13:47:29 -0500 |
Glenn Washburn <development@efficientek.com> writes:
> Robbie Harwood <rharwood@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
- [PATCH v8 0/6] Update gnulib version and drop most gnulib patches, Robbie Harwood, 2022/03/02
- [PATCH v8 1/6] Use visual indentation in config.h.in, Robbie Harwood, 2022/03/02
- [PATCH v8 2/6] Where present, ensure config-util.h precedes config.h, Robbie Harwood, 2022/03/02
- [PATCH v8 6/6] Handle warnings introduced by updated gnulib, Robbie Harwood, 2022/03/02
- [PATCH v8 3/6] Drop gnulib fix-base64.patch, Robbie Harwood, 2022/03/02
- [PATCH v8 4/6] Drop gnulib no-abort.patch, Robbie Harwood, 2022/03/02
[PATCH v8 5/6] Update gnulib version and drop most gnulib patches, Robbie Harwood, 2022/03/02
[PATCH v8] Fix various new autotools warnings, Robbie Harwood, 2022/03/04
Re: [PATCH v8 0/6] Update gnulib version and drop most gnulib patches, Glenn Washburn, 2022/03/04