branch: master commit 270b7bb2dbd3e25c0b7aa6f318f9d83c1ffa7f76 Author: Ileana Dumitrescu <ileanadumitresc...@gmail.com> AuthorDate: Thu Nov 14 21:05:12 2024 +0200
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 9d891127..4d7fc293 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)