From ded942b341d65b8aceeeab6a699554e95d35c1b4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Dec 2005 13:37:36 +0000 Subject: [PATCH] * Make sure that `gcc -v' (i.e., with no other arguments) does the right thing. This is necessary to make libtool detect g++ properly. (Fixes the `libtool: compile: unable to infer tagged configuration' error on FreeBSD when building Berkeley DB 4.4.) svn path=/nixpkgs/trunk/; revision=4370 --- pkgs/build-support/gcc-wrapper/gcc-wrapper.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index d514b57e28a..51916ccdd4a 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -92,6 +92,15 @@ if test "$dontLink" != "1"; then fi fi +# As a very special hack, if the arguments are just `-v', then don't +# add anything. This is to prevent `gcc -v' (which normally prints +# out the version number and returns exit code 0) from printing out +# `No input files specified' and returning exit code 1. +if test "$*" = "-v"; then + extraAfter=() + extraBefore=() +fi + # Optionally print debug info. if test "$NIX_DEBUG" = "1"; then echo "original flags to @gccProg@:" >&2