aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorVinícius Zavam <egypcio@FreeBSD.org>2018-12-19 17:30:22 +0000
committerVinícius Zavam <egypcio@FreeBSD.org>2018-12-19 17:30:22 +0000
commitb3cd746e211c8515a1fba643f3cd98653101cf0e (patch)
tree2faa55d6f5757152bf08cfd1ad1eceeb93498d58 /sysutils
parentf20fc578b3ed3ea13dfb8653d7c8bf43e595de95 (diff)
downloadports-b3cd746e211c8515a1fba643f3cd98653101cf0e.tar.gz
ports-b3cd746e211c8515a1fba643f3cd98653101cf0e.zip
sysutils/shim: introduce new ARCH support (i386)
Makefile bump PORTREVISION; USE_CSTD: gnu89 became gnu99 [0]; files/ *: if ARCH=i386, replaces ARCH with ia32; elf_ia32_efi.lds: sync OUTPUT_FORMAT [1]; MokManager.c: used UINT32 for MokNum. Reported by: pkg-fallout Approved by: araujo (mentor) Differential Revision: https://reviews.freebsd.org/D18572 [0] shim.c:2176:3: error: this decimal constant is unsigned only in ISO C90 [1] patch-elf_x86_64_efi.lds always appended -freebsd as OUTPUT_FORMAT
Notes
Notes: svn path=/head/; revision=487805
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/shim/Makefile4
-rw-r--r--sysutils/shim/files/patch-Cryptlib-Makefile5
-rw-r--r--sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile5
-rw-r--r--sysutils/shim/files/patch-Makefile9
-rw-r--r--sysutils/shim/files/patch-MokManager.c16
-rw-r--r--sysutils/shim/files/patch-elf__ia32__efi.lds8
-rw-r--r--sysutils/shim/files/patch-lib-Makefile5
7 files changed, 44 insertions, 8 deletions
diff --git a/sysutils/shim/Makefile b/sysutils/shim/Makefile
index 6f128883ad3e..bc5905e940bb 100644
--- a/sysutils/shim/Makefile
+++ b/sysutils/shim/Makefile
@@ -3,7 +3,7 @@
PORTNAME= shim
PORTVERSION= 0.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MAINTAINER= egypcio@FreeBSD.org
@@ -16,7 +16,7 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libgnuefi.a:devel/gnu-efi \
bash:shells/bash
USES= compiler gmake shebangfix
-USE_CSTD= gnu89
+USE_CSTD= gnu99
USE_GCC= yes
SHEBANG_FILES= make-certs
diff --git a/sysutils/shim/files/patch-Cryptlib-Makefile b/sysutils/shim/files/patch-Cryptlib-Makefile
index b122c1f410c4..3cf26f99fc0f 100644
--- a/sysutils/shim/files/patch-Cryptlib-Makefile
+++ b/sysutils/shim/files/patch-Cryptlib-Makefile
@@ -1,9 +1,12 @@
--- Cryptlib/Makefile.orig 2015-06-30 18:20:12 UTC
+++ Cryptlib/Makefile
-@@ -1,3 +1,6 @@
+@@ -1,3 +1,9 @@
+ifeq ($(ARCH),amd64)
+ override ARCH = x86_64
+endif
++ifeq ($(ARCH),i386)
++ override ARCH = ia32
++endif
EFI_INCLUDES = -IInclude -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol
diff --git a/sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile b/sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile
index 014d144b7e0c..2531b561148c 100644
--- a/sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile
+++ b/sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile
@@ -1,9 +1,12 @@
--- Cryptlib/OpenSSL/Makefile.orig 2015-06-30 18:20:12 UTC
+++ Cryptlib/OpenSSL/Makefile
-@@ -1,3 +1,6 @@
+@@ -1,3 +1,9 @@
+ifeq ($(ARCH),amd64)
+ override ARCH = x86_64
+endif
++ifeq ($(ARCH),i386)
++ override ARCH = ia32
++endif
EFI_INCLUDES = -I../Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol
diff --git a/sysutils/shim/files/patch-Makefile b/sysutils/shim/files/patch-Makefile
index 5d24524e6869..abb577c07aa8 100644
--- a/sysutils/shim/files/patch-Makefile
+++ b/sysutils/shim/files/patch-Makefile
@@ -7,7 +7,7 @@
ifneq ($(RELEASE),"")
RELEASE="-$(RELEASE)"
endif
-@@ -9,15 +9,20 @@ LD = $(CROSS_COMPILE)ld
+@@ -9,15 +9,23 @@ LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
ARCH = $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
@@ -15,6 +15,9 @@
+ifeq ($(ARCH),amd64)
+ override ARCH := x86_64
+endif
++ifeq ($(ARCH),i386)
++ override ARCH := ia32
++endif
+
OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^.* //g' | cut -f1-2 -d.` \>= 2.24)
@@ -32,7 +35,7 @@
LIB_GCC = $(shell $(CC) -print-libgcc-file-name)
EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC)
-@@ -65,7 +70,7 @@ endif
+@@ -65,7 +73,7 @@ endif
LDFLAGS = --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIB_PATH) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1
@@ -41,7 +44,7 @@
OBJS = shim.o netboot.o cert.o replacements.o version.o
KEYS = shim_cert.h ocsp.* ca.* shim.crt shim.csr shim.p12 shim.pem shim.key shim.cer
SOURCES = shim.c shim.h netboot.c include/PeImage.h include/wincert.h include/console.h replacements.c replacements.h version.c version.h
-@@ -156,9 +161,6 @@ endif
+@@ -156,9 +164,6 @@ endif
-j .note.gnu.build-id \
$(FORMAT) $^ $@.debug
diff --git a/sysutils/shim/files/patch-MokManager.c b/sysutils/shim/files/patch-MokManager.c
new file mode 100644
index 000000000000..316572c76815
--- /dev/null
+++ b/sysutils/shim/files/patch-MokManager.c
@@ -0,0 +1,16 @@
+--- MokManager.c.orig 2015-06-30 18:20:12 UTC
++++ MokManager.c
+@@ -588,11 +588,11 @@ static void show_mok_info (EFI_GUID Type
+
+ static EFI_STATUS list_keys (void *KeyList, UINTN KeyListSize, CHAR16 *title)
+ {
+- INTN MokNum = 0;
++ UINT32 MokNum = 0;
+ MokListNode *keys = NULL;
+ UINT32 key_num = 0;
+ CHAR16 **menu_strings;
+- int i;
++ UINT32 i;
+
+ if (KeyListSize < (sizeof(EFI_SIGNATURE_LIST) +
+ sizeof(EFI_SIGNATURE_DATA))) {
diff --git a/sysutils/shim/files/patch-elf__ia32__efi.lds b/sysutils/shim/files/patch-elf__ia32__efi.lds
new file mode 100644
index 000000000000..68ea0e843a5f
--- /dev/null
+++ b/sysutils/shim/files/patch-elf__ia32__efi.lds
@@ -0,0 +1,8 @@
+--- elf_ia32_efi.lds.orig 2018-12-15 14:43:25 UTC
++++ elf_ia32_efi.lds
+@@ -1,4 +1,4 @@
+-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
++OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd")
+ OUTPUT_ARCH(i386)
+ ENTRY(_start)
+ SECTIONS
diff --git a/sysutils/shim/files/patch-lib-Makefile b/sysutils/shim/files/patch-lib-Makefile
index ae80eca27594..7d0d690cb3bb 100644
--- a/sysutils/shim/files/patch-lib-Makefile
+++ b/sysutils/shim/files/patch-lib-Makefile
@@ -1,9 +1,12 @@
--- lib/Makefile.orig 2015-06-30 18:20:12 UTC
+++ lib/Makefile
-@@ -1,3 +1,7 @@
+@@ -1,3 +1,10 @@
+ifeq ($(ARCH),amd64)
+ override ARCH = x86_64
+endif
++ifeq ($(ARCH),i386)
++ override ARCH = ia32
++endif
+
TARGET = lib.a