From aaf6d267143e11dabe78faa06ab913b4f203ad69 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 29 Oct 2017 12:14:41 -0700 Subject: efivar: move to recipes-bsp Signed-off-by: Armin Kuster --- ...-Add-Wunknown-attributes-when-using-clang.patch | 32 ++++++++++++++ .../efivar/0001-efivar-fix-for-cross-compile.patch | 35 +++++++++++++++ ...Do-not-use-__bswap_constant_-16-32-macros.patch | 37 ++++++++++++++++ .../efivar/0003-efivar-fix-for-cross-compile.patch | 44 +++++++++++++++++++ .../0004-fix-unknow-option-for-gold-linker.patch | 35 +++++++++++++++ .../allow-multi-definitions-for-native.patch | 23 ++++++++++ .../fix-compile-failure-with-host-gcc-4.6.patch | 42 ++++++++++++++++++ .../recipes-bsp/efivar/efivar/musl-strndupa.patch | 17 ++++++++ meta-oe/recipes-bsp/efivar/efivar_0.31.bb | 50 ++++++++++++++++++++++ ...-Add-Wunknown-attributes-when-using-clang.patch | 32 -------------- .../efivar/0001-efivar-fix-for-cross-compile.patch | 35 --------------- ...Do-not-use-__bswap_constant_-16-32-macros.patch | 37 ---------------- .../efivar/0003-efivar-fix-for-cross-compile.patch | 44 ------------------- .../0004-fix-unknow-option-for-gold-linker.patch | 35 --------------- .../allow-multi-definitions-for-native.patch | 23 ---------- .../fix-compile-failure-with-host-gcc-4.6.patch | 42 ------------------ .../efivar/efivar/musl-strndupa.patch | 17 -------- meta-oe/recipes-extended/efivar/efivar_0.31.bb | 50 ---------------------- 18 files changed, 315 insertions(+), 315 deletions(-) create mode 100644 meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch create mode 100644 meta-oe/recipes-bsp/efivar/efivar_0.31.bb delete mode 100644 meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/allow-multi-definitions-for-native.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch delete mode 100644 meta-oe/recipes-extended/efivar/efivar_0.31.bb diff --git a/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch b/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch new file mode 100644 index 0000000000..1b8815e9df --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch @@ -0,0 +1,32 @@ +From 3d43c5efdb632da5d7387dcadce4e87b83929c64 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 24 Aug 2017 15:54:47 -0700 +Subject: [PATCH] efivar-dp.h: Add -Wunknown-attributes when using clang + +change !dp check to a comparision against NULL to silent clang warning +nonnull parameter 'dp' will evaluate to 'true' on first encounter + +Signed-off-by: Khem Raj +--- + src/include/efivar/efivar-dp.h | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +Index: git/src/include/efivar/efivar-dp.h +=================================================================== +--- git.orig/src/include/efivar/efivar-dp.h ++++ git/src/include/efivar/efivar-dp.h +@@ -783,9 +783,14 @@ extern int efidp_append_instance(const_e + * though older or other compilers might just ignore that attribute if they + * don't support it. Ugh. + */ ++#pragma GCC diagnostic push + #if defined(__GNUC__) && __GNUC__ >= 6 + #pragma GCC diagnostic ignored "-Wnonnull-compare" + #endif ++#if defined(__clang__) ++#pragma GCC diagnostic ignored "-Wunknown-attributes" ++#pragma GCC diagnostic ignored "-Wpointer-bool-conversion" ++#endif + + static inline int16_t + __attribute__((__artificial__)) diff --git a/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch new file mode 100644 index 0000000000..6f6ca6475a --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch @@ -0,0 +1,35 @@ +From 9a3c480af653b37e62d1be04d49fe7a60a80168f Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Fri, 25 Sep 2015 18:14:31 +0800 +Subject: [PATCH 1/2] efivar: fix for cross compile + +It builds and calls elf file makeguids to generate a header file which +doesn't work for cross compile. Fix it. + +Signed-off-by: Kai Kang + +Upstream-Status: Pending +Signed-off-by: Hongxu Jia + +--- + src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 5fc7887..1829d22 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,8 +29,8 @@ all : deps $(TARGETS) + ./guid-symbols.c : include/efivar/efivar-guids.h + ./guids.bin : include/efivar/efivar-guids.h + ./names.bin : include/efivar/efivar-guids.h +-include/efivar/efivar-guids.h : makeguids guids.txt +- ./makeguids guids.txt guids.bin names.bin \ ++include/efivar/efivar-guids.h : guids.txt ++ makeguids guids.txt guids.bin names.bin \ + guid-symbols.c include/efivar/efivar-guids.h + + makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT +-- +2.4.3 + diff --git a/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch b/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch new file mode 100644 index 0000000000..73a772186a --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch @@ -0,0 +1,37 @@ +From 98b33d4193998687aa3a78c097f7bd4c393e0c85 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 15 Jul 2017 00:29:42 -0700 +Subject: [PATCH] makeguids: Do not use __bswap_constant_{16|32} macros + +not available on musl + +Signed-off-by: Khem Raj +--- + src/makeguids.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/makeguids.c b/src/makeguids.c +index da2f5f7..daf821a 100644 +--- a/src/makeguids.c ++++ b/src/makeguids.c +@@ -155,13 +155,13 @@ main(int argc, char *argv[]) + #if BYTE_ORDER == BIG_ENDIAN\n\ + #define cpu_to_be32(n) (n)\n\ + #define cpu_to_be16(n) (n)\n\ +-#define cpu_to_le32(n) (__bswap_constant_32(n))\n\ +-#define cpu_to_le16(n) (__bswap_constant_16(n))\n\ ++#define cpu_to_le32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ ++#define cpu_to_le16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ + #else\n\ + #define cpu_to_le32(n) (n)\n\ + #define cpu_to_le16(n) (n)\n\ +-#define cpu_to_be32(n) (__bswap_constant_32(n))\n\ +-#define cpu_to_be16(n) (__bswap_constant_16(n))\n\ ++#define cpu_to_be32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ ++#define cpu_to_be16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ + #endif\n\ + """); + +-- +2.13.3 + diff --git a/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch b/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch new file mode 100644 index 0000000000..3f43f2a93e --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/0003-efivar-fix-for-cross-compile.patch @@ -0,0 +1,44 @@ +From 7ead29ca6bb5e280ae07551cc3521281ecf73682 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Sat, 7 May 2016 02:06:47 -0400 +Subject: [PATCH] Makefile: fix efivar.pc not found + +It fixes efivar.pc not found: +... +| install -d -m 755 efivar/0.23-r0/image/usr/lib/pkgconfig/ +| install -m 644 efivar.pc efivar/0.23-r0/image/usr/lib/pkgconfig/ +; install -m 644 efiboot.pc efivar/0.23-r0/image/usr/lib/pkgconfig/ +; +| install: cannot stat 'efivar.pc': No such file or directory +| install: cannot stat 'efiboot.pc': No such file or directory +| make[1]: *** [install] Error 1 +| make[1]: Leaving directory `efivar/0.23-r0/git/src' +| make: *** [install] Error 2 +| ERROR: oe_runmake failed +... + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + src/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index c7a0ca3..ad9c427 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -78,7 +78,9 @@ install : all + ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x).$(MAJOR_VERSION);\ + ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x); ) + $(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR) +- $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;) ++ $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(TOPDIR)/src/$(x).in $(DESTDIR)$(PCDIR)/$(x) ;\ ++ sed -i -e "s:@@LIBDIR@@:$(libdir):g" -e "s:@@VERSION@@:$(VERSION):g" \ ++ $(DESTDIR)$(PCDIR)/$(x); ) + $(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/efivar + $(foreach x, $(wildcard $(TOPDIR)/src/include/efivar/*.h), $(INSTALL) -m 644 $(x) $(DESTDIR)$(includedir)/efivar/$(notdir $(x));) + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) +-- +2.8.1 + diff --git a/meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch new file mode 100644 index 0000000000..96d0c6b3b2 --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch @@ -0,0 +1,35 @@ +From b3d35e7dd27a755df5acbe050837885914dbb28b Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 10 May 2016 11:34:50 -0400 +Subject: [PATCH] fix unknow option for gold linker + +- Revert the following patch, since oe-core work with gcc 5 +... +commit 3055a3797f16693dfdd855fa68bc57fd900dc408 +Author: Peter Jones +Date: Mon Feb 15 14:15:40 2016 -0500 + + Make gcc.specs work with gcc 6 / binutils 2.26 + + Apparently binutils 2.26 gets real picky about "ld -PIC" vs "ld -fPIC". + + Signed-off-by: Peter Jones +... + +- Remove unknown option '--add-needed' + +Signed-off-by: Hongxu Jia +--- + gcc.specs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/gcc.specs +=================================================================== +--- git.orig/gcc.specs ++++ git/gcc.specs +@@ -14,4 +14,4 @@ + + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} + + *link: +-+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:% +--- +diff --git a/Make.rules b/Make.rules +index d9c0609..874bce0 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version + $(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \ + -Wl,-soname,$@.$(MAJOR_VERSION) \ + -Wl,--version-script=$(MAP) \ ++ -Wl,-z,muldefs \ + -o $@ $^ $(LDLIBS) + + %.o : %.c diff --git a/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch new file mode 100644 index 0000000000..e3fa2e1c1a --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch @@ -0,0 +1,42 @@ +From 1361225abbaba878960f970df39a4570bbc39553 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 26 May 2016 21:50:01 -0400 +Subject: [PATCH] fix compile failure with older host gcc (<=4.6) + +While host gcc version is 4.6.3 in ubuntu 1204, it +did not recognize -std=gnu11 and -Wmaybe-uninitialized. + +While host gcc version is 4.4.7 in centos6, it +did not recognize -std=gnu11, -Wmaybe-uninitialized, +and -flto. + +For native build, use -std=gnu99 to replace -std=gnu11, +and directly remove -Wmaybe-uninitialized and -flto. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + gcc.specs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: git/gcc.specs +=================================================================== +--- git.orig/gcc.specs ++++ git/gcc.specs +@@ -2,13 +2,13 @@ + + -D_GNU_SOURCE + + *efivar_cpp_options: +- -Werror -Wall -std=gnu11 -Wextra ++ -Werror -Wall -std=gnu99 -Wextra + + *cpp_options: + + %(efivar_cpp_options) + + *cc1_options: +-+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} +++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} + + *self_spec: + + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} diff --git a/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch b/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch new file mode 100644 index 0000000000..fc8f8c8b21 --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar/musl-strndupa.patch @@ -0,0 +1,17 @@ +Taken from void linux + +Index: git/src/linux.c +=================================================================== +--- git.orig/src/linux.c ++++ git/src/linux.c +@@ -40,6 +40,10 @@ + #include + #include + ++#if !defined(__GLIBC__) ++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) ++#endif ++ + #include "dp.h" + #include "linux.h" + #include "util.h" diff --git a/meta-oe/recipes-bsp/efivar/efivar_0.31.bb b/meta-oe/recipes-bsp/efivar/efivar_0.31.bb new file mode 100644 index 0000000000..9d4cdc97be --- /dev/null +++ b/meta-oe/recipes-bsp/efivar/efivar_0.31.bb @@ -0,0 +1,50 @@ +SUMMARY = "Tools to manipulate UEFI variables" +DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility" +HOMEPAGE = "https://github.com/rhinstaller/efivar" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393" + +DEPENDS = "popt" +DEPENDS_append_class-target = " efivar-native" + +inherit pkgconfig + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +SRCREV = "11324799c68193116e1dd5f94b416591bd324f90" +SRC_URI = "git://github.com/rhinstaller/efivar.git \ + file://allow-multi-definitions-for-native.patch \ + file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \ + file://musl-strndupa.patch \ + file://0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch \ + " +SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ + file://0003-efivar-fix-for-cross-compile.patch \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \ + " +SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \ + " + +S = "${WORKDIR}/git" + +# Setting CROSS_COMPILE breaks pkgconfig, so just set AR +EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar" + +do_compile_prepend() { + sed -i -e s:-Werror::g ${S}/gcc.specs +} + +do_compile_class-native() { + oe_runmake -C src makeguids +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + +do_install_class-native() { + install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids +} + +BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch deleted file mode 100644 index 1b8815e9df..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3d43c5efdb632da5d7387dcadce4e87b83929c64 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 24 Aug 2017 15:54:47 -0700 -Subject: [PATCH] efivar-dp.h: Add -Wunknown-attributes when using clang - -change !dp check to a comparision against NULL to silent clang warning -nonnull parameter 'dp' will evaluate to 'true' on first encounter - -Signed-off-by: Khem Raj ---- - src/include/efivar/efivar-dp.h | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -Index: git/src/include/efivar/efivar-dp.h -=================================================================== ---- git.orig/src/include/efivar/efivar-dp.h -+++ git/src/include/efivar/efivar-dp.h -@@ -783,9 +783,14 @@ extern int efidp_append_instance(const_e - * though older or other compilers might just ignore that attribute if they - * don't support it. Ugh. - */ -+#pragma GCC diagnostic push - #if defined(__GNUC__) && __GNUC__ >= 6 - #pragma GCC diagnostic ignored "-Wnonnull-compare" - #endif -+#if defined(__clang__) -+#pragma GCC diagnostic ignored "-Wunknown-attributes" -+#pragma GCC diagnostic ignored "-Wpointer-bool-conversion" -+#endif - - static inline int16_t - __attribute__((__artificial__)) diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch deleted file mode 100644 index 6f6ca6475a..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9a3c480af653b37e62d1be04d49fe7a60a80168f Mon Sep 17 00:00:00 2001 -From: Kai Kang -Date: Fri, 25 Sep 2015 18:14:31 +0800 -Subject: [PATCH 1/2] efivar: fix for cross compile - -It builds and calls elf file makeguids to generate a header file which -doesn't work for cross compile. Fix it. - -Signed-off-by: Kai Kang - -Upstream-Status: Pending -Signed-off-by: Hongxu Jia - ---- - src/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 5fc7887..1829d22 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -29,8 +29,8 @@ all : deps $(TARGETS) - ./guid-symbols.c : include/efivar/efivar-guids.h - ./guids.bin : include/efivar/efivar-guids.h - ./names.bin : include/efivar/efivar-guids.h --include/efivar/efivar-guids.h : makeguids guids.txt -- ./makeguids guids.txt guids.bin names.bin \ -+include/efivar/efivar-guids.h : guids.txt -+ makeguids guids.txt guids.bin names.bin \ - guid-symbols.c include/efivar/efivar-guids.h - - makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT --- -2.4.3 - diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch b/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch deleted file mode 100644 index 73a772186a..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 98b33d4193998687aa3a78c097f7bd4c393e0c85 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 15 Jul 2017 00:29:42 -0700 -Subject: [PATCH] makeguids: Do not use __bswap_constant_{16|32} macros - -not available on musl - -Signed-off-by: Khem Raj ---- - src/makeguids.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/makeguids.c b/src/makeguids.c -index da2f5f7..daf821a 100644 ---- a/src/makeguids.c -+++ b/src/makeguids.c -@@ -155,13 +155,13 @@ main(int argc, char *argv[]) - #if BYTE_ORDER == BIG_ENDIAN\n\ - #define cpu_to_be32(n) (n)\n\ - #define cpu_to_be16(n) (n)\n\ --#define cpu_to_le32(n) (__bswap_constant_32(n))\n\ --#define cpu_to_le16(n) (__bswap_constant_16(n))\n\ -+#define cpu_to_le32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ -+#define cpu_to_le16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ - #else\n\ - #define cpu_to_le32(n) (n)\n\ - #define cpu_to_le16(n) (n)\n\ --#define cpu_to_be32(n) (__bswap_constant_32(n))\n\ --#define cpu_to_be16(n) (__bswap_constant_16(n))\n\ -+#define cpu_to_be32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ -+#define cpu_to_be16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ - #endif\n\ - """); - --- -2.13.3 - diff --git a/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch b/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch deleted file mode 100644 index 3f43f2a93e..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0003-efivar-fix-for-cross-compile.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7ead29ca6bb5e280ae07551cc3521281ecf73682 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Sat, 7 May 2016 02:06:47 -0400 -Subject: [PATCH] Makefile: fix efivar.pc not found - -It fixes efivar.pc not found: -... -| install -d -m 755 efivar/0.23-r0/image/usr/lib/pkgconfig/ -| install -m 644 efivar.pc efivar/0.23-r0/image/usr/lib/pkgconfig/ -; install -m 644 efiboot.pc efivar/0.23-r0/image/usr/lib/pkgconfig/ -; -| install: cannot stat 'efivar.pc': No such file or directory -| install: cannot stat 'efiboot.pc': No such file or directory -| make[1]: *** [install] Error 1 -| make[1]: Leaving directory `efivar/0.23-r0/git/src' -| make: *** [install] Error 2 -| ERROR: oe_runmake failed -... - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia ---- - src/Makefile | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile b/src/Makefile -index c7a0ca3..ad9c427 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -78,7 +78,9 @@ install : all - ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x).$(MAJOR_VERSION);\ - ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x); ) - $(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR) -- $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;) -+ $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(TOPDIR)/src/$(x).in $(DESTDIR)$(PCDIR)/$(x) ;\ -+ sed -i -e "s:@@LIBDIR@@:$(libdir):g" -e "s:@@VERSION@@:$(VERSION):g" \ -+ $(DESTDIR)$(PCDIR)/$(x); ) - $(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/efivar - $(foreach x, $(wildcard $(TOPDIR)/src/include/efivar/*.h), $(INSTALL) -m 644 $(x) $(DESTDIR)$(includedir)/efivar/$(notdir $(x));) - $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) --- -2.8.1 - diff --git a/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch deleted file mode 100644 index 96d0c6b3b2..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b3d35e7dd27a755df5acbe050837885914dbb28b Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Tue, 10 May 2016 11:34:50 -0400 -Subject: [PATCH] fix unknow option for gold linker - -- Revert the following patch, since oe-core work with gcc 5 -... -commit 3055a3797f16693dfdd855fa68bc57fd900dc408 -Author: Peter Jones -Date: Mon Feb 15 14:15:40 2016 -0500 - - Make gcc.specs work with gcc 6 / binutils 2.26 - - Apparently binutils 2.26 gets real picky about "ld -PIC" vs "ld -fPIC". - - Signed-off-by: Peter Jones -... - -- Remove unknown option '--add-needed' - -Signed-off-by: Hongxu Jia ---- - gcc.specs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/gcc.specs -=================================================================== ---- git.orig/gcc.specs -+++ git/gcc.specs -@@ -14,4 +14,4 @@ - + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} - - *link: --+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:% ---- -diff --git a/Make.rules b/Make.rules -index d9c0609..874bce0 100644 ---- a/Make.rules -+++ b/Make.rules -@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version - $(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \ - -Wl,-soname,$@.$(MAJOR_VERSION) \ - -Wl,--version-script=$(MAP) \ -+ -Wl,-z,muldefs \ - -o $@ $^ $(LDLIBS) - - %.o : %.c diff --git a/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch deleted file mode 100644 index e3fa2e1c1a..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1361225abbaba878960f970df39a4570bbc39553 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Thu, 26 May 2016 21:50:01 -0400 -Subject: [PATCH] fix compile failure with older host gcc (<=4.6) - -While host gcc version is 4.6.3 in ubuntu 1204, it -did not recognize -std=gnu11 and -Wmaybe-uninitialized. - -While host gcc version is 4.4.7 in centos6, it -did not recognize -std=gnu11, -Wmaybe-uninitialized, -and -flto. - -For native build, use -std=gnu99 to replace -std=gnu11, -and directly remove -Wmaybe-uninitialized and -flto. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia ---- - gcc.specs | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/gcc.specs -=================================================================== ---- git.orig/gcc.specs -+++ git/gcc.specs -@@ -2,13 +2,13 @@ - + -D_GNU_SOURCE - - *efivar_cpp_options: -- -Werror -Wall -std=gnu11 -Wextra -+ -Werror -Wall -std=gnu99 -Wextra - - *cpp_options: - + %(efivar_cpp_options) - - *cc1_options: --+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} -++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} - - *self_spec: - + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} diff --git a/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch b/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch deleted file mode 100644 index fc8f8c8b21..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch +++ /dev/null @@ -1,17 +0,0 @@ -Taken from void linux - -Index: git/src/linux.c -=================================================================== ---- git.orig/src/linux.c -+++ git/src/linux.c -@@ -40,6 +40,10 @@ - #include - #include - -+#if !defined(__GLIBC__) -+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) -+#endif -+ - #include "dp.h" - #include "linux.h" - #include "util.h" diff --git a/meta-oe/recipes-extended/efivar/efivar_0.31.bb b/meta-oe/recipes-extended/efivar/efivar_0.31.bb deleted file mode 100644 index 9d4cdc97be..0000000000 --- a/meta-oe/recipes-extended/efivar/efivar_0.31.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "Tools to manipulate UEFI variables" -DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility" -HOMEPAGE = "https://github.com/rhinstaller/efivar" - -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393" - -DEPENDS = "popt" -DEPENDS_append_class-target = " efivar-native" - -inherit pkgconfig - -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" - -SRCREV = "11324799c68193116e1dd5f94b416591bd324f90" -SRC_URI = "git://github.com/rhinstaller/efivar.git \ - file://allow-multi-definitions-for-native.patch \ - file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \ - file://musl-strndupa.patch \ - file://0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch \ - " -SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ - file://0003-efivar-fix-for-cross-compile.patch \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \ - " -SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \ - " - -S = "${WORKDIR}/git" - -# Setting CROSS_COMPILE breaks pkgconfig, so just set AR -EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar" - -do_compile_prepend() { - sed -i -e s:-Werror::g ${S}/gcc.specs -} - -do_compile_class-native() { - oe_runmake -C src makeguids -} - -do_install() { - oe_runmake install DESTDIR=${D} -} - -do_install_class-native() { - install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids -} - -BBCLASSEXTEND = "native" -- cgit 1.2.3-korg