Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS
@ 2017-10-02 16:06 Khem Raj
  2017-10-02 16:06 ` [meta-python][PATCH 2/5] python-m2crypto: Upgrade to 0.26.4 Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Khem Raj @ 2017-10-02 16:06 UTC (permalink / raw)
  To: openembedded-devel

Overriding KLIBCOPTFLAGS also meant that -Ox flags
were taken off. Which results in errors like

| usr/dash/shell.h: In function 'max_int_length':
| usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible with floating-point code
|   return (bytes * 8 - 1) * 0.30102999566398119521 + 14;
|          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible with floating-point argument

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...arm-Do-not-set-a-fallback-march-and-mtune.patch | 33 ++++++++++++++++++++++
 meta-initramfs/recipes-devtools/klibc/klibc.inc    |  4 ++-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch

diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
new file mode 100644
index 000000000..9c0ea6397
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
@@ -0,0 +1,33 @@
+From a46a144ac883898d9cedf7a0b13aec6d10116125 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Sep 2017 23:11:53 -0700
+Subject: [PATCH] arm: Do not set a fallback march and mtune
+
+In OE we pass the options explicitly, there is
+no need to set it inside the makefiles, we will
+need to compute values for CPU_ARCH and CPU_TUNE
+which is a bit harder in OE
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ usr/klibc/arch/arm/MCONFIG | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
+index 53bc1dc3..857e2f2d 100644
+--- a/usr/klibc/arch/arm/MCONFIG
++++ b/usr/klibc/arch/arm/MCONFIG
+@@ -10,7 +10,7 @@
+ CPU_ARCH ?= armv4
+ CPU_TUNE ?= strongarm
+ 
+-KLIBCOPTFLAGS += -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
++KLIBCOPTFLAGS += -Os
+ KLIBCBITSIZE  = 32
+ KLIBCREQFLAGS += -fno-exceptions
+ KLIBCSTRIPFLAGS += -R .ARM.exidx
+-- 
+2.14.2
+
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index dec3d3704..30294b19a 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -19,6 +19,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
            file://0001-always-use-bfd-linker.patch \
            file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
            file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch \
+           file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch \
 "
 
 ARMPATCHES ?= ""
@@ -40,7 +41,8 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
                 'INSTALLDIR=${libdir}/klibc' \
                 'SHLIBDIR=${libdir}' \
                 '${KLIBCTHUMB}' \
-                'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
+                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
+                 V=1 \
                 "
 
 export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-python][PATCH 2/5] python-m2crypto: Upgrade to 0.26.4
  2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
@ 2017-10-02 16:06 ` Khem Raj
  2017-10-02 16:06 ` [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils Khem Raj
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2017-10-02 16:06 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../m2crypto-0.26.4-gcc_macros.patch               | 24 ++++++++++++++++++++++
 ...2crypto_0.26.0.bb => python-m2crypto_0.26.4.bb} |  6 +++---
 2 files changed, 27 insertions(+), 3 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
 rename meta-python/recipes-devtools/python/{python-m2crypto_0.26.0.bb => python-m2crypto_0.26.4.bb} (88%)

diff --git a/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
new file mode 100644
index 000000000..2d738cc94
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
@@ -0,0 +1,24 @@
+Imported from Fedora
+
+--- M2Crypto/SWIG/_m2crypto.i	2017-09-26 11:26:33.000000000 +0200
++++ M2Crypto-0.26.4/SWIG/_m2crypto.i	2017-09-26 21:04:14.080330741 +0200
+@@ -7,6 +7,7 @@
+  * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
+  *
+  */
++%import "gcc_macros.h"
+ 
+ %module(threads=1) m2crypto
+ /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere.
+@@ -15,11 +16,6 @@
+ %nothreadblock;
+ %nothreadallow;
+ 
+-#if SWIG_VERSION >= 0x030000
+-#define __WCHAR_MAX__ __WCHAR_MAX
+-#define __WCHAR_MIN__ __WCHAR_MIN
+-#endif
+-
+ %{
+ #if __GNUC__ < 5
+ #pragma GCC diagnostic ignored "-Wunused-label"
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb b/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb
similarity index 88%
rename from meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
rename to meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb
index 4b4fbbb7c..272c76ca1 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
+++ b/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb
@@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
 
 SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
             file://cross-compile-platform.patch \
+            file://m2crypto-0.26.4-gcc_macros.patch \
            "
-SRC_URI[md5sum] = "9f02f0b88fbe225cc6ea8680945cafa0"
-SRC_URI[sha256sum] = "05d94fd9b2dae2fb8e072819a795f0e05d3611b09ea185f68e1630530ec09ae8"
+SRC_URI[md5sum] = "5c74c25ba8b45122318a165a3a2059ad"
+SRC_URI[sha256sum] = "5cae7acc0b34821f8c0ddf6665e482893fe1f198ad6379e61ffa9d8e65f5c199"
 
 PYPI_PACKAGE = "M2Crypto"
 inherit pypi setuptools siteinfo
@@ -46,5 +47,4 @@ do_compile_prepend() {
     fi
 }
 
-
 BBCLASSEXTEND = "native"
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils
  2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
  2017-10-02 16:06 ` [meta-python][PATCH 2/5] python-m2crypto: Upgrade to 0.26.4 Khem Raj
@ 2017-10-02 16:06 ` Khem Raj
  2017-10-02 21:10   ` Andrea Adami
  2017-10-02 16:06 ` [meta-initramfs][PATCH 4/5] klibc.bbclass: Pass TUNE_CCARGS in flags Khem Raj
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2017-10-02 16:06 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Makefile-only-build-ubi-utils.patch       | 25 ++++++++++------------
 .../0005-common.h-klibc-fixes-2.patch              | 22 +++++--------------
 ...ils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} |  8 +++----
 3 files changed, 19 insertions(+), 36 deletions(-)
 rename meta-initramfs/recipes-devtools/mtd/{ubi-utils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} (90%)

diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
index 9d5e4ebf0..6e1b9ff10 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
@@ -25,11 +25,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
  Makefile | 24 ++----------------------
  1 file changed, 2 insertions(+), 22 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index eade234..2275865 100644
---- a/Makefile
-+++ b/Makefile
-@@ -16,28 +16,13 @@ endif
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -16,28 +16,11 @@ endif
  
  TESTS = tests
  
@@ -37,7 +37,7 @@ index eade234..2275865 100644
 -	ftl_format flash_erase nanddump doc_loadbios \
 -	ftl_check mkfs.jffs2 flash_lock flash_unlock \
 -	flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
--	mtd_debug flashcp nandwrite nandtest \
+-	mtd_debug flashcp nandwrite nandtest mtdpart \
 -	jffs2dump \
 -	nftldump nftl_format docfdisk \
 -	rfddump rfdformat \
@@ -51,15 +51,15 @@ index eade234..2275865 100644
 -BINS += mkfs.ubifs/mkfs.ubifs
 -BINS += $(addprefix ubi-utils/,$(UBI_BINS))
 -SCRIPTS = flash_eraseall
-+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
- 
- TARGETS = $(BINS)
+-
+-TARGETS = $(BINS)
 -TARGETS += lib/libmtd.a
 -TARGETS += ubi-utils/libubi.a
++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
  
  OBJDEPS = $(BUILDDIR)/include/version.h
  
-@@ -61,12 +46,9 @@ endif
+@@ -61,12 +44,9 @@ endif
  	rm -f $(BUILDDIR)/include/version.h
  	$(MAKE) -C $(TESTS) clean
  
@@ -73,7 +73,7 @@ index eade234..2275865 100644
  
  tests::
  	$(MAKE) -C $(TESTS)
-@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
+@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
  LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
  LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
  
@@ -82,6 +82,3 @@ index eade234..2275865 100644
  #
  # Common libmtd
  #
--- 
-1.9.1
-
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
index 2e43d5d97..6b09c14d6 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
@@ -22,20 +22,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
  include/common.h | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)
 
-diff --git a/include/common.h b/include/common.h
-index 77f3f7d..2cbee0f 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -126,7 +126,7 @@ static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1];
- 	fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
- } while(0)
- 
--#if defined(__UCLIBC__)
-+#if defined(__UCLIBC__) || defined(__KLIBC__)
- /* uClibc versions before 0.9.34 don't have rpmatch() */
- #if __UCLIBC_MAJOR__ == 0 && \
- 		(__UCLIBC_MINOR__ < 9 || \
-@@ -146,15 +146,17 @@ static inline int __rpmatch(const char *resp)
+Index: git/include/common.h
+===================================================================
+--- git.orig/include/common.h
++++ git/include/common.h
+@@ -161,15 +161,17 @@ static inline int __rpmatch(const char *
   */
  static inline bool prompt(const char *msg, bool def)
  {
@@ -56,6 +47,3 @@ index 77f3f7d..2cbee0f 100644
  			printf("failed to read prompt; assuming '%s'\n",
  				def ? "yes" : "no");
  			break;
--- 
-1.9.1
-
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
similarity index 90%
rename from meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
rename to meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
index 8ca1ca727..518c02fc0 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 
 inherit klibc
 
-SRC_URI = "git://git.infradead.org/mtd-utils.git;tag=b7455d847ab4f9eeeb6a729efc306bfda7bddc99 \
+SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
+SRC_URI = "git://git.infradead.org/mtd-utils.git \
              file://0001-Makefile-only-build-ubi-utils.patch \
              file://0002-common.mk-for-klibc-CC-is-klcc.patch \
              file://0003-libubi.c-add-klibc-specific-fixes.patch \
@@ -23,10 +24,7 @@ S = "${WORKDIR}/git/"
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
 
 do_install () {
-
-    install -d ${D}${sbindir}
-    oe_runmake DESTDIR="${D}" install
-
+	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
 }
 
 PACKAGES = "ubi-utils-klibc-dbg"
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-initramfs][PATCH 4/5] klibc.bbclass: Pass TUNE_CCARGS in flags
  2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
  2017-10-02 16:06 ` [meta-python][PATCH 2/5] python-m2crypto: Upgrade to 0.26.4 Khem Raj
  2017-10-02 16:06 ` [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils Khem Raj
@ 2017-10-02 16:06 ` Khem Raj
  2017-10-02 16:06 ` [meta-oe][PATCH 5/5] gperftools: Enable on mips Khem Raj
  2017-10-03 19:28 ` [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
  4 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2017-10-02 16:06 UTC (permalink / raw)
  To: openembedded-devel

This is needed for ABI compatibility since
march defines if -mthumb means thumb1 or thumb2

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-initramfs/classes/klibc.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-initramfs/classes/klibc.bbclass b/meta-initramfs/classes/klibc.bbclass
index 1ec7b2b05..b7b72b728 100644
--- a/meta-initramfs/classes/klibc.bbclass
+++ b/meta-initramfs/classes/klibc.bbclass
@@ -11,6 +11,6 @@ CC_append_armv7a = " ${@' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_
 CPP_forcevariable = "${CC} -E"
 
 # klcc uses own optimizations by default. See klcc(1) man file.
-export CFLAGS=""
-export CPPFLAGS=""
-export LDFLAGS=""
+export CFLAGS="${TUNE_CCARGS}"
+export CPPFLAGS="${TUNE_CCARGS}"
+export LDFLAGS="${TUNE_CCARGS}"
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 5/5] gperftools: Enable on mips
  2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
                   ` (2 preceding siblings ...)
  2017-10-02 16:06 ` [meta-initramfs][PATCH 4/5] klibc.bbclass: Pass TUNE_CCARGS in flags Khem Raj
