[OpenWrt-Devel] [PATCH] libbsd: Fix compilation under ARC
Petr Štetiar
ynezz at true.cz
Fri May 3 13:17:48 EDT 2019
Rosen Penev <rosenp at gmail.com> [2019-05-01 10:04:45]:
Hi,
> The 8 year old file does not have any ARC definitions.
I'm wondering if we need to cary another patch forever, thus if it wouldn't be
better to backport upstreamed patch and/or bump to fixed upstream version.
-- ynezz
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
> package/libs/libbsd/Makefile | 2 +-
> package/libs/libbsd/patches/010-fix-arc.patch | 15 +++++++++++++++
> 2 files changed, 16 insertions(+), 1 deletion(-)
> create mode 100644 package/libs/libbsd/patches/010-fix-arc.patch
>
> diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile
> index 4101d5e0ee..63b9ceafc3 100644
> --- a/package/libs/libbsd/Makefile
> +++ b/package/libs/libbsd/Makefile
> @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
>
> PKG_NAME:=libbsd
> PKG_VERSION:=0.8.7
> -PKG_RELEASE:=2
> +PKG_RELEASE:=3
>
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
> PKG_HASH:=f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31
> diff --git a/package/libs/libbsd/patches/010-fix-arc.patch b/package/libs/libbsd/patches/010-fix-arc.patch
> new file mode 100644
> index 0000000000..7b1bcbe348
> --- /dev/null
> +++ b/package/libs/libbsd/patches/010-fix-arc.patch
> @@ -0,0 +1,15 @@
> +--- a/src/local-elf.h
> ++++ b/src/local-elf.h
> +@@ -53,6 +53,12 @@
> + #endif
> + #define ELF_TARG_DATA ELFDATA2LSB
> +
> ++#elif defined (__arc__)
> ++
> ++#define ELF_TARG_MACH EM_ARC
> ++#define ELF_TARG_CLASS ELFCLASS32
> ++#define ELF_TARG_DATA ELFDATA2LSB
> ++
> + #elif defined(__arm__)
> +
> + #define ELF_TARG_MACH EM_ARM
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list