diff mbox series

[OpenWrt-Devel] libbsd: Fix compilation under ARC

Message ID 20190501170445.4607-1-rosenp@gmail.com
State Accepted
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel] libbsd: Fix compilation under ARC | expand

Commit Message

Rosen Penev May 1, 2019, 5:04 p.m. UTC
The 8 year old file does not have any ARC definitions.

Signed-off-by: Rosen Penev <rosenp@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

Comments

Petr Štetiar May 3, 2019, 5:17 p.m. UTC | #1
Rosen Penev <rosenp@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@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
Rosen Penev May 3, 2019, 5:49 p.m. UTC | #2
> On May 3, 2019, at 10:17, Petr Štetiar <ynezz@true.cz> wrote:
> 
> Rosen Penev <rosenp@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.
As I said. This file has not been touched in 8 years. Upstream also seems relatively dead.
> 
> -- ynezz
> 
>> Signed-off-by: Rosen Penev <rosenp@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
Petr Štetiar May 3, 2019, 6:55 p.m. UTC | #3
Rosen Penev <rosenp@gmail.com> [2019-05-03 10:49:54]:

> > On May 3, 2019, at 10:17, Petr Štetiar <ynezz@true.cz> wrote:
> > 
> > Rosen Penev <rosenp@gmail.com> [2019-05-01 10:04:45]:
> > 
> >> 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.
>
> As I said. This file has not been touched in 8 years. Upstream also seems relatively dead.

According to this https://gitlab.freedesktop.org/libbsd/libbsd it doesn't seem
that much dead to me, as I wouldn't expect that much changes in such compat
library anyway.

-- ynezz
Rosen Penev May 3, 2019, 7:11 p.m. UTC | #4
On Fri, May 3, 2019 at 11:55 AM, Petr Štetiar <ynezz@true.cz> wrote:
> Rosen Penev <rosenp@gmail.com> [2019-05-03 10:49:54]:
> 
>>  > On May 3, 2019, at 10:17, Petr Štetiar <ynezz@true.cz> wrote:
>>  >
>>  > Rosen Penev <rosenp@gmail.com> [2019-05-01 10:04:45]:
>>  >
>>  >> 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.
>> 
>>  As I said. This file has not been touched in 8 years. Upstream also 
>> seems relatively dead.
> 
> According to this https://gitlab.freedesktop.org/libbsd/libbsd it 
> doesn't seem
> that much dead to me, as I wouldn't expect that much changes in such 
> compat
> library anyway.
All of the merge requests (what GitLab calls pull requests) except one 
have no comments. There are also none that have actually been merged.
> 
> 
> -- ynezz
Rosen Penev May 17, 2019, 1:47 a.m. UTC | #5
On Fri, May 3, 2019 at 12:11 PM Rosen Penev <rosenp@gmail.com> wrote:
>
>
> On Fri, May 3, 2019 at 11:55 AM, Petr Štetiar <ynezz@true.cz> wrote:
>
> Rosen Penev <rosenp@gmail.com> [2019-05-03 10:49:54]:
>
> > On May 3, 2019, at 10:17, Petr Štetiar <ynezz@true.cz> wrote: > > Rosen Penev <rosenp@gmail.com> [2019-05-01 10:04:45]: > >> 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. As I said. This file has not been touched in 8 years. Upstream also seems relatively dead.
>
> According to this https://gitlab.freedesktop.org/libbsd/libbsd it doesn't seem that much dead to me, as I wouldn't expect that much changes in such compat library anyway.
>
> All of the merge requests (what GitLab calls pull requests) except one have no comments. There are also none that have actually been merged.
Added merge request here:
https://gitlab.freedesktop.org/libbsd/libbsd/merge_requests/6
>
> -- ynezz
>
>
>
Petr Štetiar May 17, 2019, 7:34 a.m. UTC | #6
Rosen Penev <rosenp@gmail.com> [2019-05-16 18:47:07]:

> Added merge request here:
> https://gitlab.freedesktop.org/libbsd/libbsd/merge_requests/6

thanks, I've merged it https://git.openwrt.org/4ffa38e15ca9

-- ynezz
Rosen Penev Aug. 13, 2019, 10:27 p.m. UTC | #7
On Fri, May 17, 2019 at 12:34 AM Petr Štetiar <ynezz@true.cz> wrote:
>
> Rosen Penev <rosenp@gmail.com> [2019-05-16 18:47:07]:
>
> > Added merge request here:
> > https://gitlab.freedesktop.org/libbsd/libbsd/merge_requests/6
>
> thanks, I've merged it https://git.openwrt.org/4ffa38e15ca9
Can this be backported to 18.06? It fails there as well:
https://downloads.openwrt.org/releases/faillogs-18.06/arc_arc700/base/libbsd/compile.txt
>
> -- ynezz
Petr Štetiar Aug. 14, 2019, 7:17 a.m. UTC | #8
Rosen Penev <rosenp@gmail.com> [2019-08-13 15:27:38]:

Hi,

> Can this be backported to 18.06? It fails there as well:
> https://downloads.openwrt.org/releases/faillogs-18.06/arc_arc700/base/libbsd/compile.txt

done, can you please prepare PR/patches next time? Thanks.

-- ynezz
diff mbox series

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