Bug 396905 - compile tests failure on mips32-linux: Error: opcode not supported on this processor: mips1 (mips1)
Summary: compile tests failure on mips32-linux: Error: opcode not supported on this pr...
Status: RESOLVED WORKSFORME
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Hongxu Jia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-27 13:25 UTC by Hongxu Jia
Modified: 2023-11-08 23:26 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix opcode not supported on mips32-linux (2.40 KB, patch)
2018-07-27 13:42 UTC, Hongxu Jia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2018-07-27 13:25:45 UTC
While build tests(`make check') on mips32-linux, there are
serial failures such as:
[snip]
| mips-wrsmllib32-linux-gcc  -meb -mabi=32 -mhard-float -c
-o atomic_incs-atomic_incs.o `test -f 'atomic_incs.c' || echo
'../../../valgrind-3.13.0/memcheck/tests/'`atomic_incs.c
| /tmp/ccqrmINN.s: Assembler messages:
| /tmp/ccqrmINN.s:247: Error: opcode not supported on this
processor: mips1 (mips1) `ll $t3,0($t1)'
| /tmp/ccqrmINN.s:249: Error: opcode not supported on this
processor: mips1 (mips1) `sc $t3,0($t1)'
[snip]
Comment 1 Hongxu Jia 2018-07-27 13:42:12 UTC
Created attachment 114163 [details]
fix opcode not supported on mips32-linux

Since the following commit applied, it defines CLFAGS for mips32,
but missed to pass them to tests which caused the failure
...
3e344c57f Merge in a port for mips32-linux
...
Comment 2 Aleksandar Rikalo 2018-09-04 08:52:08 UTC
Hi,

Unfortunately, this kind of fix makes troubles in case of specific CFLAGS are passed.
However, build whole Valgrind for the "mips1" isn't good idea at all.

From `README.mips`:

>> The build system expects that native GCC is configured correctly and optimized for the platform.
Yet, this may not be the case with some Debian distributions which configure
GCC to compile to "mips1" by default. Depending on a target platform, using
CFLAGS="-mips32r2", CFLAGS="-mips32" or CFLAGS="-mips64" or
CFLAGS="-mips64 -mabi=64" will do the trick and compile Valgrind correctly. <<

Please let us know if ./configure CFLAGS="-mips32" doesn't work for you.

Regards,
Aleksandar
Comment 3 Petar Jovanovic 2018-09-04 21:26:07 UTC
Does Aleksandar's comment and suggestion work for you?
Comment 4 Petar Jovanovic 2018-09-06 14:28:56 UTC
Changing status to NEEDSINFO.
Comment 5 Petar Jovanovic 2018-09-10 09:58:12 UTC
Closing this as "WORKSFORME".
Reopen this issue if you are still having problems.
Comment 6 Randy MacLeod 2023-11-08 23:26:02 UTC
I dropped Hongxu's patch in the Yocto/oe-core valgrind recipe that I'm updating and it works for me now too.