[PATCH] openssl: fix compilation

Petr Štetiar ynezz at true.cz
Thu Nov 26 03:26:44 EST 2020


Rosen Penev <rosenp at gmail.com> [2020-11-24 02:04:24]:

Hi,

> It seems the Makefile wrongly picks up dist CC and matches on a clang
> path.
> 
> Fixes:
> 
> mips-openwrt-linux-musl-gcc: error: unrecognized command-line option
> '-Qunused-arguments'

then the fix seems wrong. You should make sure, that proper CC is used.

> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  package/libs/openssl/Makefile                         |  2 +-
>  package/libs/openssl/patches/101-Configure-typo.patch | 11 +++++++++++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/openssl/patches/101-Configure-typo.patch
> 
> diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
> index 9696748106..325c736ed4 100644
> --- a/package/libs/openssl/Makefile
> +++ b/package/libs/openssl/Makefile
> @@ -11,7 +11,7 @@ PKG_NAME:=openssl
>  PKG_BASE:=1.1.1
>  PKG_BUGFIX:=h
>  PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
>  PKG_USE_MIPS16:=0
>  ENGINES_DIR=engines-1.1
>  
> diff --git a/package/libs/openssl/patches/101-Configure-typo.patch b/package/libs/openssl/patches/101-Configure-typo.patch
> new file mode 100644
> index 0000000000..2a2344ff82
> --- /dev/null
> +++ b/package/libs/openssl/patches/101-Configure-typo.patch
> @@ -0,0 +1,11 @@
> +--- a/Configure
> ++++ b/Configure
> +@@ -1444,7 +1444,7 @@ if (!$disabled{asm} && !$predefined_C{__MACH__} && $^O ne 'VMS') {
> +         # but it apparently recognizes the option in question on all
> +         # supported platforms even when it's meaningless. In other words
> +         # probe would fail, but probed option always accepted...
> +-        push @{$config{cflags}}, "-Wa,--noexecstack", "-Qunused-arguments";
> ++        push @{$config{cflags}}, "-Wa,--noexecstack";
> +     } else {
> +         my $cc = $config{CROSS_COMPILE}.$config{CC};
> +         open(PIPE, "$cc -Wa,--help -c -o null.$$.o -x assembler /dev/null 2>&1 |");



More information about the openwrt-devel mailing list