From 8c2003509eb3ccfbf9c9ce908a3c62c518e7ff0f Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Mon, 12 Apr 2010 18:36:30 +0000 Subject: [PATCH] config.build (alpha*-dec-osf4*): Remove. gcc: * config.build (alpha*-dec-osf4*): Remove. * config.gcc: Remove alpha*-dec-osf4*, alpha-dec-osf5.0* from list of obsolete configurations. (alpha*-dec-osf[45]*): Remove alpha*-dec-osf4*, alpha-dec-osf5.0* support. * config/alpha/t-osf4: Renamed to ... * config/alpha/t-osf5: ... this. * config/alpha/osf.h: Renamed to ... * config/alpha/osf5.h: ... this. Merged old osf5.h contents. Update comments. (ASM_SPEC): Use ASM_OLDAS_SPEC directly. (EXTRA_SPECS): Removed. * doc/install.texi (Specific, alpha*-dec-osf5.1): Renamed to reflect removal of Tru64 UNIX V4.0/V5.0 support. Document that. fixincludes: * inclhack.def (alpha_wchar): Remove. * fixincl.x: Regenerate. * tests/base/wchar.h: Remove. libgcc: * config.host (alpha*-dec-osf[45]*): Removed alpha*-dec-osf4*, alpha-dec-osf5.0* support. From-SVN: r158235 --- fixincludes/ChangeLog | 6 + fixincludes/fixincl.x | 53 +----- fixincludes/inclhack.def | 21 --- fixincludes/tests/base/wchar.h | 15 -- gcc/ChangeLog | 19 ++ gcc/config.build | 7 +- gcc/config.gcc | 24 +-- gcc/config/alpha/osf.h | 240 ------------------------- gcc/config/alpha/osf5.h | 262 +++++++++++++++++++++++++--- gcc/config/alpha/{t-osf4 => t-osf5} | 0 gcc/doc/install.texi | 9 +- libgcc/ChangeLog | 5 + libgcc/config.host | 2 +- 13 files changed, 283 insertions(+), 380 deletions(-) delete mode 100644 fixincludes/tests/base/wchar.h delete mode 100644 gcc/config/alpha/osf.h rename gcc/config/alpha/{t-osf4 => t-osf5} (100%) diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index ee1087058d42..b0b26dfe3fde 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,9 @@ +2010-04-12 Rainer Orth + + * inclhack.def (alpha_wchar): Remove. + * fixincl.x: Regenerate. + * tests/base/wchar.h: Remove. + 2010-04-02 Ralf Wildenhues * aclocal.m4: Regenerate. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index d66766cea2eb..e80d50c5adcc 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Tuesday March 30, 2010 at 09:51:20 PM MEST + * It has been AutoGen-ed Wednesday April 7, 2010 at 05:11:50 PM MEST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Mar 30 21:51:20 MEST 2010 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Apr 7 17:11:50 MEST 2010 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 206 fixup descriptions. + * This file contains 205 fixup descriptions. * * See README for more information. * @@ -1352,43 +1352,6 @@ static const char* apzAlpha_SbrkPatch[] = { "void *sbrk(", (char*)NULL }; -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Wchar fix - */ -tSCC zAlpha_WcharName[] = - "alpha_wchar"; - -/* - * File name selection pattern - */ -tSCC zAlpha_WcharList[] = - "wchar.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_WcharMachs[] = { - "alpha*-dec-osf4*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_WcharSelect0[] = - "#define wcstok wcstok_r"; - -#define ALPHA_WCHAR_TEST_CT 1 -static tTestDesc aAlpha_WcharTests[] = { - { TT_EGREP, zAlpha_WcharSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Wchar - */ -static const char* apzAlpha_WcharPatch[] = { sed_cmd_z, - "-e", "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@", - "-e", "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@", - (char*)NULL }; - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Avoid_Bool_Define fix @@ -8395,9 +8358,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 246 +#define REGEX_COUNT 245 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 206 +#define FIX_COUNT 205 /* * Enumerate the fixes @@ -8434,7 +8397,6 @@ typedef enum { ALPHA_PTHREAD_GCC_FIXIDX, ALPHA_PTHREAD_INIT_FIXIDX, ALPHA_SBRK_FIXIDX, - ALPHA_WCHAR_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX, AVOID_BOOL_TYPE_FIXIDX, AVOID_WCHAR_T_TYPE_FIXIDX, @@ -8767,11 +8729,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_SbrkTests, apzAlpha_SbrkPatch, 0 }, - { zAlpha_WcharName, zAlpha_WcharList, - apzAlpha_WcharMachs, - ALPHA_WCHAR_TEST_CT, FD_MACH_ONLY, - aAlpha_WcharTests, apzAlpha_WcharPatch, 0 }, - { zAvoid_Bool_DefineName, zAvoid_Bool_DefineList, apzAvoid_Bool_DefineMachs, AVOID_BOOL_DEFINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 910b3889270a..4f70a9f3a640 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -793,27 +793,6 @@ fix = { }; -/* - * Change external names of wcstok/wcsftime via asm instead of macros on - * Tru64 UNIX V4.0. - */ -fix = { - hackname = alpha_wchar; - files = wchar.h; - - mach = "alpha*-dec-osf4*"; - select = "#define wcstok wcstok_r"; - sed = "s@#define wcstok wcstok_r@" - "extern wchar_t *wcstok __((wchar_t *, const wchar_t *, " - "wchar_t **)) __asm__(\"wcstok_r\");@"; - sed = "s@#define wcsftime __wcsftime_isoc@" - "extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *" - ", const struct tm *)) __asm__(\"__wcsftime_isoc\");@"; - test_text = "#define wcstok wcstok_r\n" - "#define wcsftime __wcsftime_isoc"; -}; - - /* * For C++, avoid any typedef or macro definition of bool, * and use the built in type instead. diff --git a/fixincludes/tests/base/wchar.h b/fixincludes/tests/base/wchar.h deleted file mode 100644 index 5c0b9dfe86ad..000000000000 --- a/fixincludes/tests/base/wchar.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/wchar.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA_WCHAR_CHECK ) -extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__("wcstok_r"); -extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__("__wcsftime_isoc"); -#endif /* ALPHA_WCHAR_CHECK */ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa98b2eaa221..cfdaa9e8b92f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2010-04-12 Rainer Orth + + * config.build (alpha*-dec-osf4*): Remove. + * config.gcc: Remove alpha*-dec-osf4*, alpha-dec-osf5.0* from list + of obsolete configurations. + (alpha*-dec-osf[45]*): Remove alpha*-dec-osf4*, alpha-dec-osf5.0* + support. + * config/alpha/t-osf4: Renamed to ... + * config/alpha/t-osf5: ... this. + * config/alpha/osf.h: Renamed to ... + * config/alpha/osf5.h: ... this. + Merged old osf5.h contents. + Update comments. + (ASM_SPEC): Use ASM_OLDAS_SPEC directly. + (EXTRA_SPECS): Removed. + * doc/install.texi (Specific, alpha*-dec-osf5.1): Renamed to + reflect removal of Tru64 UNIX V4.0/V5.0 support. + Document that. + 2010-04-12 Rainer Orth * doc/contrib.texi (Contributors, Rainer Orth): Update. diff --git a/gcc/config.build b/gcc/config.build index 0ed87546d806..6c837c3c32f0 100644 --- a/gcc/config.build +++ b/gcc/config.build @@ -1,5 +1,5 @@ # GCC build-specific configuration file. -# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, 2009 +# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. #This file is part of GCC. @@ -51,11 +51,6 @@ build_file_translate= # System-specific settings. case $build in - alpha*-dec-osf4*) - # Some versions of OSF4 (specifically X4.0-9 296.7) have - # a broken tar, so we use cpio instead. - build_install_headers_dir=install-headers-cpio - ;; alpha64-dec-*vms*) build_xm_file="vms/xm-vms.h vms/xm-vms64.h" build_exeext=.exe diff --git a/gcc/config.gcc b/gcc/config.gcc index 119bf0ac645a..a5788653dfc3 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -207,9 +207,7 @@ md_file= # Obsolete configurations. case ${target} in - alpha*-dec-osf4* \ - | alpha*-dec-osf5.0* \ - | mips-sgi-irix5* \ + mips-sgi-irix5* \ | mips-sgi-irix6.[0-4]* \ | *-*-solaris2.7* \ ) @@ -651,7 +649,7 @@ alpha*-*-openbsd*) target_cpu_default="MASK_GAS" tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee" ;; -alpha*-dec-osf[45]*) +alpha*-dec-osf5.1*) if test x$stabs = xyes then tm_file="${tm_file} dbx.h" @@ -661,23 +659,11 @@ alpha*-dec-osf[45]*) 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" + tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf5" + tm_file="${tm_file} alpha/osf5.h" + tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1" extra_headers=va_list.h use_gcc_stdint=provide - case ${target} in - *-*-osf4*) - # Define TARGET_SUPPORT_ARCH except on 4.0a. - case ${target} in - *-*-osf4.0a) ;; - *) tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1" - esac - ;; - *-*-osf5*) - tm_file="${tm_file} alpha/osf5.h" - tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1" - ;; - esac case ${enable_threads} in "" | yes | posix) thread_file='posix' diff --git a/gcc/config/alpha/osf.h b/gcc/config/alpha/osf.h deleted file mode 100644 index a384cc870f31..000000000000 --- a/gcc/config/alpha/osf.h +++ /dev/null @@ -1,240 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, - 2004, 2007, 2009 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -/* As of OSF 4.0, as can subtract adjacent labels. */ - -#undef TARGET_AS_CAN_SUBTRACT_LABELS -#define TARGET_AS_CAN_SUBTRACT_LABELS 1 - -/* The GEM libraries for X_float are present, though not used by C. */ - -#undef TARGET_HAS_XFLOATING_LIBS -#define TARGET_HAS_XFLOATING_LIBS 1 - -/* Names to predefine in the preprocessor for this target machine. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define_std ("unix"); \ - builtin_define_std ("SYSTYPE_BSD"); \ - builtin_define ("_SYSTYPE_BSD"); \ - builtin_define ("__osf__"); \ - builtin_define ("__digital__"); \ - builtin_define ("__arch64__"); \ - builtin_define ("_LONGLONG"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=xpg4"); \ - /* Tru64 UNIX V5 has a 16 byte long \ - double type and requires __X_FLOAT \ - to be defined for . */ \ - if (LONG_DOUBLE_TYPE_SIZE == 128) \ - builtin_define ("__X_FLOAT"); \ - \ - /* Tru64 UNIX V4/V5 provide several ISO C94 \ - features protected by the corresponding \ - __STDC_VERSION__ macro. libstdc++ v3 \ - needs them as well. */ \ - if (c_dialect_cxx ()) \ - builtin_define ("__STDC_VERSION__=199409L"); \ - } while (0) - -/* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4 - instead of PTHREAD_USE_D4 since both have the same effect and the former - doesn't invade the users' namespace. */ - -#undef CPP_SPEC -#define CPP_SPEC \ -"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" - -/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */ - -#define LIB_SPEC \ -"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} %{a:-lprof2} \ - %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc" - -/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are - optimizing, -O1 if we are not. Pass -S to silence `weak symbol - multiply defined' warnings. Pass -shared, -non_shared or - -call_shared as appropriate. Pass -hidden_symbol so that our - constructor and call-frame data structures are not accidentally - overridden. */ -#define LINK_SPEC \ - "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \ - %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \ - %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}" - -#define STARTFILE_SPEC \ - "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" - -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" - -#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" - -/* Tru64 UNIX V5.1 requires a special as flag. Empty by default. */ - -#define ASM_OLDAS_SPEC "" - -/* In OSF/1 v3.2c, the assembler by default does not output file names which - causes mips-tfile to fail. Passing -g to the assembler fixes this problem. - ??? Strictly speaking, we need -g only if the user specifies -g. Passing - it always means that we get slightly larger than necessary object files - if the user does not specify -g. If we don't pass -g, then mips-tfile - will need to be fixed to work in this case. Pass -O0 since some - optimization are broken and don't help us anyway. Pass -nocpp because - there's no point in running CPP on our assembler output. */ -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 -#define ASM_SPEC "%{malpha-as:-g %(asm_oldas) -nocpp %{pg} -O0}" -#else -#define ASM_SPEC "%{!mgas:-g %(asm_oldas) -nocpp %{pg} -O0}" -#endif - -/* Specify to run a post-processor, mips-tfile after the assembler - has run to stuff the ecoff debug information into the object file. - This is needed because the Alpha assembler provides no way - of specifying such information in the assembly file. */ - -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 - -#define ASM_FINAL_SPEC "\ -%{malpha-as: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{,assembler:%i;:%g.s}}}" - -#else -#define ASM_FINAL_SPEC "\ -%{!mgas: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{,assembler:%i;:%g.s}}}" - -#endif - -#undef EXTRA_SPECS -#define EXTRA_SPECS { "asm_oldas", ASM_OLDAS_SPEC } - -/* Indicate that we have a stamp.h to use. */ -#ifndef CROSS_DIRECTORY_STRUCTURE -#define HAVE_STAMP_H 1 -#endif - -/* Attempt to turn on access permissions for the stack. */ - -#define ENABLE_EXECUTE_STACK \ -void \ -__enable_execute_stack (void *addr) \ -{ \ - extern int mprotect (const void *, size_t, int); \ - long size = getpagesize (); \ - long mask = ~(size-1); \ - char *page = (char *) (((long) addr) & mask); \ - char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ - \ - /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \ - if (mprotect (page, end - page, 7) < 0) \ - perror ("mprotect of trampoline code"); \ -} - -/* Digital UNIX V4.0E (1091)/usr/include/sys/types.h 4.3.49.9 1997/08/14 */ -#define SIZE_TYPE "long unsigned int" -#define PTRDIFF_TYPE "long int" - -#define SIG_ATOMIC_TYPE "int" - -#define INT8_TYPE "signed char" -#define INT16_TYPE "short int" -#define INT32_TYPE "int" -#define INT64_TYPE "long int" -#define UINT8_TYPE "unsigned char" -#define UINT16_TYPE "short unsigned int" -#define UINT32_TYPE "unsigned int" -#define UINT64_TYPE "long unsigned int" - -#define INT_LEAST8_TYPE "signed char" -#define INT_LEAST16_TYPE "short int" -#define INT_LEAST32_TYPE "int" -#define INT_LEAST64_TYPE "long int" -#define UINT_LEAST8_TYPE "unsigned char" -#define UINT_LEAST16_TYPE "short unsigned int" -#define UINT_LEAST32_TYPE "unsigned int" -#define UINT_LEAST64_TYPE "long unsigned int" - -#define INT_FAST8_TYPE "signed char" -#define INT_FAST16_TYPE "int" -#define INT_FAST32_TYPE "int" -#define INT_FAST64_TYPE "long int" -#define UINT_FAST8_TYPE "unsigned char" -#define UINT_FAST16_TYPE "unsigned int" -#define UINT_FAST32_TYPE "unsigned int" -#define UINT_FAST64_TYPE "long unsigned int" - -#define INTPTR_TYPE "long int" -#define UINTPTR_TYPE "long unsigned int" - -/* The linker will stick __main into the .init section. */ -#define HAS_INIT_SECTION -#define LD_INIT_SWITCH "-init" -#define LD_FINI_SWITCH "-fini" - -/* Select a format to encode pointers in exception handling data. CODE - is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is - true if the symbol may be affected by dynamic relocations. - - We really ought to be using the SREL32 relocations that ECOFF has, - but no version of the native assembler supports creating such things, - and Compaq has no plans to rectify this. Worse, the dynamic loader - cannot handle unaligned relocations, so we have to make sure that - things get padded appropriately. */ -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - (TARGET_GAS \ - ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \ - : DW_EH_PE_aligned) - -/* This is how we tell the assembler that a symbol is weak. */ - -#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ - do \ - { \ - (*targetm.asm_out.globalize_label) (FILE, NAME); \ - fputs ("\t.weakext\t", FILE); \ - assemble_name (FILE, NAME); \ - if (VALUE) \ - { \ - fputc (' ', FILE); \ - assemble_name (FILE, VALUE); \ - } \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) - -/* Handle #pragma weak and #pragma pack. */ -#define HANDLE_SYSV_PRAGMA 1 - -/* Handle #pragma extern_prefix. Technically only needed for Tru64 5.x, - but easier to manipulate preprocessor bits from here. */ -#define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX 1 diff --git a/gcc/config/alpha/osf5.h b/gcc/config/alpha/osf5.h index facc89e15ad6..406eda4c4f3d 100644 --- a/gcc/config/alpha/osf5.h +++ b/gcc/config/alpha/osf5.h @@ -1,34 +1,116 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on Tru64 5. - Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Definitions of target machine for GNU compiler, for DEC Alpha on + Tru64 UNIX V5.1. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, + 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 + Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - This file is part of GCC. +This file is part of GCC. - GCC is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. - You should have received a copy of the GNU General Public License +You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ -/* Tru64 5.1 uses IEEE QUAD format. */ +/* As of DEC OSF/1 V4.0, as can subtract adjacent labels. */ + +#undef TARGET_AS_CAN_SUBTRACT_LABELS +#define TARGET_AS_CAN_SUBTRACT_LABELS 1 + +/* The GEM libraries for X_float are present, though not used by C. */ + +#undef TARGET_HAS_XFLOATING_LIBS +#define TARGET_HAS_XFLOATING_LIBS 1 + +/* Tru64 UNIX V5.1 uses IEEE QUAD format. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_FPREGS | MASK_LONG_DOUBLE_128) +/* The linker appears to perform invalid code optimizations that result + in the ldgp emitted for the exception_receiver pattern being incorrectly + linked. */ +#undef TARGET_LD_BUGGY_LDGP +#define TARGET_LD_BUGGY_LDGP 1 + +/* Tru64 UNIX V5.1 has the float and long double forms of math functions. */ +#undef TARGET_C99_FUNCTIONS +#define TARGET_C99_FUNCTIONS 1 + +/* Names to predefine in the preprocessor for this target machine. */ + +#define TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("unix"); \ + builtin_define_std ("SYSTYPE_BSD"); \ + builtin_define ("_SYSTYPE_BSD"); \ + builtin_define ("__osf__"); \ + builtin_define ("__digital__"); \ + builtin_define ("__arch64__"); \ + builtin_define ("_LONGLONG"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=xpg4"); \ + /* Tru64 UNIX V5 has a 16 byte long \ + double type and requires __X_FLOAT \ + to be defined for . */ \ + if (LONG_DOUBLE_TYPE_SIZE == 128) \ + builtin_define ("__X_FLOAT"); \ + \ + /* Tru64 UNIX V4/V5 provide several ISO C94 \ + features protected by the corresponding \ + __STDC_VERSION__ macro. libstdc++ v3 \ + needs them as well. */ \ + if (c_dialect_cxx ()) \ + builtin_define ("__STDC_VERSION__=199409L"); \ + } while (0) + +/* Accept DEC C flags for multithreaded programs. We use _PTHREAD_USE_D4 + instead of PTHREAD_USE_D4 since both have the same effect and the former + doesn't invade the users' namespace. */ + +#undef CPP_SPEC +#define CPP_SPEC \ +"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" + +/* Under DEC OSF/1 V4, -p and -pg require -lprof1, and -lprof1 requires + -lpdf. */ + +#define LIB_SPEC \ +"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} %{a:-lprof2} \ + %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc" + +/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are + optimizing, -O1 if we are not. Pass -S to silence `weak symbol + multiply defined' warnings. Pass -shared, -non_shared or + -call_shared as appropriate. Pass -hidden_symbol so that our + constructor and call-frame data structures are not accidentally + overridden. */ +#define LINK_SPEC \ + "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \ + %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \ + %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}" + +#define STARTFILE_SPEC \ + "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" + +#define ENDFILE_SPEC \ + "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" + +#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" + /* In Tru64 UNIX V5.1, Compaq introduced a new assembler (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and 3.04.32) breaks mips-tfile. Passing the undocumented -oldas flag reverts to using the old assembler (/usr/lib/cmplrs/cc/as[01]). - The V5.0 and V5.0A assemblers silently ignore -oldas, so it can be - specified here. - It is clearly not desirable to depend on this undocumented flag, and Compaq wants -oldas to go away soon, but until they have released a new adu that works with mips-tfile, this is the only option. @@ -37,20 +119,150 @@ along with GCC; see the file COPYING3. If not see assembly. This has been fixed in current versions, but adding -c works as expected for all versions. */ -#undef ASM_OLDAS_SPEC #define ASM_OLDAS_SPEC "-oldas -c" -/* The linker appears to perform invalid code optimizations that result - in the ldgp emitted for the exception_receiver pattern being incorrectly - linked. */ -#undef TARGET_LD_BUGGY_LDGP -#define TARGET_LD_BUGGY_LDGP 1 +/* In OSF/1 v3.2c, the assembler by default does not output file names which + causes mips-tfile to fail. Passing -g to the assembler fixes this problem. + ??? Strictly speaking, we need -g only if the user specifies -g. Passing + it always means that we get slightly larger than necessary object files + if the user does not specify -g. If we don't pass -g, then mips-tfile + will need to be fixed to work in this case. Pass -O0 since some + optimization are broken and don't help us anyway. Pass -nocpp because + there's no point in running CPP on our assembler output. */ +#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 +#define ASM_SPEC "%{malpha-as:-g " ASM_OLDAS_SPEC " -nocpp %{pg} -O0}" +#else +#define ASM_SPEC "%{!mgas:-g " ASM_OLDAS_SPEC " -nocpp %{pg} -O0}" +#endif -/* Tru64 v5.1 has the float and long double forms of math functions. */ -#undef TARGET_C99_FUNCTIONS -#define TARGET_C99_FUNCTIONS 1 +/* Specify to run a post-processor, mips-tfile after the assembler + has run to stuff the ecoff debug information into the object file. + This is needed because the Alpha assembler provides no way + of specifying such information in the assembly file. */ + +#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 + +#define ASM_FINAL_SPEC "\ +%{malpha-as: %{!mno-mips-tfile: \ + \n mips-tfile %{v*: -v} \ + %{K: -I %b.o~} \ + %{!K: %{save-temps: -I %b.o~}} \ + %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ + %{,assembler:%i;:%g.s}}}" + +#else +#define ASM_FINAL_SPEC "\ +%{!mgas: %{!mno-mips-tfile: \ + \n mips-tfile %{v*: -v} \ + %{K: -I %b.o~} \ + %{!K: %{save-temps: -I %b.o~}} \ + %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ + %{,assembler:%i;:%g.s}}}" + +#endif + +/* Indicate that we have a stamp.h to use. */ +#ifndef CROSS_DIRECTORY_STRUCTURE +#define HAVE_STAMP_H 1 +#endif + +/* Attempt to turn on access permissions for the stack. */ + +#define ENABLE_EXECUTE_STACK \ +void \ +__enable_execute_stack (void *addr) \ +{ \ + extern int mprotect (const void *, size_t, int); \ + long size = getpagesize (); \ + long mask = ~(size-1); \ + char *page = (char *) (((long) addr) & mask); \ + char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ + \ + /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \ + if (mprotect (page, end - page, 7) < 0) \ + perror ("mprotect of trampoline code"); \ +} + +/* Digital UNIX V4.0E (1091)/usr/include/sys/types.h 4.3.49.9 1997/08/14 */ +#define SIZE_TYPE "long unsigned int" +#define PTRDIFF_TYPE "long int" + +#define SIG_ATOMIC_TYPE "int" + +#define INT8_TYPE "signed char" +#define INT16_TYPE "short int" +#define INT32_TYPE "int" +#define INT64_TYPE "long int" +#define UINT8_TYPE "unsigned char" +#define UINT16_TYPE "short unsigned int" +#define UINT32_TYPE "unsigned int" +#define UINT64_TYPE "long unsigned int" + +#define INT_LEAST8_TYPE "signed char" +#define INT_LEAST16_TYPE "short int" +#define INT_LEAST32_TYPE "int" +#define INT_LEAST64_TYPE "long int" +#define UINT_LEAST8_TYPE "unsigned char" +#define UINT_LEAST16_TYPE "short unsigned int" +#define UINT_LEAST32_TYPE "unsigned int" +#define UINT_LEAST64_TYPE "long unsigned int" + +#define INT_FAST8_TYPE "signed char" +#define INT_FAST16_TYPE "int" +#define INT_FAST32_TYPE "int" +#define INT_FAST64_TYPE "long int" +#define UINT_FAST8_TYPE "unsigned char" +#define UINT_FAST16_TYPE "unsigned int" +#define UINT_FAST32_TYPE "unsigned int" +#define UINT_FAST64_TYPE "long unsigned int" + +#define INTPTR_TYPE "long int" +#define UINTPTR_TYPE "long unsigned int" + +/* The linker will stick __main into the .init section. */ +#define HAS_INIT_SECTION +#define LD_INIT_SWITCH "-init" +#define LD_FINI_SWITCH "-fini" + +/* Select a format to encode pointers in exception handling data. CODE + is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is + true if the symbol may be affected by dynamic relocations. + + We really ought to be using the SREL32 relocations that ECOFF has, + but no version of the native assembler supports creating such things, + and Compaq has no plans to rectify this. Worse, the dynamic loader + cannot handle unaligned relocations, so we have to make sure that + things get padded appropriately. */ +#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ + (TARGET_GAS \ + ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \ + : DW_EH_PE_aligned) + +/* This is how we tell the assembler that a symbol is weak. */ + +#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ + do \ + { \ + (*targetm.asm_out.globalize_label) (FILE, NAME); \ + fputs ("\t.weakext\t", FILE); \ + assemble_name (FILE, NAME); \ + if (VALUE) \ + { \ + fputc (' ', FILE); \ + assemble_name (FILE, VALUE); \ + } \ + fputc ('\n', FILE); \ + } \ + while (0) + +#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) /* The native assembler doesn't understand parenthesis. */ #define TARGET_ASM_OPEN_PAREN "" #define TARGET_ASM_CLOSE_PAREN "" +/* Handle #pragma weak and #pragma pack. */ +#define HANDLE_SYSV_PRAGMA 1 + +/* Handle #pragma extern_prefix. */ +#define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX 1 diff --git a/gcc/config/alpha/t-osf4 b/gcc/config/alpha/t-osf5 similarity index 100% rename from gcc/config/alpha/t-osf4 rename to gcc/config/alpha/t-osf5 diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index c2468dc9e8fc..f20c87c0d947 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -2862,7 +2862,7 @@ information are. @item @uref{#alpha-x-x,,alpha*-*-*} @item -@uref{#alpha-dec-osf,,alpha*-dec-osf*} +@uref{#alpha-dec-osf51,,alpha*-dec-osf5.1} @item @uref{#arc-x-elf,,arc-*-elf} @item @@ -3009,16 +3009,15 @@ shared libraries. @html
@end html -@heading @anchor{alpha-dec-osf}alpha*-dec-osf* +@heading @anchor{alpha-dec-osf51}alpha*-dec-osf5.1 Systems using processors that implement the DEC Alpha architecture and are running the DEC/Compaq/HP Unix (DEC OSF/1, Digital UNIX, or Compaq/HP Tru64 UNIX) operating system, for example the DEC Alpha AXP systems. As of GCC 3.2, versions before @code{alpha*-dec-osf4} are no longer supported. (These are the versions which identify themselves as DEC -OSF/1.) As of GCC 4.5, support for Tru64 UNIX V4.0 and V5.0 has been -obsoleted, but can still be enabled by configuring with -@option{--enable-obsolete}. Support will be removed in GCC 4.6. +OSF/1.) As of GCC 4.6, support for Tru64 UNIX V4.0 and V5.0 has been +removed. On Tru64 UNIX, virtual memory exhausted bootstrap failures may be fixed by reconfiguring Kernel Virtual Memory and Swap parameters diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index f314e158228f..9aa32c093526 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2010-04-12 Rainer Orth + + * config.host (alpha*-dec-osf[45]*): Removed alpha*-dec-osf4*, + alpha-dec-osf5.0* support. + 2010-04-01 Ralf Corsépius * config.host: Add lm32-*-rtems*. diff --git a/libgcc/config.host b/libgcc/config.host index ecfeb554ae35..0e2046686d8a 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -189,7 +189,7 @@ alpha*-*-netbsd*) ;; alpha*-*-openbsd*) ;; -alpha*-dec-osf[45]*) +alpha*-dec-osf5.1*) ;; alpha64-dec-*vms*) tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms" -- 2.39.5