@ 2017-10-02 16:06 ` Khem Raj
  2018-04-10  2:19   ` ChenQi
  2017-10-03 19:28 ` [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
  4 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2017-10-02 16:06 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
index 23284670b..8ce376c91 100644
--- a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
+++ b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
@@ -18,10 +18,6 @@ inherit autotools
 
 S = "${WORKDIR}/git"
 
-# On mips, we have the following error.
-#   do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
-#   Segmentation fault (core dumped)
-COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*"
 # Disable thumb1
 # {standard input}: Assembler messages:
 # {standard input}:434: Error: lo register required -- `ldr pc,[sp]'
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils
  2017-10-02 16:06 ` [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils Khem Raj
@ 2017-10-02 21:10   ` Andrea Adami
  0 siblings, 0 replies; 9+ messages in thread
From: Andrea Adami @ 2017-10-02 21:10 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

On Mon, Oct 2, 2017 at 6:06 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  .../0001-Makefile-only-build-ubi-utils.patch       | 25 ++++++++++------------
>  .../0005-common.h-klibc-fixes-2.patch              | 22 +++++--------------
>  ...ils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} |  8 +++----
>  3 files changed, 19 insertions(+), 36 deletions(-)
>  rename meta-initramfs/recipes-devtools/mtd/{ubi-utils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} (90%)
>
> diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
> index 9d5e4ebf0..6e1b9ff10 100644
> --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
> +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
> @@ -25,11 +25,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
>   Makefile | 24 ++----------------------
>   1 file changed, 2 insertions(+), 22 deletions(-)
>
> -diff --git a/Makefile b/Makefile
> -index eade234..2275865 100644
> ---- a/Makefile
> -+++ b/Makefile
> -@@ -16,28 +16,13 @@ endif
> +Index: git/Makefile
> +===================================================================
> +--- git.orig/Makefile
> ++++ git/Makefile
> +@@ -16,28 +16,11 @@ endif
>
>   TESTS = tests
>
> @@ -37,7 +37,7 @@ index eade234..2275865 100644
>  -      ftl_format flash_erase nanddump doc_loadbios \
>  -      ftl_check mkfs.jffs2 flash_lock flash_unlock \
>  -      flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
> --      mtd_debug flashcp nandwrite nandtest \
> +-      mtd_debug flashcp nandwrite nandtest mtdpart \
>  -      jffs2dump \
>  -      nftldump nftl_format docfdisk \
>  -      rfddump rfdformat \
> @@ -51,15 +51,15 @@ index eade234..2275865 100644
>  -BINS += mkfs.ubifs/mkfs.ubifs
>  -BINS += $(addprefix ubi-utils/,$(UBI_BINS))
>  -SCRIPTS = flash_eraseall
> -+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
> -
> - TARGETS = $(BINS)
> +-
> +-TARGETS = $(BINS)
>  -TARGETS += lib/libmtd.a
>  -TARGETS += ubi-utils/libubi.a
> ++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
>
>   OBJDEPS = $(BUILDDIR)/include/version.h
>
> -@@ -61,12 +46,9 @@ endif
> +@@ -61,12 +44,9 @@ endif
>         rm -f $(BUILDDIR)/include/version.h
>         $(MAKE) -C $(TESTS) clean
>
> @@ -73,7 +73,7 @@ index eade234..2275865 100644
>
>   tests::
>         $(MAKE) -C $(TESTS)
> -@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
> +@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
>   LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
>   LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
>
> @@ -82,6 +82,3 @@ index eade234..2275865 100644
>   #
>   # Common libmtd
>   #
> ---
> -1.9.1
> -
> diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
> index 2e43d5d97..6b09c14d6 100644
> --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
> +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
> @@ -22,20 +22,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
>   include/common.h | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> -diff --git a/include/common.h b/include/common.h
> -index 77f3f7d..2cbee0f 100644
> ---- a/include/common.h
> -+++ b/include/common.h
> -@@ -126,7 +126,7 @@ static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1];
> -       fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
> - } while(0)
> -
> --#if defined(__UCLIBC__)
> -+#if defined(__UCLIBC__) || defined(__KLIBC__)
> - /* uClibc versions before 0.9.34 don't have rpmatch() */
> - #if __UCLIBC_MAJOR__ == 0 && \
> -               (__UCLIBC_MINOR__ < 9 || \
> -@@ -146,15 +146,17 @@ static inline int __rpmatch(const char *resp)
> +Index: git/include/common.h
> +===================================================================
> +--- git.orig/include/common.h
> ++++ git/include/common.h
> +@@ -161,15 +161,17 @@ static inline int __rpmatch(const char *
>    */
>   static inline bool prompt(const char *msg, bool def)
>   {
> @@ -56,6 +47,3 @@ index 77f3f7d..2cbee0f 100644
>                         printf("failed to read prompt; assuming '%s'\n",
>                                 def ? "yes" : "no");
>                         break;
> ---
> -1.9.1
> -
> diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
> similarity index 90%
> rename from meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
> rename to meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
> index 8ca1ca727..518c02fc0 100644
> --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
> +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb
> @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
>
>  inherit klibc
>
> -SRC_URI = "git://git.infradead.org/mtd-utils.git;tag=b7455d847ab4f9eeeb6a729efc306bfda7bddc99 \
> +SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
> +SRC_URI = "git://git.infradead.org/mtd-utils.git \
>               file://0001-Makefile-only-build-ubi-utils.patch \
>               file://0002-common.mk-for-klibc-CC-is-klcc.patch \
>               file://0003-libubi.c-add-klibc-specific-fixes.patch \
> @@ -23,10 +24,7 @@ S = "${WORKDIR}/git/"
>  EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
>
>  do_install () {
> -
> -    install -d ${D}${sbindir}

I don't remember if it is actually necessary but here sbindir was
purposedly created for safety.
Maybe building it anew after having wiped tmp makes install fail?

> -    oe_runmake DESTDIR="${D}" install
> -
> +       oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
>  }
>
>  PACKAGES = "ubi-utils-klibc-dbg"
> --
> 2.14.2
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Thanks for taking care of this.
I planned to update to 2.x one day, at least the ubi-utils, but you
know, these old binaries do work perfectly on armv4/armv5 so I never
did it...

For the klibc patchset,

Acked-by: Andrea Adami <andrea.adami@gmail.com>

Cheers
Andrea


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS
  2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
                   ` (3 preceding siblings ...)
  2017-10-02 16:06 ` [meta-oe][PATCH 5/5] gperftools: Enable on mips Khem Raj
@ 2017-10-03 19:28 ` Khem Raj
  2017-10-03 19:33   ` Martin Jansa
  4 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2017-10-03 19:28 UTC (permalink / raw)
  To: openembeded-devel, Martin Jansa

Martin

This is missing in master-next

On Mon, Oct 2, 2017 at 9:06 AM, Khem Raj <raj.khem@gmail.com> wrote:
> Overriding KLIBCOPTFLAGS also meant that -Ox flags
> were taken off. Which results in errors like
>
> | usr/dash/shell.h: In function 'max_int_length':
> | usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible with floating-point code
> |   return (bytes * 8 - 1) * 0.30102999566398119521 + 14;
> |          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> | usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible with floating-point argument
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...arm-Do-not-set-a-fallback-march-and-mtune.patch | 33 ++++++++++++++++++++++
>  meta-initramfs/recipes-devtools/klibc/klibc.inc    |  4 ++-
>  2 files changed, 36 insertions(+), 1 deletion(-)
>  create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
>
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> new file mode 100644
> index 000000000..9c0ea6397
> --- /dev/null
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> @@ -0,0 +1,33 @@
> +From a46a144ac883898d9cedf7a0b13aec6d10116125 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Fri, 29 Sep 2017 23:11:53 -0700
> +Subject: [PATCH] arm: Do not set a fallback march and mtune
> +
> +In OE we pass the options explicitly, there is
> +no need to set it inside the makefiles, we will
> +need to compute values for CPU_ARCH and CPU_TUNE
> +which is a bit harder in OE
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> +Upstream-Status: Pending
> +
> + usr/klibc/arch/arm/MCONFIG | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
> +index 53bc1dc3..857e2f2d 100644
> +--- a/usr/klibc/arch/arm/MCONFIG
> ++++ b/usr/klibc/arch/arm/MCONFIG
> +@@ -10,7 +10,7 @@
> + CPU_ARCH ?= armv4
> + CPU_TUNE ?= strongarm
> +
> +-KLIBCOPTFLAGS += -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
> ++KLIBCOPTFLAGS += -Os
> + KLIBCBITSIZE  = 32
> + KLIBCREQFLAGS += -fno-exceptions
> + KLIBCSTRIPFLAGS += -R .ARM.exidx
> +--
> +2.14.2
> +
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> index dec3d3704..30294b19a 100644
> --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> @@ -19,6 +19,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
>             file://0001-always-use-bfd-linker.patch \
>             file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
>             file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch \
> +           file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch \
>  "
>
>  ARMPATCHES ?= ""
> @@ -40,7 +41,8 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
>                  'INSTALLDIR=${libdir}/klibc' \
>                  'SHLIBDIR=${libdir}' \
>                  '${KLIBCTHUMB}' \
> -                'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
> +                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
> +                 V=1 \
>                  "
>
>  export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
> --
> 2.14.2
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS
  2017-10-03 19:28 ` [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
@ 2017-10-03 19:33   ` Martin Jansa
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2017-10-03 19:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

Thanks, I've moved it back to New state in patchwork, hopefully tomorrow I
won't forget to pick it.

On Tue, Oct 3, 2017 at 9:28 PM, Khem Raj <raj.khem@gmail.com> wrote:

> Martin
>
> This is missing in master-next
>
> On Mon, Oct 2, 2017 at 9:06 AM, Khem Raj <raj.khem@gmail.com> wrote:
> > Overriding KLIBCOPTFLAGS also meant that -Ox flags
> > were taken off. Which results in errors like
> >
> > | usr/dash/shell.h: In function 'max_int_length':
> > | usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible
> with floating-point code
> > |   return (bytes * 8 - 1) * 0.30102999566398119521 + 14;
> > |          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> > | usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible
> with floating-point argument
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  ...arm-Do-not-set-a-fallback-march-and-mtune.patch | 33
> ++++++++++++++++++++++
> >  meta-initramfs/recipes-devtools/klibc/klibc.inc    |  4 ++-
> >  2 files changed, 36 insertions(+), 1 deletion(-)
> >  create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/
> 0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> >
> > diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/
> 0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-arm-Do-not-set-a-
> fallback-march-and-mtune.patch
> > new file mode 100644
> > index 000000000..9c0ea6397
> > --- /dev/null
> > +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/
> 0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> > @@ -0,0 +1,33 @@
> > +From a46a144ac883898d9cedf7a0b13aec6d10116125 Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem@gmail.com>
> > +Date: Fri, 29 Sep 2017 23:11:53 -0700
> > +Subject: [PATCH] arm: Do not set a fallback march and mtune
> > +
> > +In OE we pass the options explicitly, there is
> > +no need to set it inside the makefiles, we will
> > +need to compute values for CPU_ARCH and CPU_TUNE
> > +which is a bit harder in OE
> > +
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > +Upstream-Status: Pending
> > +
> > + usr/klibc/arch/arm/MCONFIG | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG
> > +index 53bc1dc3..857e2f2d 100644
> > +--- a/usr/klibc/arch/arm/MCONFIG
> > ++++ b/usr/klibc/arch/arm/MCONFIG
> > +@@ -10,7 +10,7 @@
> > + CPU_ARCH ?= armv4
> > + CPU_TUNE ?= strongarm
> > +
> > +-KLIBCOPTFLAGS += -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
> > ++KLIBCOPTFLAGS += -Os
> > + KLIBCBITSIZE  = 32
> > + KLIBCREQFLAGS += -fno-exceptions
> > + KLIBCSTRIPFLAGS += -R .ARM.exidx
> > +--
> > +2.14.2
> > +
> > diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc
> b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> > index dec3d3704..30294b19a 100644
> > --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
> > +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> > @@ -19,6 +19,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/
> libs/klibc/klibc.git \
> >             file://0001-always-use-bfd-linker.patch \
> >             file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
> \
> >             file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch
> \
> > +           file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch
> \
> >  "
> >
> >  ARMPATCHES ?= ""
> > @@ -40,7 +41,8 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
> >                  'INSTALLDIR=${libdir}/klibc' \
> >                  'SHLIBDIR=${libdir}' \
> >                  '${KLIBCTHUMB}' \
> > -                'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
> > +                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
> > +                 V=1 \
> >                  "
> >
> >  export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
> > --
> > 2.14.2
> >
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-oe][PATCH 5/5] gperftools: Enable on mips
  2017-10-02 16:06 ` [meta-oe][PATCH 5/5] gperftools: Enable on mips Khem Raj
@ 2018-04-10  2:19   ` ChenQi
  0 siblings, 0 replies; 9+ messages in thread
From: ChenQi @ 2018-04-10  2:19 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel

On 10/03/2017 12:06 AM, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
> index 23284670b..8ce376c91 100644
> --- a/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
> +++ b/meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb
> @@ -18,10 +18,6 @@ inherit autotools
>   
>   S = "${WORKDIR}/git"
>   
> -# On mips, we have the following error.
> -#   do_page_fault(): sending SIGSEGV to ls for invalid read access from 00000008
> -#   Segmentation fault (core dumped)
> -COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*"
>   # Disable thumb1
>   # {standard input}: Assembler messages:
>   # {standard input}:434: Error: lo register required -- `ldr pc,[sp]'

Hi Khem,

On qemumips, I still get the error.

                root@qemumips:~# LD_PRELOAD=libtcmalloc.so ls /
             [  407.636947] do_page_fault(): sending SIGSEGV to ls for 
invalid read access from 00000008
             [  407.646240] epc = 77e1ae08 in 
libunwind.so.8.0.1[77e18000+c000]
             [  407.651497] ra  = 77e1b3ac in 
libunwind.so.8.0.1[77e18000+c000]
             Segmentation fault (core dumped)

The libc is glibc. I didn't test for musl.

I guess you've tested mips for musl. So how about we add this setting 
back but limit it to glibc?
Something like:
COMPATIBLE_HOST_libc-glibc = 
"(i.86|x86_64|powerpc|powerpc64|arm|aarch64).*-linux*"

Best Regards,
Chen Qi


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-10  2:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 16:06 [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
2017-10-02 16:06 ` [meta-python][PATCH 2/5] python-m2crypto: Upgrade to 0.26.4 Khem Raj
2017-10-02 16:06 ` [meta-initramfs][PATCH 3/5] ubi-utils-klibc: Update to 1.5.2 release of mtd-utils Khem Raj
2017-10-02 21:10   ` Andrea Adami
2017-10-02 16:06 ` [meta-initramfs][PATCH 4/5] klibc.bbclass: Pass TUNE_CCARGS in flags Khem Raj
2017-10-02 16:06 ` [meta-oe][PATCH 5/5] gperftools: Enable on mips Khem Raj
2018-04-10  2:19   ` ChenQi
2017-10-03 19:28 ` [meta-initramfs][PATCH 1/5] klibc: Pass Optimization with KLIBCOPTFLAGS Khem Raj
2017-10-03 19:33   ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox