Date: Wed, 17 Jul 2013 12:11:59 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323162 - in head/ports-mgmt/pkg: . files Message-ID: <201307171211.r6HCBx3b071480@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Wed Jul 17 12:11:59 2013 New Revision: 323162 URL: http://svnweb.freebsd.org/changeset/ports/323162 Log: Add proper support for detect new arm eabi Bump port revision. Submitted by: andrew@ Added: head/ports-mgmt/pkg/files/ head/ports-mgmt/pkg/files/patch-arm-eabi (contents, props changed) Modified: head/ports-mgmt/pkg/Makefile Modified: head/ports-mgmt/pkg/Makefile ============================================================================== --- head/ports-mgmt/pkg/Makefile Wed Jul 17 11:57:34 2013 (r323161) +++ head/ports-mgmt/pkg/Makefile Wed Jul 17 12:11:59 2013 (r323162) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= http://files.etoilebsd.net/pkg/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/ \ Added: head/ports-mgmt/pkg/files/patch-arm-eabi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ports-mgmt/pkg/files/patch-arm-eabi Wed Jul 17 12:11:59 2013 (r323162) @@ -0,0 +1,58 @@ +diff --git libpkg/pkg_elf.c libpkg/pkg_elf.c +index 8ac65ba..2abfc0e 100644 +--- libpkg/pkg_elf.c ++++ libpkg/pkg_elf.c +@@ -484,7 +484,7 @@ pkg_get_myarch(char *dest, size_t sz) + uint32_t version = 0; + int ret = EPKG_OK; + int i; +- const char *abi, *endian_corres_str, *wordsize_corres_str; ++ const char *abi, *endian_corres_str, *wordsize_corres_str, *fpu; + + if (elf_version(EV_CURRENT) == EV_NONE) { + pkg_emit_error("ELF library initialization failed: %s", +@@ -569,10 +569,28 @@ pkg_get_myarch(char *dest, size_t sz) + endian_corres_str = elf_corres_to_string(endian_corres, + (int)elfhdr.e_ident[EI_DATA]); + ++ /* FreeBSD doesn't support the hard-float ABI yet */ ++ fpu = "softfp"; ++ if ((elfhdr.e_flags & 0xFF000000) != 0) { ++ /* This is an EABI file, the conformance level is set */ ++ abi = "eabi"; ++ } else if (elfhdr.e_ident[EI_OSABI] != ELFOSABI_NONE) { ++ /* ++ * EABI executables all have this field set to ++ * ELFOSABI_NONE, therefore it must be an oabi file. ++ */ ++ abi = "oabi"; ++ } else { ++ /* ++ * We may have failed to positively detect the ABI, ++ * set the ABI to unknown. If we end up here one of ++ * the above cases should be fixed for the binary. ++ */ ++ pkg_emit_error("unknown ARM ABI"); ++ goto cleanup; ++ } + snprintf(dest + strlen(dest), sz - strlen(dest), ":%s:%s:%s", +- endian_corres_str, +- (elfhdr.e_flags & EF_ARM_NEW_ABI) > 0 ? "eabi" : "oabi", +- (elfhdr.e_flags & EF_ARM_VFP_FLOAT) > 0 ? "softfp" : "vfp"); ++ endian_corres_str, abi, fpu); + break; + case EM_MIPS: + /* +diff --git newvers.sh newvers.sh +index 8eefca3..30241fa 100755 +--- newvers.sh ++++ newvers.sh +@@ -41,7 +41,7 @@ + : ${PKG_MINOR_VERSION="1"} + : ${PKG_PATCH_LEVEL="4"} + +-: ${PORTREVISION:=} ++: ${PORTREVISION:=1} + : ${PORTEPOCH:=} + + # ------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307171211.r6HCBx3b071480>