This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix Tru64 UNIX bootstrap
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Mar 2005 19:50:29 +0100 (MET)
- Subject: PATCH: Fix Tru64 UNIX bootstrap
Current mainline fails to bootstrap on Tru64 UNIX V5.1B:
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: `MASK_SUPPORT_ARCH' undeclared here (not in a function)
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: initializer element is not constant
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: (near initialization for `targetm.default_target_flags')
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: initializer element is not constant
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: (near initialization for `targetm.calls')
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: initializer element is not constant
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: error: (near initialization for `targetm.cxx')
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: warning: missing initializer
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:10208: warning: (near initialization for `targetm.default_target_flags')
make[2]: *** [alpha.o] Error 1
This happens because while config.gcc still uses MASK_SUPPORT_ARCH, the
alpha.opt rewrite removed the definition of that target flag. Instead,
this patch uses tm_defines in config.gcc to override the default definition
of TARGET_SUPPORT_ARCH in alpha.h (which is 0 on Tru64 UNIX where
HAVE_AS_EXPLICIT_RELOCS is undefined).
With that change, mainline bootstrapped successfully on alpha-dec-osf5.1b
(all languages except Ada, I've to try that separately) after working
around PR libgcj/20155.
There were many unaligned access warnings during the bootstrap, which I'll
investigate separately.
Besides, test results are terrible:
http://gcc.gnu.org/ml/gcc-testresults/2005-03/msg01509.html
but this seems due to a few definitions missing from gthr-posix.c.
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Mon Mar 21 17:53:42 2005 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config.gcc (alpha*-dec-osf[45]*): Remove target_cpu_default.
Define TARGET_SUPPORT_ARCH except on Tru64 UNIX V4.0A.
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.524
diff -u -p -r1.524 config.gcc
--- config.gcc 19 Mar 2005 20:19:03 -0000 1.524
+++ config.gcc 22 Mar 2005 18:42:58 -0000
@@ -592,15 +592,15 @@ alpha*-dec-osf[45]*)
extra_headers=va_list.h
case ${target} in
*-*-osf4*)
- # Set target_cpu_default except on 4.0a.
+ # Define TARGET_SUPPORT_ARCH except on 4.0a.
case ${target} in
*-*-osf4.0a) ;;
- *) target_cpu_default=MASK_SUPPORT_ARCH
+ *) tm_defines="TARGET_SUPPORT_ARCH=1"
esac
;;
*-*-osf5*)
tm_file="${tm_file} alpha/osf5.h"
- target_cpu_default=MASK_SUPPORT_ARCH
+ tm_defines="TARGET_SUPPORT_ARCH=1"
;;
esac
case ${enable_threads} in