aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index 64999d034ab..74dd86eeead 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -4361,6 +4361,26 @@ if [ ! -f Makefile.in ]; then
echo "source ${srcdir}/.gdbinit" >> .gdbinit
fi
+# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
+sched_prefix=
+sched_cflags=
+if [[ x$enable_haifa = xyes ]]; then
+ echo "Using the Haifa scheduler."
+ sched_prefix=haifa-
+ sched_cflags=-DHAIFA
+fi
+
+
+if [[ x$enable_haifa != x ]]; then
+ # Explicitly remove files that need to be recompiled for the Haifa scheduler.
+ for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
+ if [ -f $x ]; then
+ echo "Removing $x"
+ rm -f $x
+ fi
+ done
+fi
+
# Process the language and host/target makefile fragments.
${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
@@ -4602,6 +4622,8 @@ s%@CC@%$CC%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CPP@%$CPP%g
s%@manext@%$manext%g
+s%@sched_prefix@%$sched_prefix%g
+s%@sched_cflags@%$sched_cflags%g
s%@objext@%$objext%g
s%@subdirs@%$subdirs%g
s%@all_languages@%$all_languages%g