summaryrefslogtreecommitdiff
path: root/dev-lang/cxx/files/create-comp-config.patch
blob: 0859ce60f11826d3876af47f24d8ebd6e614a409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- usr/lib/compaq/cxx-6.5.9.31/alpha-linux/bin/create-comp-config.sh.old	2008-04-13 21:44:43.000000000 -0400
+++ usr/lib/compaq/cxx-6.5.9.31/alpha-linux/bin/create-comp-config.sh	2008-04-13 21:55:51.000000000 -0400
@@ -344,10 +344,10 @@
   fi
 fi
 
-if [ ! -r "$GCC_PATH/specs" ]; then
-  echo "Error: Unable to find GCC at $GCC_PATH. GCC must be installed." 1>&2
-  aborting
-fi
+#if [ ! -r "$GCC_PATH/specs" ]; then
+#  echo "Error: Unable to find GCC at $GCC_PATH. GCC must be installed." 1>&2
+#  aborting
+#fi
 
 #
 # What header and lib dirs should we be using? The ones that the specified
@@ -356,7 +356,7 @@
 PGM="int main(int argc, char **argv) {return 0;}"
 echo "$PGM" > /tmp/${PREFIX}_install$$.c
 GCC_VER=`basename $GCC_PATH`
-env -i PATH=$PATH gcc -v -V $GCC_VER /tmp/${PREFIX}_install$$.c \
+env -i PATH=$PATH gcc -V $GCC_VER -v /tmp/${PREFIX}_install$$.c \
            -o /tmp/${PREFIX}_install$$ > /tmp/${PREFIX}_install$$.log 2>&1 || {
     cat - /tmp/${PREFIX}_install$$.log <<- EOF 1>&2
 	Error: gcc -V $GCC_VER failed to compile and link "$PGM".
@@ -366,8 +366,17 @@
 }
 #
 # Get the list of include directories from the list displayed by gcc -v
+# Sort gcc-lib paths last.
 #
-USR_DIST_INC=`sed -n -e '1,/^\#include <...>/d' -e '/^End of search list/q' -e '/^/p' /tmp/${PREFIX}_install$$.log`
+USR_DIST_INC=`
+    sed -n \
+       -e '1,/^\#include <...>/d' \
+       -e '/^End of search list/q' \
+       -e '/gcc-lib/!p' /tmp/${PREFIX}_install$$.log;
+    sed -n \
+       -e '1,/^\#include <...>/d' \
+       -e '/^End of search list/q' \
+       -e '/gcc-lib/p' /tmp/${PREFIX}_install$$.log`
 
 # Get the name of the linker command (ld or collect2), and library directories
 # by examining the way gcc invoked the linker
@@ -529,10 +538,10 @@
   PROD_NAME="C"
 fi
 
-CCC_ROOT=${CPQ_COMP_ROOT}/usr/lib/compaq/${CCC_VERSION}/alpha-linux
+CCC_ROOT=${CPQ_COMP_ROOT}/usr/lib/compaq/${CCC_VERSION%*-1}/alpha-linux
 
 # Put ccc rpm kit version in bin/.version file for use by ccc -V;
-  echo "Installed as ${CCC_VERSION}" > ${CCC_ROOT}/bin/.version
+  echo "Installed as ${CCC_VERSION%*-1}" > ${CCC_ROOT}/bin/.version
 
 # Put linux distribution identification info in bin/.version file for use 
 # by ccc -V;