This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
2.2.5 compile problem. fix included
- From: Urs Thuermann <urs at isnogud dot escape dot de>
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Date: 01 Mar 2002 09:30:58 +0100
- Subject: 2.2.5 compile problem. fix included
- Reply-to: glibc-linux at ricardo dot ecn dot wfu dot edu
When compiling glibc-2.2.5 the C preprocessor is not found when
calling glibc-2.2.5/scripts/cpp. This is because the return code of a
shell pipe is the return code of its last command, so that the shell
script does not notice when `type cpp` fails.
The following patch fixes the problem:
diff -ru glibc-2.2.5/scripts/cpp glibc/scripts/cpp
--- glibc-2.2.5/scripts/cpp Fri Nov 2 02:07:18 2001
+++ glibc/scripts/cpp Fri Mar 1 06:51:44 2002
@@ -1,8 +1,10 @@
#! /bin/sh
cpp=`which cpp 2>/dev/null`
if test $? -ne 0; then
- cpp=`type cpp 2>/dev/null | awk '{ print $NF }'`
- if test $? -ne 0; then
+ cpp=`type cpp 2>/dev/null`
+ if test $? -eq 0; then
+ cpp=`echo $cpp | awk '{ print $NF }'`
+ else
cpp=`gcc -print-file-name=cpp 2>/dev/null`
if test $? -ne 0; then
if test -x /lib/cpp; then
urs