fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
80.5k stars 12.74k forks source link

mipsle arch is missing softfloat flag due to Makefile.cross-compiles bug #4175

Closed ddscentral closed 3 weeks ago

ddscentral commented 3 weeks ago

Bug Description

In Makefile.cross-compiles even though both mips and mipsle have softfloat flag, it is only applied for "mips" due to a bug in "if statement.

Line

 elif [ "$${os}" = "linux" ] && [ "$${arch}" = "mips" ] && [ "$${extra}" != "" ] ; then \

should look like this:

 elif [ "$${os}" = "linux" ] && ([ "$${arch}" = "mips" ] || [ "$${arch}" = "mipsle" ]) && [ "$${extra}" != "" ] ; then \

frpc Version

0.57.0

frps Version

0.57.0

System Architecture

linux/mipsel

Configurations

Not applicable

Logs

No response

Steps to reproduce

  1. Run make -f Makefile.cross-compiles
  2. Copy mipsle binary (any frps or frpc) to a MIPS device without a FPU
  3. Binary does not run due to "illegal instruction".

Affected area

ddscentral commented 3 weeks ago

With the line corrected, binaries do run on the device.

fatedier commented 3 weeks ago

Can you submit a PR to fix it?

ddscentral commented 3 weeks ago

Created a PR: https://github.com/fatedier/frp/pull/4176