Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549560 - dev-libs/gmp-6.0.0a: build fails when using -mips16 due to mpn/mips32/add_n.asm
Summary: dev-libs/gmp-6.0.0a: build fails when using -mips16 due to mpn/mips32/add_n.asm
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS All
: Normal major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 12:07 UTC by ytrezq
Modified: 2019-12-29 11:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
File which is generated by `m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s` (tmp-add_n.s,1.44 KB, text/plain)
2015-05-15 12:07 UTC, ytrezq
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ytrezq 2015-05-15 12:07:34 UTC
Created attachment 403332 [details]
File which is generated by `m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s`

I’m using crossdev but I don’t think it is the origin of the problem


m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DPIC add_n.asm >tmp-add_n.s
 mips32-uclibc-linux-gcc -fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition tmp-add_n.s -fPIC -DPIC -o .libs/add_n.o
tmp-add_n.s: Assembler messages:
tmp-add_n.s:53: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:54: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:56: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:57: Error: illegal operands `and'
tmp-add_n.s:58: Error: illegal operands `beq'
tmp-add_n.s:61: Error: illegal operands `dsubu'
tmp-add_n.s:68: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:69: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:71: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:72: Error: illegal operands `and'
tmp-add_n.s:73: Error: illegal operands `beq'
tmp-add_n.s:76: Error: illegal operands `dsubu'
tmp-add_n.s:78: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:79: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:80: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:81: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:82: Error: illegal operands `sltu'
tmp-add_n.s:83: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:84: Error: illegal operands `sltu'
tmp-add_n.s:85: Error: illegal operands `sd'
tmp-add_n.s:86: Error: illegal operands `or'
tmp-add_n.s:88: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:89: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:90: Error: illegal operands `move'
tmp-add_n.s:91: Error: illegal operands `move'
tmp-add_n.s:92: Error: illegal operands `bne'
tmp-add_n.s:93: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:95: Error: illegal operands `beq'
tmp-add_n.s:98: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:100: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:101: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:102: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:103: Error: illegal operands `sltu'
tmp-add_n.s:104: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:105: Error: illegal operands `sltu'
tmp-add_n.s:106: Error: illegal operands `sd'
tmp-add_n.s:107: Error: illegal operands `or'
tmp-add_n.s:109: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:110: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:111: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:112: Error: illegal operands `sltu'
tmp-add_n.s:113: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:114: Error: illegal operands `sltu'
tmp-add_n.s:115: Error: illegal operands `sd'
tmp-add_n.s:116: Error: illegal operands `or'
tmp-add_n.s:118: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:119: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:120: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:121: Error: illegal operands `sltu'
tmp-add_n.s:122: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:123: Error: illegal operands `sltu'
tmp-add_n.s:124: Error: illegal operands `sd'
tmp-add_n.s:125: Error: illegal operands `or'
tmp-add_n.s:127: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:128: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:129: Error: opcode not supported on this processor: mips32 (mips32) `ld'
tmp-add_n.s:130: Error: illegal operands `sltu'
tmp-add_n.s:131: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:132: Error: illegal operands `sltu'
tmp-add_n.s:133: Error: illegal operands `sd'
tmp-add_n.s:134: Error: illegal operands `or'
tmp-add_n.s:136: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:137: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:139: Error: illegal operands `bne'
tmp-add_n.s:140: Error: opcode not supported on this processor: mips32 (mips32) `daddiu'
tmp-add_n.s:142: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:143: Error: illegal operands `sltu'
tmp-add_n.s:144: Error: opcode not supported on this processor: mips32 (mips32) `daddu'
tmp-add_n.s:145: Error: illegal operands `sltu'
tmp-add_n.s:146: Error: illegal operands `sd'
tmp-add_n.s:148: Error: illegal operands `or'
make[2]: *** [add_n.lo] Erreur 1
make[2]: *** Attente des tâches non terminées....
libtool: compile:  mips32-uclibc-linux-gcc -fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition -c sub.c -o sub.o >/dev/null 2>&1
make[2] : on quitte le répertoire « /usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0-.default/mpn »
make[1]: *** [all-recursive] Erreur 1
make[1] : on quitte le répertoire « /usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0-.default »
make: *** [all] Erreur 2
 [31;01m*[0m ERROR: dev-libs/gmp-6.0.0a::gentoo failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=dev-libs/gmp-6.0.0a::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-libs/gmp-6.0.0a::gentoo'`.
 [31;01m*[0m The complete build log is located at '/usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/temp/environment'.
 [31;01m*[0m Working directory: '/usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0-.default'
 [31;01m*[0m S: '/usr/mips32-uclibc-linux/tmp/portage/dev-libs/gmp-6.0.0a/work/gmp-6.0.0'

output of mips32-uclibc-linux-emerge --info '=dev-libs/gmp-6.0.0a::gentoo'

Portage 2.2.10 (embedded, gcc-4.9.0, unavailable, 3.16.0-rc7-ck2-g9dd5f06-dirty x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.16.0-rc7-ck2-x86_64-Intel-R-_Core-TM-_i5-3450S_CPU_@_2.80GHz-with-gentoo-2.2
KiB Mem:    15854796 total,  11316316 free
KiB Swap:   26675928 total,  26286052 free
Timestamp of tree: Sun, 10 May 2015 21:30:01 +0000
Repositories: gentoo
ACCEPT_KEYWORDS="mips ~mips"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition"
CHOST="mips32-uclibc-linux"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d"
CPPFLAGS="-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition"
CXXFLAGS="-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,--as-needed -Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/mips32-uclibc-linux/packages/"
PORTAGE_CONFIGROOT="/usr/mips32-uclibc-linux/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/mips32-uclibc-linux/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="acl apng bzip2 cscope cytune edit fdformat fixed-point gmp gnutls gpm graphite hardfloat i18n iconv icu idn ipc ipv6 jpeg kdrive less lto lzma make-symlinks math mclib mdev minimal minizip mips mipsfpu multicall multitarget ncurses networking nls nptl oom pcre pgo plugins png python3 savedconfig sharedmem ssl static-libs svg tiff tinfo tls tty-helpers uclibc-compat unicode utils vim-pager wide-unicode wordexp zlib" CURL_SSL="gnutls" ELIBC="uclibc" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="fr" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" USERLAND="GNU" VIDEO_CARDS="fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

output of mips32-uclibc-linux-emerge -pqv '=dev-libs/gmp-6.0.0a::gentoo'

 [33;01m* IMPORTANT:[39;49;00m config file '/usr/mips32-uclibc-linux/etc/portage/package.accept_keywords' needs updating.
 [33;01m*[39;49;00m See the [32mCONFIGURATION FILES[39;49;00m section of the [01memerge[39;49;00m
 [33;01m*[39;49;00m man page to learn how to update config files.
[[32;01mebuild[39;49;00m  [32;01mN[39;49;00m    ] [32;01mdev-libs/gmp-6.0.0a[39;49;00m [32mto /usr/mips32-uclibc-linux/[39;49;00m USE="[31;01mcxx[39;49;00m [31;01mpgo[39;49;00m [31;01mstatic-libs[39;49;00m [34;01m-abi_ppc_32[39;49;00m [34;01m-abi_ppc_64[39;49;00m [34;01m-abi_s390_32[39;49;00m [34;01m-abi_s390_64[39;49;00m [34;01m-doc[39;49;00m" 

[33;01m * IMPORTANT:[39;49;00m 3 news items need reading for repository 'gentoo'.
[33;01m *[39;49;00m Use [32;01meselect news[39;49;00m to read news items.
Comment 1 ytrezq 2015-05-15 20:08:21 UTC
Ok it appears those opcodes come from 64-bits mips
Comment 2 ytrezq 2015-05-15 20:18:48 UTC
Ok not sure if it is really a duplicate of #549592
Comment 3 SpanKY gentoo-dev 2015-05-16 03:41:47 UTC
please fix your tuple & compiler settings, and then see if gmp still fails (see bug 549592 for details)
Comment 4 ytrezq 2015-05-16 18:42:02 UTC
(In reply to SpanKY from comment #3)
> please fix your tuple & compiler settings, and then see if gmp still fails
> (see bug 549592 for details)

Ok, the tuple as nothing to do here, and as I said most packages compile and run find. The opcodes aren’t 64 bits ones, just an error from an help elswhere.

In the beginning, I modidied the ebuild by adding the --disable-assembly option. But after some testing, the problem appeared when using the -mips16 options since mips16 should help to reduce memory usage. 

I thought the -mips16 option was working in a similar way -msseXX on x86. I don’t know if this is the normal behaviour. Indeed, using "-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -pipe -freorder-blocks-and-partition" instead of "-fmodulo-sched -fmodulo-sched-allow-regmoves -Os -mips32 -march=mips32 -mtune=mips32 -membedded-data -mips16 -pipe -freorder-blocks-and-partition" allowed the emerge process to complete successfully.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-05 23:17:24 UTC
I suggest filing an upstream bug and asking if upstream can provide -mips16 function implementation or provide explicit '.nomips16' annotation in generated assembly (that should be enough, right?)