Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728420 - dev-ruby/x25519-1.0.8 build failure: powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi’
Summary: dev-ruby/x25519-1.0.8 build failure: powerpc64-unknown-linux-gnu-gcc: error: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 728064
  Show dependency tree
 
Reported: 2020-06-15 20:31 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-06-21 07:48 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-15 20:31:36 UTC
"""
 * Running compile phase for ruby25 ...
make -j13 -l12 V=1 -Cext/x25519_precomputed
make: Entering directory '/dev/shm/portage/dev-ruby/x25519-1.0.8/work/ruby25/x25519-1.0.8/ext/x25519_precomputed'
powerpc64-unknown-linux-gnu-gcc -I. -I/usr/include/ruby-2.5.0/powerpc64-linux -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I.   -fPIC -O2 -pipe -fdiagnostics-show-option
-frecord-gcc-switches -fno-strict-aliasing -fPIC -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native  -o cputest.o -c cputest.c
powerpc64-unknown-linux-gnu-gcc -I. -I/usr/include/ruby-2.5.0/powerpc64-linux -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I.   -fPIC -O2 -pipe -fdiagnostics-show-option
-frecord-gcc-switches -fno-strict-aliasing -fPIC -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native  -o fp25519_x64.o -c fp25519_x64.c
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi2’
powerpc64-unknown-linux-gnu-gcc -I. -I/usr/include/ruby-2.5.0/powerpc64-linux -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I.   -fPIC -O2 -pipe -fdiagnostics-show-option
-frecord-gcc-switches -fno-strict-aliasing -fPIC -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native  -o x25519_precomputed.o -c x25519_precomputed.c
powerpc64-unknown-linux-gnu-gcc -I. -I/usr/include/ruby-2.5.0/powerpc64-linux -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I.   -fPIC -O2 -pipe -fdiagnostics-show-option
-frecord-gcc-switches -fno-strict-aliasing -fPIC -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native  -o x25519_x64.o -c x25519_x64.c
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-march=native’; did you mean ‘-mcpu=native’?
make: *** [Makefile:243: cputest.o] Error 1
make: *** Waiting for unfinished jobs....
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi2’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi2’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-mbmi2’
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-march=native’; did you mean ‘-mcpu=native’?
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-march=native’; did you mean ‘-mcpu=native’?
make: *** [Makefile:243: fp25519_x64.o] Error 1
powerpc64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-march=native’; did you mean ‘-mcpu=native’?
"""
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-15 20:33:51 UTC
Seems to come from:

all/x25519-1.0.8/ext/x25519_precomputed/extconf.rb:
  $CFLAGS << " -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native"
ruby25/x25519-1.0.8/ext/x25519_precomputed/extconf.rb:
  $CFLAGS << " -Wall -O3 -pedantic -std=c99 -mbmi -mbmi2 -march=native -mtune=native"
Comment 2 Larry the Git Cow gentoo-dev 2020-06-21 07:48:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eea031d253fac214034a2b18e2ee16d4c3295a14

commit eea031d253fac214034a2b18e2ee16d4c3295a14
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2020-06-21 07:47:55 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2020-06-21 07:48:06 +0000

    dev-ruby/x25519: precomputed impl only works on amd64
    
    The precomputed implementation only works on amd64, so avoid it
    on other arches and let them fall back to the unoptimized reference
    implementation.
    
    Closes: https://bugs.gentoo.org/728420
    Closes: https://bugs.gentoo.org/728888
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-ruby/x25519/x25519-1.0.8.ebuild | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)