make.sh: Update check for static linked qemu files

Message ID 20221128132415.1572624-1-adolf.belka@ipfire.org
State Accepted
Commit 1985774f80b285b26e1bc6264e8e8724fc7afb91
Headers
Series make.sh: Update check for static linked qemu files |

Commit Message

Adolf Belka Nov. 28, 2022, 1:24 p.m. UTC
  - In Arch Linux the file -L command comes up with "static-pie linked" instead of
   "statically linked"
- This patch makes the grep look for either one of those strings.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 make.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Nov. 28, 2022, 1:29 p.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 28 Nov 2022, at 13:24, Adolf Belka <adolf.belka@ipfire.org> wrote:
> 
> - In Arch Linux the file -L command comes up with "static-pie linked" instead of
>   "statically linked"
> - This patch makes the grep look for either one of those strings.
> 
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> make.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/make.sh b/make.sh
> index c0d1f1d2c..e214fdf3e 100755
> --- a/make.sh
> +++ b/make.sh
> @@ -910,7 +910,7 @@ qemu_find_build_helper_name() {
> file_is_static() {
> local file="${1}"
> 
> - file -L "${file}" 2>/dev/null | grep -q "statically linked"
> + file -L "${file}" 2>/dev/null | grep -q -e "statically linked" -e "static-pie linked"
> }
> 
> update_language_list() {
> -- 
> 2.38.1
>
  

Patch

diff --git a/make.sh b/make.sh
index c0d1f1d2c..e214fdf3e 100755
--- a/make.sh
+++ b/make.sh
@@ -910,7 +910,7 @@  qemu_find_build_helper_name() {
 file_is_static() {
 	local file="${1}"
 
-	file -L "${file}" 2>/dev/null | grep -q "statically linked"
+	file -L "${file}" 2>/dev/null | grep -q -e "statically linked" -e "static-pie linked"
 }
 
 update_language_list() {