From 270b7bb2dbd3e25c0b7aa6f318f9d83c1ffa7f76 Mon Sep 17 00:00:00 2001 From: Ileana Dumitrescu Date: Thu, 14 Nov 2024 21:05:12 +0200 Subject: [PATCH] ltmain.in: Fix infinite loop for error messages If an invalid argument is passed to options '--mode' or '--reorder-cache' after a valid command, error messages will print infinitely: $ libtool --help --mode=MODE libtool: error: invalid argument 'MODE' for --mode libtool: error: invalid argument 'MODE' for --mode libtool: error: invalid argument 'MODE' for --mode ... * build-aux/ltmain.in: Remove 'break' in case statement to fix infinite loop, and add shift for option '--reorder-cache' to allow more options to be processed. --- build-aux/ltmain.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index 9d891127f..4d7fc293d 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -474,7 +474,6 @@ libtool_parse_options () # Catch anything else as an error *) func_error "invalid argument '$1' for $_G_opt" exit_cmd=exit - break ;; esac shift @@ -512,10 +511,10 @@ libtool_parse_options () *) func_error "invalid argument '$1' for $_G_opt" func_error "absolute paths are required for $_G_opt" exit_cmd=exit - break ;; esac fi + shift ;; --silent|--quiet) -- 2.47.3