Request 240 was acted upon.
_________________________________________________________________________
URL: https://rt.openpkg.org/id/240
Ticket: [OpenPKG #240]
Subject: rpmtool makes wrong assumption with $isgcc
Requestors: [EMAIL PROTECTED]
Queue: openpkg
Owner: Nobody
Status: new
Transaction: Ticket created by [EMAIL PROTECTED]
Time: Wed Aug 27 09:05:34 2003
_________________________________________________________________________
The following code in rpmtool:
cflags )
tool="$1"
isgcc=no
if [ ".`$tool --version 2>/dev/null | egrep '(2.[7-9]|3.[0-3])'`" !=
. ]; then
isgcc=yes
fi
cflags=''
if [ ".$opt_O" = .yes ]; then
if [ ".$isgcc" = .yes ]; then
cflags="-O2 -pipe"
else
cflags="-O"
fi
fi
echo "x$cflags" | sed -e 's;^x;;'
;;
assumes that when the compiler is 'gcc' that the '-pipe' parameter will
work. However on Compaq Tru64 this doesn't work as the assembler/linker are
the default OS versions, since GNU as/ld don't built on this platform.
During built, the following error will occure 'as: Error: No source or
object files specified on the command line'
Following patch special-cases the cflags for OSF1:
--- /cw/lib/openpkg/rpmtool 2003-08-26 23:18:41.000000000 +0200
+++ rpmtool 2003-08-27 09:02:45.000000000 +0200
@@ -433,7 +433,14 @@
cflags=''
if [ ".$opt_O" = .yes ]; then
if [ ".$isgcc" = .yes ]; then
- cflags="-O2 -pipe"
+ case $platform in
+ *:OSF1:*:* )
+ cflags="-O2"
+ ;;
+ *)
+ cflags="-O2 -pipe"
+ ;;
+ esac
else
cflags="-O"
fi
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Developer Communication List [EMAIL PROTECTED]