summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-extended/newt
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-extended/newt')
-rw-r--r--yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch26
-rw-r--r--yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch36
-rw-r--r--yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb3
4 files changed, 65 insertions, 1 deletions
diff --git a/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
new file mode 100644
index 000000000..bc55582fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
@@ -0,0 +1,26 @@
+From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 18 Jan 2016 17:05:19 +0000
+Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a85d00f..98b85f9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1,4 +1,4 @@
+-LIBS = -lslang @LIBS@
++LIBS = -lslang -ltinfo @LIBS@
+ LIBTCL = @TCL_LIB_FLAG@
+
+ CC = @CC@
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
new file mode 100644
index 000000000..8883e26ad
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
@@ -0,0 +1,36 @@
+specify -fPIC after CFLAGS so it can override the CFLAGS containing -pie and -fpie
+this makes sure the objects that go into shared objects are compiled with -fPIC
+and not with -fpie. We can not use -fpie on objects which will go into .so files
+Fixes errors like
+
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: shared/newt.o: relocation R_X86_64_PC32 against undefined symbol `SLtt_Screen_Rows@@SLANG2' can not be used when making a shared object; recompile with -fPIC
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
+| collect2: error: ld returned 1 exit status
+| make: *** [libnewt.so.0.52.18] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: newt-0.52.18/Makefile.in
+===================================================================
+--- newt-0.52.18.orig/Makefile.in
++++ newt-0.52.18/Makefile.in
+@@ -96,8 +96,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH)
+ PIFLAGS=`$$pyconfig --includes`; \
+ PLDFLAGS=`$$pyconfig --ldflags`; \
+ PLFLAGS=`$$pyconfig --libs`; \
+- echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+- $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++ echo $(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++ $(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+ echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+ $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+ done || :
+@@ -135,7 +135,7 @@ $(LIBNEWTSH): $(SHAREDOBJS)
+ ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+
+ $(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+- $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SHCFLAGS) -o $@ $<
+
+ install: $(LIBNEWT) install-sh whiptail
+ [ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
index 94a41a38e..ba047574f 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
@@ -24,6 +24,5 @@ do_install () {
PACKAGES_remove = "whiptail"
FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
index 302e418a9..9a2964be1 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -21,6 +21,8 @@ SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
file://remove_slang_include.patch \
file://fix_SHAREDDIR.patch \
file://cross_ar.patch \
+ file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
+ file://pie-flags.patch \
"
SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
@@ -36,6 +38,7 @@ CLEANBROKEN = "1"
export STAGING_INCDIR
export STAGING_LIBDIR
+export CPPFLAGS
export BUILD_SYS
export HOST_SYS
OpenPOWER on IntegriCloud