[coreboot-gerrit] Patch set updated for coreboot: buildgcc: Fix GNU getopt usage

Nico Huber (nico.h@gmx.de) gerrit at coreboot.org
Tue Sep 20 15:45:06 CEST 2016


Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16679

-gerrit

commit 2d2e06f561feac9e6daa5a0ea621f7a233bf1c38
Author: Nico Huber <nico.huber at secunet.com>
Date:   Tue Sep 20 13:59:38 2016 +0200

    buildgcc: Fix GNU getopt usage
    
    Looks like this never worked correctly: There are three argument formats
    to GNU getopt and none of them matches what we fed it. The missing
    double dash before the `set` arguments proves that we always called it
    with parameters that `getopt` did NOT parse.
    
    Change-Id: Ib8343976ef31774b18567a9fc9745a9f58dd287a
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 util/crossgcc/buildgcc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index c3c8d47..623724e 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -690,8 +690,8 @@ getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c
 getoptbrand="$(getopt -V | sed -e '1!d' -e 's,^\(......\).*,\1,')"
 if [ "${getoptbrand}" = "getopt" ]; then
 	# Detected GNU getopt that supports long options.
-	args=$(getopt -l version,help,clean,directory:,bootstrap,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor Vhcd:bp:l:P:j:D:tSys:un -- "$@")
-	eval set "$args"
+	args=$(getopt -l version,help,clean,directory:,bootstrap,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor -o Vhcd:bp:l:P:j:D:tSys:un -- "$@")
+	eval set -- "$args"
 else
 	# Detected non-GNU getopt
 	args=$(getopt Vhcd:bp:l:P:j:D:tSys:un $*)



More information about the coreboot-gerrit mailing list