Skip to contentSkip to conversation

gmp: don't compile in mips16e mode

PATCH In review André Draszik 3 participants 6 messages Jun 24, 2016 – Jun 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 gmp: don't compile in mips16e mode

From: André Draszik <[email protected]>

gmp contains hand-written assembly which is not compatible with the MIPS16e mode.

---
 meta/recipes-support/gmp/gmp_6.1.0.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/gmp/gmp_6.1.0.bb +4 -0
index de827f5..9acf5cf 100644
@@ -30,4 +30,8 @@ do_install_append_class-target() {
 
 SSTATE_SCAN_FILES += "gmp.h"
 
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/4 uclibc: don't compile in mips16e mode

From: André Draszik <[email protected]>

uClibc contains hand-written assembly which is not compatible with the MIPS16e mode.

---
 meta/recipes-core/uclibc/uclibc.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/uclibc/uclibc.inc +4 -0
index 57f87fa..02cd8d1 100644
@@ -63,6 +63,10 @@ EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
 CFLAGS_remove_arm = "-fno-omit-frame-pointer"
 UCLIBC_EXTRA_CFLAGS  = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
 
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET_pn-uclibc = "mips"
+
 configmangle = '/^KERNEL_HEADERS/d; \
                 /^RUNTIME_PREFIX/d; \
                 /^DEVEL_PREFIX/d; \
Signature · 1 line
2.8.1
#4 lore raw

PATCH 3/4 libffi: don't compile in mips16e mode

In reply to André Draszik

From: André Draszik <[email protected]>

libffi contains hand-written assembly which is not compatible with the MIPS16e mode.

---
 meta/recipes-support/libffi/libffi_3.2.1.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/libffi/libffi_3.2.1.bb +4 -0
index 72e25fb..42ab108 100644
@@ -23,4 +23,8 @@ inherit autotools texinfo
 
 FILES_${PN}-dev += "${libdir}/libffi-${PV}"
 
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips16"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.8.1
#5 lore raw

PATCH 4/4 glib: disable valgrind support when compiling in mips16e mode

In reply to André Draszik

From: André Draszik <[email protected]>

| mipsel-poky-linux-uclibc-gcc -mel -mabi=32 -msoft-float \
|   -march=mips32r2 -mips16 -minterlink-compressed -mtune=24kec \
|   -mdsp --sysroot=<sysroot> -DHAVE_CONFIG_H -I. \
|   -I<glib>/glib -I.. -I.. -I../glib -I<glib>/glib -I<glib> \
|   -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION \
|   -DPCRE_STATIC -pthread -Wall -Wstrict-prototypes \
|   -Werror=declaration-after-statement -Werror=missing-prototypes \
|   -Werror=implicit-function-declaration -Werror=pointer-arith \
|   -Werror=init-self -Werror=format=2 -Werror=missing-include-dirs \
|   -fvisibility=hidden -O2 -pipe -g -feliminate-unused-debug-types \
|   -c <glib>/glib/gslice.c  -fPIC -DPIC -o .libs/libglib_2_0_la-gslice.o
| {standard input}: Assembler messages:
| {standard input}:2485: Error: invalid operands `move $11,$8'
| {standard input}:2487: Error: invalid operands `srl $0,$0,13'
| {standard input}:2488: Error: invalid operands `srl $0,$0,29'
| {standard input}:2489: Error: invalid operands `srl $0,$0,3'
| {standard input}:2490: Error: invalid operands `srl $0,$0,19'
| {standard input}:2491: Error: invalid operands `or $13,$13,$13'
| Makefile:2076: recipe for target 'libglib_2_0_la-gslice.lo' failed

The alternative would probably be to force compilation in normal mips mode for all of glib (as is done for armv4 and armv5). While that would retain the valgrind support, valgrind support itself shouldn't be needed on the target device, and we rather keep the mips16e mode.

---
 meta/recipes-core/glib-2.0/glib.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/glib-2.0/glib.inc +3 -0
index c6b8e57..767492d 100644
@@ -68,6 +68,9 @@ FILES_${PN}-utils = "${bindir}/*"
 
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
+# Valgrind runtime detection works using hand-written assembly, which
+# doesn't support mips16e
+CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
 
 USE_NLS = "yes"
 
Signature · 1 line
2.8.1
#2 lore raw

Re: [PATCH 2/4] uclibc: don't compile in mips16e mode

In reply to André Draszik

Are these Krogoth worthy?

- armin

Quoted 26 lines · André Draszik

From: André Draszik <[email protected]>

uClibc contains hand-written assembly which is not compatible with the MIPS16e mode.

---
 meta/recipes-core/uclibc/uclibc.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/uclibc/uclibc.inc +4 -0
index 57f87fa..02cd8d1 100644
@@ -63,6 +63,10 @@ EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
 CFLAGS_remove_arm = "-fno-omit-frame-pointer"
 UCLIBC_EXTRA_CFLAGS  = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
 
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET_pn-uclibc = "mips"
+
 configmangle = '/^KERNEL_HEADERS/d; \
                 /^RUNTIME_PREFIX/d; \
                 /^DEVEL_PREFIX/d; \
#3 lore raw

Re: [PATCH 2/4] uclibc: don't compile in mips16e mode

Quoted 4 lines · On Jun 25, 2016, at 9:18 AM, akuster808 <[email protected]> wrote:

Are these Krogoth worthy?

I think this is a list of patches. Not this alone. You need MIPS_INSTRUCTION_SET patch to begin with. I am not sure its safe and desired to bring mips16 feature after the release.

Quoted 35 lines

- armin

Quoted 22 lines · André Draszik

From: André Draszik <[email protected]>

uClibc contains hand-written assembly which is not compatible with the MIPS16e mode.

---
meta/recipes-core/uclibc/uclibc.inc | 4 ++++

1 file changed, 4 insertions(+)
meta/recipes-core/uclibc/uclibc.inc +0 -0
index 57f87fa..02cd8d1 100644
@@ -63,6 +63,10 @@ EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"

CFLAGS_remove_arm = "-fno-omit-frame-pointer" UCLIBC_EXTRA_CFLAGS = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"

meta/recipes-core/uclibc/uclibc.inc +4 -0
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET_pn-uclibc = "mips"
+
Quoted 4 lines
configmangle = '/^KERNEL_HEADERS/d; \
                /^RUNTIME_PREFIX/d; \
                /^DEVEL_PREFIX/d; \

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core