main/efitools: fix build with gcc 14 & enable on riscv64
The gnu-efi
package uses 16-bit w_chart
(using -fshort-wchar
cflag), while efitools
uses 32-bit.
GCC 14 no longer allows implicitly casting between incompatible pointer types, which causes build failed.
The -Wno-error=incompatible-pointer-types
flag also works, but I think -fshort-wchar
is better.
failure log
>>> efitools: Building main/efitools 1.9.2-r9 (using abuild 3.13.0-r3) started Thu, 08 Aug 2024 09:57:55 +0800
>>> efitools: Checking sanity of /home/lindsay/src/aports/master/main/efitools/APKBUILD...
>>> efitools: Analyzing dependencies...
>>> efitools: Installing for build: build-base mount gnu-efi-dev<3.0.17 gnu-efi<3.0.17 openssl-dev>3 perl-file-slurp help2man sbsigntool
(1/7) Installing mount (2.40.2-r0)
(2/7) Installing gnu-efi (3.0.15-r4)
(3/7) Installing gnu-efi-dev (3.0.15-r4)
(4/7) Installing perl-file-slurp (9999.32-r3)
(5/7) Installing help2man (1.49.3-r0)
(6/7) Installing sbsigntool (0.9.5-r2)
(7/7) Installing .makedepends-efitools (20240808.015756)
Executing busybox-1.36.1-r31.trigger
OK: 3394 MiB in 791 packages
>>> efitools: Cleaning up srcdir
>>> efitools: Cleaning up pkgdir
>>> efitools: Cleaning up tmpdir
>>> efitools: Fetching https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/efitools-1.9.2.tar.gz
>>> efitools: Fetching https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/efitools-1.9.2.tar.gz
>>> efitools: Checking sha512sums...
efitools-1.9.2.tar.gz: OK
001-datatypes.patch: OK
002-fix-parallel-make.patch: OK
003-fix-wchar_t.patch: OK
004-typo.patch: OK
005-riscv64.patch: OK
>>> efitools: Unpacking /var/cache/distfiles/efitools-1.9.2.tar.gz...
>>> efitools: 001-datatypes.patch
patching file lib/asn1/oid.h
Hunk #1 succeeded at 10 (offset 2 lines).
>>> efitools: 002-fix-parallel-make.patch
patching file Make.rules
>>> efitools: 003-fix-wchar_t.patch
patching file Make.rules
patching file cert-to-efi-hash-list.c
patching file flash-var.c
patching file hash-to-efi-sig-list.c
patching file sign-efi-sig-list.c
>>> efitools: 004-typo.patch
patching file lib/console.c
>>> efitools: 005-riscv64.patch
patching file Make.rules
make -C lib lib-efi.a
make[1]: Entering directory '/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/lib'
gcc -I/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -Wno-pointer-sign -O2 -g -fpic -Wall -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -c HelloWorld.c -o HelloWorld.o
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=DB/" -keyout DB.key -out DB.crt -days 3650 -nodes -sha256
gcc -I/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -Wno-pointer-sign -O2 -g -fpic -Wall -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c simple_file.c -o simple_file.efi.o
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=PK/" -keyout PK.key -out PK.crt -days 3650 -nodes -sha256
......+........+....+...+......+.........+..+......+....+.....+......+...+.+...+...+..+.+..+.........+...+.............+............+..+.+++++++++++++++++++++++++++++++++++++++*...+.+..+.+.....+.+......+..+...+.......+...+..............+...+............+++++++++++++++++++++++++++++++++++++++*...+.....+.+......+...+..+....+......+...+......+..+...+.........+gcc -I/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -Wno-pointer-sign -O2 -g -fpic -Wall -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c pecoff.c -o pecoff.efi.o
.+...........+.+........+.+...+HelloWorld.c: In function 'efi_main':
HelloWorld.c:12:25: error: initialization of 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
12 | L"HelloWorld",
| ^~~~~~~~~~~~~
HelloWorld.c:12:25: note: (near initialization for '(anonymous)[0]')
HelloWorld.c:13:25: error: initialization of 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
13 | L"",
| ^~~
HelloWorld.c:13:25: note: (near initialization for '(anonymous)[1]')
HelloWorld.c:14:25: error: initialization of 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
14 | L"This file is used to prove you have managed",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HelloWorld.c:14:25: note: (near initialization for '(anonymous)[2]')
HelloWorld.c:15:25: error: initialization of 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
15 | L"To execute an unsigned binary in secure boot mode",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HelloWorld.c:15:25: note: (near initialization for '(anonymous)[3]')
..+.+.....+...+..........+.........+..+make: *** [Make.rules:109: HelloWorld.o] Error 1
.make: *** Waiting for unfinished jobs....
+....+........+..........+.........................+.+.......................+.+...........++++++++++++++++++++..+.+++++++++++++++++++*..+++++++++++++..+.+..+.+..+..+..+.++++++++++++++++++++*...+..+...+...+..+...+.+.+.....+...+.+.....+.....+................+...+..+............+...+...+.+...............+.+.......++.............+.........+...+....+...+.........+..+.................+.......+.........+..+.+.........+.........+............+.....+....+....+......+..+.....+..........+.+..+...+......+..+.........+.......+.+gcc -I/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -Wno-pointer-sign -O2 -g -fpic -Wall -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c guid.c -o guid.efi.o
..+.....+......+......+...+.+......+..+.+.............+........++......++.............+......++.....++
.+....+..+....+..........+.....++........+.+.....+.+......+..............+.++++++++++++.++++++++++++++++++++++++++++*.......+..........+............++.+.....+.+...............+..+.+......+........+...+....+...+++.+..+..+...+.++++++++++++++++++++++++++++.+..+...+..+.+*+...+...+.+.......+......+................++....+......+simple_file.c: In function 'simple_file_open_by_handle':
simple_file.c:31:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
31 | Print(L"Unable to find simple file protocol (%d)\n", efi_status);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
...+...+In file included from simple_file.c:8:
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
simple_file.c:38:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
38 | Print(L"Failed to open drive volume (%d)\n", efi_status);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
...simple_file.c: In function 'simple_file_open':
+...simple_file.c:65:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
65 | Print(L"Unable to generate load path for %s\n", name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
+/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
simple_file.c: In function 'simple_dir_read_all_by_handle':
simple_file.c:90:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
90 | Print(L"Failed to get file info\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
simple_file.c:94:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
94 | Print(L"Not a directory %s\n", name);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
.../usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
+....+..................simple_file.c: In function 'simple_dir_read_all':
.+..+simple_file.c:140:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
140 | Print(L"failed to open file %s: %d\n", name, status);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
simple_file.c: In function 'simple_file_read_all':
simple_file.c:160:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
160 | Print(L"Failed to get file info\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
....+.+simple_file.c:169:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
169 | Print(L"Failed to allocate buffer of size %d\n", *size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
...+............+simple_file.c: In function 'simple_volume_selector':
simple_file.c:237:64: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
237 | if (!name || StrLen(name) == 0 || StrCmp(name, L" ") == 0)
| ^~~~
| |
| int *
/usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
....+..+...+............+.....+simple_file.c: In function 'simple_dir_filter':
.+simple_file.c:338:44: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
338 | if (StrCmp(next->FileName, L".") == 0)
| ^~~~
| |
| int *
/usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
...+simple_file.c:361:44: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
361 | if (StrCmp(next->FileName, L"../") == 0) {
| ^~~~~~
| |
| int *
.../usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
..............+simple_file.c:374:39: error: assignment to 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
374 | (*result)[(*count)++] = L"./";
| ^
.............+............+simple_file.c: In function 'simple_file_selector':
simple_file.c:403:22: error: assignment to 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
403 | name = L"\\";
| ^
..simple_file.c:405:24: error: assignment to 'CHAR16 *' {aka 'short unsigned int *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
405 | filter = L"";
| ^
+.......+simple_file.c:443:38: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
443 | if (StrCmp(selected, L"./") == 0) {
| ^~~~~
| |
| int *
..../usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
...+..simple_file.c:446:45: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
446 | } else if (StrCmp(selected, L"../") == 0) {
| ^~~~~~
| |
| int *
.../usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
+simple_file.c:459:42: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
459 | if (StrCmp(name, L"\\") != 0
| ^~~~~
| |
| int *
./usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
....+.simple_file.c:460:49: error: passing argument 2 of 'StrCmp' from incompatible pointer type [-Wincompatible-pointer-types]
460 | && StrCmp(&name[i], L"..") != 0) {
| ^~~~~
| |
| int *
+/usr/include/efi/efilib.h:308:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
308 | IN CONST CHAR16 *s2
.simple_file.c:472:41: error: passing argument 2 of 'StrCat' from incompatible pointer type [-Wincompatible-pointer-types]
472 | StrCat(newname, L"\\");
| ^~~~~
| |
| int *
...../usr/include/efi/efilib.h:363:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
363 | IN CONST CHAR16 *Src
+.....+simple_file.c:487:41: error: passing argument 2 of 'StrCat' from incompatible pointer type [-Wincompatible-pointer-types]
487 | StrCat(*result, L"\\");
| ^~~~~
| |
| int *
/usr/include/efi/efilib.h:363:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
363 | IN CONST CHAR16 *Src
......+.........+...+...+.............+...+..................++.+....++.........++......++......++
.+.+..+...+......+++++++.+...+..+.++++++++++++++++++++++++++++++*.....+......++.+........+++++++++++++++gcc -I/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/ -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -Wno-pointer-sign -O2 -g -fpic -Wall -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c sha256.c -o sha256.efi.o
++++++++.+..+...+..+..+...+..+++++++++++*.....+.+...+.........+.....+..+....+.........+...+......+..+...+....+make[1]: *** [../Make.rules:112: simple_file.efi.o] Error 1
make[1]: *** Waiting for unfinished jobs....
+.....++.......++..++.++
...........+...+.+...........+...+.......+...+..+......+-----
...+pecoff.c: In function 'pecoff_read_header':
pecoff.c:81:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
81 | Print(L"Unsupported image type\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
.+In file included from pecoff.c:52:
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
pecoff.c:86:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
86 | Print(L"Unsupported image - Relocations have been stripped\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
....................pecoff.c:92:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
92 | Print(L"Only IA32 or X64 images supported\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
..../usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
+pecoff.c:120:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
120 | Print(L"Malformed security header\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
...../usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
............+pecoff.c: In function 'pecoff_image_layout':
pecoff.c:145:31: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
145 | Print(L"Invalid section size\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
./usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
...+pecoff.c: In function 'pecoff_relocate':
......+pecoff.c:178:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
178 | Print(L"pecoff_image_layout: failed to layout image\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
pecoff.c:189:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
189 | Print(L"Image has no relocation entry\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
........+pecoff.c:197:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
197 | Print(L"Reloc table overflows binary %d %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
pecoff.c:210:31: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
210 | Print(L"Reloc entry overflows binary\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
.+pecoff.c:216:31: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
216 | Print(L"Invalid fixupbase\n");
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
......+pecoff.c:265:39: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
265 | Print(L"Unknown relocation\n");
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
....................+pecoff.c: In function 'pecoff_check_mok':
.......+pecoff.c:314:36: error: passing argument 1 of 'get_variable_attr' from incompatible pointer type -Wincompatible-pointer-types]
314 | status = get_variable_attr(L"MokSBState", &data, &len,
| ^~~~~~~~~~~~~
| |
| int *
In file included from pecoff.c:65:
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:23:27: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
| ~~~~~~~~^~~
pecoff.c:329:34: error: passing argument 1 of 'find_in_variable_esl' from incompatible pointer type [-Wincompatible-pointer-types]
329 | if (find_in_variable_esl(L"dbx", SIG_DB, hash, SHA256_DIGEST_SIZE)
| ^~~~~~
| |
| int *
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:28:30: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen);
| ~~~~~~~~^~~
.....+pecoff.c:334:36: error: passing argument 1 of 'get_variable_attr' from incompatible pointer type [-Wincompatible-pointer-types]
334 | status = get_variable_attr(L"MokList", &data, &len, MOK_OWNER, &attr);
| ^~~~~~~~~~
| |
| int *
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:23:27: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
| ~~~~~~~~^~~
pecoff.c:342:34: error: passing argument 1 of 'find_in_variable_esl' from incompatible pointer type [-Wincompatible-pointer-types]
342 | if (find_in_variable_esl(L"MokList", MOK_OWNER, hash, SHA256_DIGEST_SIZE) == EFI_SUCCESS)
| ^~~~~~~~~~
| |
| int *
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:28:30: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen);
| ~~~~~~~~^~~
...+pecoff.c:346:36: error: passing argument 1 of 'get_variable_attr' from incompatible pointer type [-Wincompatible-pointer-types]
346 | status = get_variable_attr(L"tmpHashList", &data, &len, MOK_OWNER,
| ^~~~~~~~~~~~~~
| |
| int *
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:23:27: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
23 | get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
| ~~~~~~~~^~~
pecoff.c:349:37: error: passing argument 1 of 'find_in_variable_esl' from incompatible pointer type [-Wincompatible-pointer-types]
349 | && find_in_variable_esl(L"tmpHashList", MOK_OWNER, hash,
| ^~~~~~~~~~~~~~
| |
| int *
/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/include/variables.h:28:30: note: expected 'CHAR16 *' {aka 'short unsigned int *'} but argument is of type 'int *'
28 | find_in_variable_esl(CHAR16* var, EFI_GUID owner, UINT8 *key, UINTN keylen);
| ~~~~~~~~^~~
.........+...pecoff.c: In function 'pecoff_execute_image':
.+pecoff.c:402:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
402 | Print(L"Failed to read %s\n", name);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
pecoff.c:406:15: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
406 | Print(L"Read %d bytes from %s\n", DataSize, name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
.....+pecoff.c:409:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
409 | Print(L"Failed to read header\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
pecoff.c:415:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
415 | Print(L"Failed to relocate image\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
....pecoff.c:421:23: error: passing argument 1 of 'Print' from incompatible pointer type [-Wincompatible-pointer-types]
421 | Print(L"Invalid entry point\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| int *
+/usr/include/efi/efilib.h:528:24: note: expected 'const CHAR16 *' {aka 'const short unsigned int *'} but argument is of type 'int *'
528 | IN CONST CHAR16 *fmt,
......+..............+.+..+.................................+......+....+..+.......+...........+make[1]: *** [../Make.rules:112: pecoff.efi.o] Error 1
...................+...+..+.+..+.......+..+....+..+...+.......+...+..+.......+...+........+......++++++
-----
make[1]: Leaving directory '/home/lindsay/src/aports/master/main/efitools/src/efitools-1.9.2/lib'
make: *** [Makefile:46: lib/lib-efi.a] Error 2
>>> ERROR: efitools: build failed
>>> efitools: Uninstalling dependencies...
(1/7) Purging .makedepends-efitools (20240808.015756)
(2/7) Purging mount (2.40.2-r0)
(3/7) Purging gnu-efi-dev (3.0.15-r4)
(4/7) Purging gnu-efi (3.0.15-r4)
(5/7) Purging perl-file-slurp (9999.32-r3)
(6/7) Purging help2man (1.49.3-r0)
(7/7) Purging sbsigntool (0.9.5-r2)
Executing busybox-1.36.1-r31.trigger
OK: 3393 MiB in 784 packages
Edited by Lindsay Zhou