llvm.org GIT mirror llvm / 05a5c10
Remove old hack for compiling with gcc-4.0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140573 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 7 years ago
1 changed file(s) with 9 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
141141 LLVM_VERSION="$LLVM_SUBMIT_VERSION-$LLVM_SUBMIT_SUBVERSION"
142142 fi
143143
144 GCC_VER=`cc --version 2>/dev/null | sed 1q`
145
146 if echo "$GCC_VER" | grep GCC > /dev/null; then
147 GCC_VER=`echo $GCC_VER | sed -e 's/.*(GCC) \([0-9.][0-9.]*\).*/\1/'`
148 MAJ_VER=`echo $GCC_VER | sed 's/\..*//'`
149 MIN_VER=`echo $GCC_VER | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
150 fi
151
152 JOBS_FLAG=""
153
154 # Note: If compiling with GCC 4.0, don't pass the -jN flag. Building universal
155 # already has parallelism and we don't want to make the builders hit swap by
156 # firing off too many gccs at the same time.
157 if [ "x$MAJ_VER" != "x4" -o "x$MIN_VER" != "x0" ]; then
158 # Figure out how many make processes to run.
159 SYSCTL=`sysctl -n hw.activecpu`
160
161 # sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
162 # Builders can default to 2, since even if they are single processor,
163 # nothing else is running on the machine.
164 if [ -z "$SYSCTL" ]; then
165 SYSCTL=2
166 fi
167
168 JOBS_FLAG="-j $SYSCTL"
169 fi
144 # Figure out how many make processes to run.
145 SYSCTL=`sysctl -n hw.activecpu`
146 # sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
147 # Builders can default to 2, since even if they are single processor,
148 # nothing else is running on the machine.
149 if [ -z "$SYSCTL" ]; then
150 SYSCTL=2
151 fi
152 JOBS_FLAG="-j $SYSCTL"
170153
171154 make $JOBS_FLAG $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$HOSTS" \
172155 UNIVERSAL_SDK_PATH=$SDKROOT \