--- gcc/config/i386v.h 2018/04/24 17:51:35 1.1.1.1 +++ gcc/config/i386v.h 2018/04/24 18:05:20 1.1.1.4 @@ -29,16 +29,14 @@ the Free Software Foundation, 675 Mass A #include "att386.h" -/* By default, target has a 80387. */ - -#define TARGET_DEFAULT 1 - /* Use crt1.o as a startup file and crtn.o as a closing file. */ #define STARTFILE_SPEC \ "%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} crtbegin.o%s\ %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" +/* ??? There is a suggestion that -lg is needed here. + Does anyone know whether this is right? */ #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc crtend.o%s crtn.o%s" /* Specify predefined symbols in preprocessor. */ @@ -56,28 +54,6 @@ the Free Software Foundation, 675 Mass A #undef ASM_FILE_START_1 #define ASM_FILE_START_1(FILE) -/* Machines that use the AT&T assembler syntax - also return floating point values in an FP register. */ -/* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - -#define VALUE_REGNO(MODE) \ - (((MODE) == SFmode || (MODE) == DFmode) ? FIRST_FLOAT_REG : 0) - -/* 1 if N is a possible register number for a function value. */ - -#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (N)== FIRST_FLOAT_REG) - -#if 0 /* This symbol is expected to exist only on BSD, - and besides, it describes the host rather than the target. - It certainly does not belong here. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif -#endif - /* longjmp may fail to restore the registers if called from the same function that called setjmp. To compensate, the compiler avoids putting variables in registers in functions that use both setjmp @@ -96,27 +72,39 @@ the Free Software Foundation, 675 Mass A #undef FRAME_POINTER_REQUIRED #define FRAME_POINTER_REQUIRED \ (current_function_calls_setjmp || current_function_calls_longjmp) + +/* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib. */ +#undef ASM_OUTPUT_LOCAL +#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + do { \ + int align = exact_log2 (ROUNDED); \ + if (align > 2) align = 2; \ + if (TARGET_SVR3_SHLIB) \ + data_section (); \ + else \ + bss_section (); \ + ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ + ASM_OUTPUT_LABEL ((FILE), (NAME)); \ + fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)); \ + } while (0) -/* Define a few machine-specific details - of the implementation of constructors. +/* Define a few machine-specific details of the implementation of + constructors. - CTORS_SECTION_ASM_OP should be defined to concatenate - the macro INIT_SECTION_ASM_OP, a newline, and a push instruction - to push a word containing 0 (or some equivalent of that). + The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN + and CTOR_LIST_END to contribute to the .init section an instruction to + push a word containing 0 (or some equivalent of that). - ASM_OUTPUT_CONSTRUCTOR should be defined - to push the address of the constructor. */ + ASM_OUTPUT_CONSTRUCTOR should be defined to push the address of the + constructor. */ #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP ".section .init,\"x\"" -#define CTORS_SECTION_ASM_OP \ - INIT_SECTION_ASM_OP "\n" \ - "\tpushl $0\n\t" \ - DATA_SECTION_ASM_OP -/* The reason we end with DATA_SECTION_ASM_OP is to prevent the - initial and final table elements (see crtstuff.c) from getting into - the .init section and causing a crash. */ +#define CTOR_LIST_BEGIN \ + asm (INIT_SECTION_ASM_OP); \ + asm ("pushl $0") +#define CTOR_LIST_END CTOR_LIST_BEGIN #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { \