Mercurial > hg > CbC > CbC_gcc
diff gcc/config/i386/freebsd.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
line wrap: on
line diff
--- a/gcc/config/i386/freebsd.h Sun Aug 21 07:07:55 2011 +0900 +++ b/gcc/config/i386/freebsd.h Fri Oct 27 22:46:09 2017 +0900 @@ -1,6 +1,5 @@ /* Definitions for Intel 386 running FreeBSD with ELF format - Copyright (C) 1996, 2000, 2002, 2004, 2007, 2010 - Free Software Foundation, Inc. + Copyright (C) 1996-2017 Free Software Foundation, Inc. Contributed by Eric Youngdale. Modified for stabs-in-ELF by H.J. Lu. Adapted from GNU/Linux version by John Polstra. @@ -23,8 +22,6 @@ <http://www.gnu.org/licenses/>. */ -#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); - /* Override the default comment-starter of "/". */ #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" @@ -62,28 +59,15 @@ #define SUBTARGET_EXTRA_SPECS \ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } -/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add - the magical crtbegin.o file (see crtstuff.c) which provides part - of the support for getting C++ file-scope static object constructed - before entering `main'. */ - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC \ - "%{!shared: \ - %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ - %{!p:%{profile:gcrt1.o%s} \ - %{!profile:crt1.o%s}}}} \ - crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" +/* Use the STARTFILE_SPEC from config/freebsd-spec.h. */ + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC FBSD_STARTFILE_SPEC -/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on - the magical crtend.o file (see crtstuff.c) which provides part of - the support for getting C++ file-scope static object constructed - before entering `main', followed by a normal "finalizer" file, - `crtn.o'. */ +/* Use the ENDFILE_SPEC from config/freebsd-spec.h. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" +#undef ENDFILE_SPEC +#define ENDFILE_SPEC FBSD_ENDFILE_SPEC /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support for the special GCC options -static and -shared, which allow us to @@ -114,11 +98,21 @@ #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN #undef ASM_OUTPUT_MAX_SKIP_ALIGN -#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \ - if ((LOG) != 0) { \ - if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ - else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ - } +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ + do { \ + if ((LOG) != 0) { \ + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ + else { \ + fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ + /* Make sure that we have at least 8 byte alignment if > 8 byte \ + alignment is preferred. */ \ + if ((LOG) > 3 \ + && (1 << (LOG)) > ((MAX_SKIP) + 1) \ + && (MAX_SKIP) >= 7) \ + fputs ("\t.p2align 3\n", (FILE)); \ + } \ + } \ + } while (0) #endif /* Don't default to pcc-struct-return, we want to retain compatibility with @@ -134,16 +128,10 @@ #undef TARGET_96_ROUND_53_LONG_DOUBLE #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) -/* Put all *tf routines in libgcc. */ -#undef LIBGCC2_HAS_TF_MODE -#define LIBGCC2_HAS_TF_MODE 1 -#define LIBGCC2_TF_CEXT q -#define TF_SIZE 113 - /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 -/* Support for i386 has been removed from FreeBSD 6.0 onward. */ -#if FBSD_MAJOR >= 6 -#define SUBTARGET32_DEFAULT_CPU "i486" -#endif +#define SUBTARGET32_DEFAULT_CPU "i586" + +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack +