Commit 6c054def authored by trasz's avatar trasz
Browse files

New port: devel/gnu-efi

SDK for developing EFI applications for ARM-64, ARM-32, x86_64,
IA-64 (IPF), and IA-32 (x86) platforms using the GNU toolchain
and the EFI development environment.

Sponsored by:	The FreeBSD Foundation
parent 5556231f
......@@ -575,6 +575,7 @@
SUBDIR += gnome-vfs-monikers
SUBDIR += gnome-vfs-reference
SUBDIR += gnome-vfsmm
SUBDIR += gnu-efi
SUBDIR += gnucflow
SUBDIR += gnulib
SUBDIR += gnulibiberty
......
# Created by: Edward Tomasz Napierala <trasz@FreeBSD.org>
# $FreeBSD$
PORTNAME= gnu-efi
PORTVERSION= 3.0w
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gnu-efi
DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
MAINTAINER= trasz@FreeBSD.org
COMMENT= SDK for EFI applications
LICENSE= GPLv2
WRKSRC= ${WRKDIR}/${PORTNAME}-3.0
USES= gmake
USE_GCC= 4.8+
MAKE_JOBS_UNSAFE= yes
CFLAGS+= "-fPIC"
ONLY_FOR_ARCHS= amd64
.include <bsd.port.mk>
SHA256 (gnu-efi_3.0w.orig.tar.gz) = d5c5ca168d25bb54ea936a25175d7626778001f788bddc60dbed103874583621
SIZE (gnu-efi_3.0w.orig.tar.gz) = 172913
--- Make.defaults.orig 2014-08-08 21:27:21.000000000 +0200
+++ Make.defaults 2014-12-01 02:18:02.000000000 +0100
@@ -45,14 +45,17 @@ TOPDIR := $(shell if [ "$$PWD" != "" ];
# Where to install the package. GNU-EFI will create and access
# lib and include under the root
#
-INSTALLROOT := /
+INSTALLROOT := $(DESTDIR)
PREFIX := /usr/local
LIBDIR := $(PREFIX)/lib
INSTALL := install
+LOCALBASE := /usr/local
+CROSS_COMPILE:= $(LOCALBASE)/bin/
+
# Compilation tools
-HOSTCC := $(prefix)gcc
-CC := $(prefix)$(CROSS_COMPILE)gcc
+HOSTCC := $(prefix)gcc48
+CC := $(prefix)$(CROSS_COMPILE)gcc48
AS := $(prefix)$(CROSS_COMPILE)as
LD := $(prefix)$(CROSS_COMPILE)ld
AR := $(prefix)$(CROSS_COMPILE)ar
@@ -98,7 +101,7 @@ ifeq ($(ARCH),x86_64)
&& [ $(GCCMINOR) -ge "7" ] ) ) \
&& echo 1)
ifeq ($(GCCNEWENOUGH),1)
- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+ CPPFLAGS += -fPIC -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
endif
CFLAGS += -mno-red-zone -mno-mmx -mno-sse
@@ -118,8 +121,8 @@ endif
# Generic compilation flags
INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-I$(TOPDIR)/inc/protocol
-CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
+CFLAGS += $(ARCH3264) -O2 -fPIC -Wall -fshort-wchar -fno-strict-aliasing \
-fno-merge-constants -ffreestanding -fno-stack-protector \
-fno-stack-check
ASFLAGS += $(ARCH3264)
-LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings
+LDFLAGS += -nostdlib
--- Makefile.orig 2014-11-30 17:37:32.000000000 +0100
+++ Makefile 2014-11-30 17:37:46.000000000 +0100
@@ -40,7 +40,7 @@ VPATH = $(SRCDIR)
include $(SRCDIR)/Make.defaults
-SUBDIRS = lib gnuefi inc apps
+SUBDIRS = lib gnuefi inc
gnuefi: lib
all: check_gcc $(SUBDIRS)
--- gnuefi/Makefile.orig 2014-08-08 21:33:08.000000000 +0200
+++ gnuefi/Makefile 2014-12-01 02:08:56.000000000 +0100
@@ -47,6 +47,8 @@ FILES = reloc_$(ARCH)
OBJS = $(FILES:%=%.o)
+CFLAGS += -fPIC
+
# on aarch64, avoid jump tables before all relocations have been processed
reloc_aarch64.o: CFLAGS += -fno-jump-tables
@@ -77,9 +79,8 @@ $(LIBDIRINSTALL):
.SECONDEXPANSION:
-$(LIBDIRINSTALL)/%: % | $$(dir $$@)
- $(INSTALL) -m 644 $< $(dir $@)
-
-install: $(addprefix $(LIBDIRINSTALL)/,$(INSTALLTARGETS))
+install: $(INSTALLTARGETS)
+ echo targets $(INSTALLTARGETS)
+ $(INSTALL) -m 644 $(INSTALLTARGETS) $(LIBDIRINSTALL)
include $(SRCDIR)/../Make.rules
--- inc/Makefile.orig 2014-08-08 21:08:55.000000000 +0200
+++ inc/Makefile 2014-11-30 18:26:02.000000000 +0100
@@ -36,6 +36,6 @@ $(INCDIRINSTALL)/protocol/$(ARCH):
$(INCDIRINSTALL)/%.h: %.h | $$(dir $$@)
$(INSTALL) -m 644 $< $(dir $@)
-install: $(addprefix $(INCDIRINSTALL)/,$(HEADERS))
+install: $(INCDIRINSTALL) $(INCDIRINSTALL)/protocol $(INCDIRINSTALL)/$(ARCH) $(INCDIRINSTALL)/protocol/$(ARCH) $(addprefix $(INCDIRINSTALL)/,$(HEADERS))
include $(SRCDIR)/../Make.rules
SDK for developing EFI applications for ARM-64, ARM-32, x86_64,
IA-64 (IPF), and IA-32 (x86) platforms using the GNU toolchain
and the EFI development environment.
WWW: http://gnu-efi.sourceforge.net/
include/efi/efi.h
include/efi/efi_nii.h
include/efi/efi_pxe.h
include/efi/efiapi.h
include/efi/eficon.h
include/efi/efidebug.h
include/efi/efidef.h
include/efi/efidevp.h
include/efi/efierr.h
include/efi/efifs.h
include/efi/efigpt.h
include/efi/efiip.h
include/efi/efilib.h
include/efi/efilink.h
include/efi/efinet.h
include/efi/efipart.h
include/efi/efipciio.h
include/efi/efipoint.h
include/efi/efiprot.h
include/efi/efipxebc.h
include/efi/efirtlib.h
include/efi/efiser.h
include/efi/efishellintf.h
include/efi/efishellparm.h
include/efi/efistdarg.h
include/efi/efitcp.h
include/efi/efiudp.h
include/efi/efiui.h
include/efi/libsmbios.h
include/efi/pci22.h
include/efi/protocol/adapterdebug.h
include/efi/protocol/eficonsplit.h
include/efi/protocol/efidbg.h
include/efi/protocol/efivar.h
include/efi/protocol/intload.h
include/efi/protocol/legacyboot.h
include/efi/protocol/piflash64.h
include/efi/protocol/vgaclass.h
include/efi/romload.h
include/efi/x86_64/efibind.h
include/efi/x86_64/efilibplat.h
include/efi/x86_64/pe.h
lib/crt0-efi-x86_64.o
lib/elf_x86_64_fbsd_efi.lds
lib/libefi.a
lib/libgnuefi.a
@dir include/efi/protocol/x86_64
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment