buildgcc: improve portability
authorJonathan A. Kollasch <jakllsch@kollasch.net>
Thu, 11 Aug 2011 19:44:55 +0000 (14:44 -0500)
committerPatrick Georgi <patrick@georgi-clan.de>
Fri, 12 Aug 2011 07:24:50 +0000 (09:24 +0200)
`cp --remove-destination` isn't as portable as `rm -f` and `cp`.

Change-Id: Ib05bfc121f7a0b467f8104920e14fbd02191585f
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-on: http://review.coreboot.org/150
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
util/crossgcc/buildgcc

index e97a65185182d4142a6f0c1e2d7a4746a148aed9..e58b23ed455ac804e9201279fad82391bd4053af 100755 (executable)
@@ -463,7 +463,8 @@ printf "Building IASL ${IASL_VERSION} ... "
        rm -f .failed
        CFLAGS="$HOSTCFLAGS"
        $MAKE || touch .failed
        rm -f .failed
        CFLAGS="$HOSTCFLAGS"
        $MAKE || touch .failed
-       cp --remove-destination iasl* $DESTDIR$TARGETDIR/bin || touch .failed
+       rm -f $DESTDIR$TARGETDIR/bin/iasl || touch .failed
+       cp iasl $DESTDIR$TARGETDIR/bin || touch .failed
        if [ ! -f .failed ]; then touch .success; fi
 ) &> $IASL_DIR/compiler/crossgcc-build.log
 test -r $IASL_DIR/compiler/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"
        if [ ! -f .failed ]; then touch .success; fi
 ) &> $IASL_DIR/compiler/crossgcc-build.log
 test -r $IASL_DIR/compiler/.failed && printf "${RED}failed${NC}\n" || printf "${green}ok${NC}\n"