Re: Help needed for installing gcc 4.0.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



?? kirjoitti:
Thanks for Kai Ruottu's detailed explaination. The method of adding a new target
template seems too professional for me.
Maybe so, therefore here is the diff for the new 'alpha*-dec-osf*' target/host template in 'gcc-4.0.3/gcc/config.gcc' :

----------------------------------- clip ----------------------------------------
*** config.gcc.orig 2005-08-09 13:57:04.000000000 +0300
--- config.gcc 2006-06-20 11:35:54.139869176 +0300
***************
*** 592,598 ****
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee"
;;
! alpha*-dec-osf[45]*)
if test x$stabs = xyes
then
tm_file="${tm_file} dbx.h"
--- 592,598 ----
target_cpu_default="MASK_GAS"
tmake_file="alpha/t-alpha alpha/t-ieee"
;;
! alpha*-dec-osf*)
if test x$stabs = xyes
then
tm_file="${tm_file} dbx.h"
***************
*** 602,612 ****
extra_passes="mips-tfile mips-tdump"
fi
use_collect2=yes
! tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
! tm_file="${tm_file} alpha/osf.h"
extra_headers=va_list.h
case ${target} in
*-*-osf4*)
# Set target_cpu_default except on 4.0a.
case ${target} in
*-*-osf4.0a) ;;
--- 602,619 ----
extra_passes="mips-tfile mips-tdump"
fi
use_collect2=yes
! tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm"
extra_headers=va_list.h
case ${target} in
+ *-*-osf1*)
+ tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
+ ;;
+ *-*-osf[23]*)
+ tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
+ ;;
*-*-osf4*)
+ tm_file="${tm_file} alpha/osf.h"
+ tmake_file="$tmake_file alpha/t-osf4"
# Set target_cpu_default except on 4.0a.
case ${target} in
*-*-osf4.0a) ;;
***************
*** 614,620 ****
esac
;;
*-*-osf5*)
! tm_file="${tm_file} alpha/osf5.h"
target_cpu_default=MASK_SUPPORT_ARCH
;;
esac
--- 621,628 ----
esac
;;
*-*-osf5*)
! tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
! tmake_file="$tmake_file alpha/t-osf4"
target_cpu_default=MASK_SUPPORT_ARCH
;;
esac
----------------------------------- clip ----------------------------------------

The extra 'alpha/osf12.h' and 'alpha/osf2or3.h' config headers must be copied from the gcc-3.2.3 into gcc-4.0.3. And after that you could try to configure and build the
'alpha-dec-osf1' targeted GCC. And then "see from where the smoke rises"...

The previous was only a quick edit and maybe something was forgotten. The goal was that the earlier 'osf[45]' support would remain as it was, but the new 'osf[1-3]'
"support" would be added by simple "cut and paste" methods...

I really don't know how radical changes there could be between OSF1 - OSF[45] and if they could spoil the previous simple scheme. The real "professionals" could tell it but it is however easy to see what happens if one tries to build GCC for OSF1.... The previous only lets the target name 'alpha-dec-osf1' being accepted and tried.

With the 'alpha/osf2or3.h' I did some editing because trying a crosscompiler, the
'real code' in it was made to be :

----------------------------------- clip ----------------------------------------
/* In OSF 2 or 3, linking with -lprof1 doesn't require -lpdf. */

#undef LIB_SPEC
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc"

/* As of OSF 3.2, as still can't subtract adjacent labels. */
/* #undef TARGET_AS_CAN_SUBTRACT_LABELS */
/* #define TARGET_AS_CAN_SUBTRACT_LABELS 0 */

/* The frame unwind data requires the ability to subtract labels. */
/* #undef DWARF2_UNWIND_INFO */
/* #define DWARF2_UNWIND_INFO 0 */
----------------------------------- clip ----------------------------------------

The 'alpha/alpha.h' seemed to define the first commented thing as 'TARGET_GAS', ie.
if using GNU as, "TARGET_AS_CAN_SUBTRACT_LABELS" is true... Maybe the latter
should be defined similarly. So I expected these already being defined "right"....

Okeydokey, my own try stopped with :

/data1/home/src/gcc-4.0.3/build/gcc/xgcc -B/data1/home/src/gcc-4.0.3/build/gcc/-B/usr/local/alpha-dec-osf1/bin/ -B/usr/local/alpha-dec-osf1/lib/ -isystem /usr/local/alpha-dec-osf1/include -isystem /usr/local/alpha-dec-osf1/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -pthread -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -frandom-seed=gcc-crtfastmath -c \
-o crtfastmath.o ../../gcc/config/alpha/crtfastmath.c
/tmp/ccJKlMCx.s: Assembler messages:
/tmp/ccJKlMCx.s:34: Fatal error: unhandled relocation type (null)
make[1]: *** [crtfastmath.o] Error 1
make[1]: Leaving directory `/data1/home/src/gcc-4.0.3/build/gcc'


The binutils used were "2.14.90.0.8 20040114". Continuing my try after updating
these old ones into "2.16.91" or something a little newer ones...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux