summaryrefslogtreecommitdiff
path: root/contrib/reghunt/examples/common.config
blob: 7e48e1dc60ffa13e7e00ce435474625d917a40b3 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
. ../gcc-svn-env

test "x${BUILD}" != "x" || BUILD=$REG_DEFAULT_BUILD
export REG_BLD=$BUILD
HOST=$BUILD

test "x${REG_TARGET}" != "x" || REG_TARGET=$HOST
test "x${REG_CONFOPTS}" != "x" || REG_CONFOPTS=""
test "${BUILD}" = "${TARGET}" -a -n "${BINUTILS}" \
  || export PATH=${BINUTILS}:${PATH}

VERBOSITY=1
DATE_IN_MSG=1

export BUGID
export REG_CHANGESET_LIST=`pwd`/${BUGID}.list

########################################################################
# LOW_PATCH and HIGH_PATCH are for reg_search_id.
########################################################################

LOW_PATCH=1
HIGH_PATCH=`wc -l $REG_CHANGESET_LIST | awk '{ print $1 }'`

########################################################################
# REG_NEWMID, REG_FAILLIST, REG_CHECKFAIL, and REG_REPORTFAIL are
# used by reg-hunt and auxiliary scripts to continue a hunt after a
# build failure.  If REG_NEWMID is not defined then they are all
# ignored.
########################################################################

#export REG_NEWMID=${REG_BIN}/reg-newmid
#export REG_FAILLIST=`pwd`/gcc-fails-${BUILD_KIND}
export REG_CHECKFAIL=${REG_BIN}/gcc-svn-checkfail
export REG_RECORDFAIL=${REG_BIN}/gcc-svn-recordfail

########################################################################
# REG_UPDATE, REG_BUILD, and REG_TEST are used by several scripts.
# You can use these or provide your own.
########################################################################

export REG_UPDATE=${REG_BIN}/gcc-svn-update

export REG_BUILD=${REG_BIN}/gcc-build-${BUILD_KIND}
  # Variables defined below are specific to gcc-build-${BUILD_KIND}
  REG_CONFOPTS="$REG_CONFOPTS --build=${BUILD}"
  REG_CONFOPTS="$REG_CONFOPTS --host=${HOST}"
  REG_CONFOPTS="$REG_CONFOPTS --target=${REG_TARGET}"
  if [ -n "$GMP" ]; then
    REG_CONFOPTS="$REG_CONFOPTS --with-gmp=$GMP"
    REG_CONFOPTS="$REG_CONFOPTS --with-mpfr=$GMP"
  fi
  REG_CONFOPTS="$REG_CONFOPTS --disable-libmudflap"
  REG_CONFOPTS="$REG_CONFOPTS --disable-libssa"

  if [ "${BUILD_KIND}" != "simple" -a -n "${BINUTILS}" ]; then
    REG_CONFOPTS="$REG_CONFOPTS --with-as=${BINUTILS}/as"
    REG_CONFOPTS="$REG_CONFOPTS --with-ld=${BINUTILS}/ld"
  fi

  case $LANG in
    c)
      REG_LANGS="c"
      SUFFIX=c
      case $BUILD_KIND in
        simple)    REG_COMPILER=cc1;;
        full)      REG_COMPILER=gcc;;  
        bootstrap) REG_COMPILER=gcc;;  
        *)         msg 0 "unrecognized BUILD_KIND: $BUILD_KIND"; exit 1;
      esac
      ;;
    c++)
      REG_LANGS="c,c++"
      SUFFIX=cc
      case $BUILD_KIND in
        simple)    REG_COMPILER=cc1plus;;
        full)      REG_COMPILER=g++;;  
        bootstrap) REG_COMPILER=g++;;  
        *)         msg 0 "unrecognized BUILD_KIND: $BUILD_KIND"; exit 1;
      esac
      ;;
    f77)
      REG_LANGS="c,f77"
      SUFFIX=f
      case $BUILD_KIND in
        simple)    REG_COMPILER=f771;;
        full)      REG_COMPILER=g77;;  
        bootstrap) REG_COMPILER=g77;;  
        *)         msg 0 "unrecognized BUILD_KIND: $BUILD_KIND"; exit 1;
      esac
      ;;
    f95)
      REG_LANGS="c,f95"
      SUFFIX=f90
      case $BUILD_KIND in
        simple)    REG_COMPILER=f951;;
        full)      REG_COMPILER=gfortran;;  
        bootstrap) REG_COMPILER=gfortran;;  
        *)         msg 0 "unrecognized BUILD_KIND: $BUILD_KIND"; exit 1;
      esac
      ;;
    *) msg 0 "unrecognized LANG: $LANG"; exit 1;;
  esac
  export REG_TARGET
  export REG_CONFOPTS
  export REG_GCCSRC=${REG_SRCDIR}/gcc
  export REG_LANGS
  export REG_COMPILER

export REG_TEST=${REG_BIN}/gcc-test-${BUG_KIND}
  # Variables defined below are specific to gcc-${BUG_KIND}
  case $BUILD_KIND in
    simple) REG_TEST_COMPILER="${REG_OBJDIR}/gcc/${REG_COMPILER} -quiet";;
    *)      REG_TEST_COMPILER="${REG_PREFIX}/bin/${REG_COMPILER}";
            case $BUG_KIND in
	      wrong-code) ;;
	      *)          REG_TEST_COMPILER="$REG_TEST_COMPILER -c";;
            esac;
            ;;
  esac
  export REG_TEST_COMPILER
  export REG_OPTS="${OPTS}"
  export REG_TESTCASE=${BUGID}.${SUFFIX}

  # Return values of the test scripts depend on whether we're looking
  # for the patch that introduced a bug or the one that fixed it.
  case $FIND in
    break) REG_PASS=1; REG_FAIL=0;;
    fix)   REG_PASS=0; REG_FAIL=1;;
    *)     msg 0 "error: unrecognized FIND: $FIND"; exit 1;;
  esac
  REG_ERROR=2
  export REG_PASS REG_FAIL REG_ERROR