diff options
-rw-r--r-- | meta/recipes-extended/newt/files/cross_ar.patch | 51 | ||||
-rw-r--r-- | meta/recipes-extended/newt/libnewt_0.52.14.bb | 5 |
2 files changed, 54 insertions, 2 deletions
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch new file mode 100644 index 0000000000..f67239abda --- /dev/null +++ b/meta/recipes-extended/newt/files/cross_ar.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | Fix cross link using autoconf detected AR | ||
2 | |||
3 | If building on 32bit host and creating 64bit libraries, the target | ||
4 | package builds should not invoke the 32bit hosts's ar. Specifically | ||
5 | you will get an error message like: | ||
6 | |||
7 | x86_64-linux-gcc -m64 --sysroot=/opt/qemux86-64/tmp/sysroots/qemux86-64 -g -o test test.o libnewt.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lslang | ||
8 | libnewt.a: could not read symbols: Archive has no index; run ranlib to add one | ||
9 | collect2: error: ld returned 1 exit status | ||
10 | |||
11 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | --- | ||
16 | Makefile.in | 3 ++- | ||
17 | configure.ac | 4 ++++ | ||
18 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
19 | |||
20 | --- a/Makefile.in | ||
21 | +++ b/Makefile.in | ||
22 | @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ | ||
23 | LDFLAGS = @LDFLAGS@ | ||
24 | CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
25 | GNU_LD = @GNU_LD@ | ||
26 | +AR = @AR@ | ||
27 | |||
28 | VERSION = @VERSION@ | ||
29 | TAG = r$(subst .,-,$(VERSION)) | ||
30 | @@ -95,7 +96,7 @@ whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH) | ||
31 | $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) | ||
32 | |||
33 | $(LIBNEWT): $(LIBOBJS) | ||
34 | - ar rv $@ $^ | ||
35 | + $(AR) rv $@ $^ | ||
36 | |||
37 | newt.o $(SHAREDDIR)/newt.o: newt.c Makefile | ||
38 | |||
39 | --- a/configure.ac | ||
40 | +++ b/configure.ac | ||
41 | @@ -14,6 +14,10 @@ AC_PROG_CC | ||
42 | AC_PROG_INSTALL | ||
43 | AC_PROG_LN_S | ||
44 | AC_PROG_GREP | ||
45 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
46 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
47 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
48 | +AC_PROG_AR | ||
49 | |||
50 | # Are we using GNU ld? | ||
51 | AC_MSG_CHECKING([for GNU ld]) | ||
diff --git a/meta/recipes-extended/newt/libnewt_0.52.14.bb b/meta/recipes-extended/newt/libnewt_0.52.14.bb index 8a89eb7678..0208695699 100644 --- a/meta/recipes-extended/newt/libnewt_0.52.14.bb +++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb | |||
@@ -17,11 +17,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" | |||
17 | # slang needs to be >= 2.2 | 17 | # slang needs to be >= 2.2 |
18 | DEPENDS = "slang popt" | 18 | DEPENDS = "slang popt" |
19 | 19 | ||
20 | PR = "r0" | 20 | PR = "r1" |
21 | 21 | ||
22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ | 22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ |
23 | file://remove_slang_include.patch \ | 23 | file://remove_slang_include.patch \ |
24 | file://fix_SHAREDDIR.patch" | 24 | file://fix_SHAREDDIR.patch \ |
25 | file://cross_ar.patch" | ||
25 | 26 | ||
26 | SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37" | 27 | SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37" |
27 | SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e" | 28 | SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e" |