Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909746 - dev-libs/openssl-3.0.9-r1: crossdev: mipsel-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’
Summary: dev-libs/openssl-3.0.9-r1: crossdev: mipsel-unknown-linux-gnu-gcc: error: unr...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-06 01:59 UTC by Aaron D Borden
Modified: 2023-07-06 05:59 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge--info.txt,5.38 KB, text/plain)
2023-07-06 02:01 UTC, Aaron D Borden
Details
mipsel-unknown-linux-gnu-emerge --info (mipsel-unknown-linxu-gnu-emerge--info.txt,4.98 KB, text/plain)
2023-07-06 02:02 UTC, Aaron D Borden
Details
build.log (build.log,14.67 KB, text/x-log)
2023-07-06 02:07 UTC, Aaron D Borden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron D Borden 2023-07-06 01:59:46 UTC
openssl fails to cross-compile using mipsel-unknown-linux-gnu-gcc via crossdev with error:

mipsel-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’

Reproducible: Always

Steps to Reproduce:
1. crossdev --gcc 10.4.1 --libc 2.36 --binutils 2.40-r5 -t mipsel-unknown-linux-gnu
2.  mipsel-unknown-linux-gnu-emerge -v1 openssl
Actual Results:  
openssl configuration detects target linux-x86_64 and fails to compile

> Configuring OpenSSL version 3.0.9 for target linux-x86_64

Expected Results:  
openssl configuration detects linux-mips and compiles successfully.
Comment 1 Aaron D Borden 2023-07-06 02:01:31 UTC
Created attachment 865167 [details]
emerge --info
Comment 2 Aaron D Borden 2023-07-06 02:02:09 UTC
Created attachment 865168 [details]
mipsel-unknown-linux-gnu-emerge --info
Comment 3 Aaron D Borden 2023-07-06 02:07:22 UTC
Created attachment 865169 [details]
build.log
Comment 4 Aaron D Borden 2023-07-06 02:08:32 UTC
I believe this is a regression. I have a MIPS system running openssl-1.1.1l compiled using the same method, so this was working at some point.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-06 02:09:04 UTC
> * Using configuration: (openssl knows best)

We seem to be lacking settings for mipsel in our openssl config files.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-06 02:09:35 UTC
(In reply to Sam James from comment #5)
> > * Using configuration: (openssl knows best)
> 
> We seem to be lacking settings for mipsel in our openssl config files.

Hm, no, we do have:

$ grep -rsin mips
gentoo.config-1.0.2:102:                mips*el*)     machine="generic32 -DL_ENDIAN";;
gentoo.config-1.0.2:103:                mips*)        machine="generic32 -DB_ENDIAN";;
gentoo.config-1.0.4:104:                mips*el*:o32) machine="mips32 -DL_ENDIAN";;
gentoo.config-1.0.4:105:                mips*:o32)    machine="mips32 -DB_ENDIAN";;
gentoo.config-1.0.4:106:                mips*el*:n32) machine="mips64 -DL_ENDIAN";;
gentoo.config-1.0.4:107:                mips*:n32)    machine="mips64 -DB_ENDIAN";;
gentoo.config-1.0.4:108:                mips*el*:n64) machine="mips64 -DL_ENDIAN" system=linux64;;
gentoo.config-1.0.4:109:                mips*:n64)    machine="mips64 -DB_ENDIAN" system=linux64;;

but it's not matching them.
Comment 7 Aaron D Borden 2023-07-06 04:45:14 UTC
Hey Sam, thanks for pointing out the gentoo.config script. I'm using profile `default/linux/mips/23.0/mipsel`, without a specific ABI. Afaik, this is valid, although I'm no expert. I believe this profile does not set an ABI and then gentoo.config fails to match the mips rules.

If I set the profile `default/linux/mips/17.0/mipsel/o32` then openssl compiles correctly.