add back in the old NetBSD changes. Also, add in a PIC GOT
offset fix from the snapshot.
This commit is contained in:
parent
f502d8c9f4
commit
fea06d4c21
6
gnu/dist/gcc/config/arm/arm.c
vendored
6
gnu/dist/gcc/config/arm/arm.c
vendored
@ -305,12 +305,14 @@ arm_override_options ()
|
||||
if (flag_pic && ! TARGET_APCS_STACK)
|
||||
arm_pic_register = 10;
|
||||
|
||||
#if 0 /* XXX this warning + -Werror causes lossage with NetBSD. -- cgd */
|
||||
/* Well, I'm about to have a go, but pic is NOT going to be compatible
|
||||
with APCS reentrancy, since that requires too much support in the
|
||||
assembler and linker, and the ARMASM assembler seems to lack some
|
||||
required directives. */
|
||||
if (flag_pic)
|
||||
warning ("Position independent code not supported. Ignored");
|
||||
#endif
|
||||
|
||||
if (TARGET_APCS_FLOAT)
|
||||
warning ("Passing floating point arguments in fp regs not yet supported");
|
||||
@ -1294,10 +1296,12 @@ arm_finalize_pic ()
|
||||
l1 = gen_label_rtx ();
|
||||
|
||||
global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "_GLOBAL_OFFSET_TABLE_");
|
||||
/* The PC contains 'dot'+8, but the label L1 is on the next
|
||||
instruction, so the offset is only 'dot'+4. */
|
||||
pic_tmp = gen_rtx (CONST, VOIDmode,
|
||||
gen_rtx (PLUS, Pmode,
|
||||
gen_rtx (LABEL_REF, VOIDmode, l1),
|
||||
GEN_INT (8)));
|
||||
GEN_INT (4)));
|
||||
pic_tmp2 = gen_rtx (CONST, VOIDmode,
|
||||
gen_rtx (PLUS, Pmode,
|
||||
global_offset_table,
|
||||
|
2
gnu/dist/gcc/config/arm/arm.h
vendored
2
gnu/dist/gcc/config/arm/arm.h
vendored
@ -2024,7 +2024,7 @@ char *output_mov_long_double_arm_from_fpu (/* struct rtx_def ** */);
|
||||
char *output_mov_long_double_arm_from_arm (/* struct rtx_def ** */);
|
||||
char *output_mov_double_fpu_from_arm (/* struct rtx_def ** */);
|
||||
char *output_mov_double_arm_from_fpu (/* struct rtx_def ** */);
|
||||
char *output_mov_double (/* struct rtx_def ** */);
|
||||
char *output_move_double (/* struct rtx_def ** */);
|
||||
char *output_mov_immediate (/* struct rtx_def ** */);
|
||||
char *output_add_immediate (/* struct rtx_def ** */);
|
||||
char *arithmetic_instr (/* struct rtx_def *, int */);
|
||||
|
51
gnu/dist/gcc/config/arm/netbsd.h
vendored
51
gnu/dist/gcc/config/arm/netbsd.h
vendored
@ -36,8 +36,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
/* ARM6 family default cpu. */
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
/* Default is to use APCS-32 mode. */
|
||||
#define TARGET_DEFAULT ARM_FLAG_APCS_32
|
||||
/* Default is to use soft float and APCS-32 mode. */
|
||||
#if 0 /* XXX soft float doesn't seem to work! */
|
||||
#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SOFT_FLOAT)
|
||||
#else
|
||||
#define TARGET_DEFAULT (ARM_FLAG_APCS_32)
|
||||
#endif
|
||||
|
||||
#include "arm/aout.h"
|
||||
|
||||
@ -46,24 +50,44 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <netbsd.h>
|
||||
|
||||
/* Some defines for CPP.
|
||||
arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */
|
||||
/* On the ARM `@' introduces a comment, so we must use something else
|
||||
for .type directives. */
|
||||
#undef TYPE_OPERAND_FMT
|
||||
/* XXX our arm assembler seems to really want # for type specs -- cgd */
|
||||
#define TYPE_OPERAND_FMT "#%s"
|
||||
|
||||
/* The NetBSD/arm32 assembler (or, at least the one that I have) doesn't
|
||||
seem to do the right thing with weak references, which causes libgcc
|
||||
c++ function lossage. */
|
||||
#undef ASM_WEAKEN_LABEL
|
||||
|
||||
/* Some defines for CPP. arm32 is the NetBSD port name, so we always (only)
|
||||
define __arm32__ and __NetBSD__, and add __KPRINTF_ATTRIBUTE__ since
|
||||
this compiler is hacked with the NetBSD kprintf attribute mods. */
|
||||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "\
|
||||
-Dunix -Driscbsd -Darm32 -D__arm32__ -D__NetBSD__ \
|
||||
-Asystem(unix) -Asystem(NetBSD) -Acpu(arm) -Amachine(arm)"
|
||||
#define CPP_PREDEFINES "-D__arm32__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
|
||||
|
||||
/* Define _POSIX_SOURCE if necessary. */
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "\
|
||||
%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \
|
||||
%{posix:-D_POSIX_SOURCE} \
|
||||
"
|
||||
#undef SUBTARGET_CPP_SPEC
|
||||
#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
|
||||
|
||||
/* Because TARGET_DEFAULT sets ARM_FLAG_APCS_32 */
|
||||
#undef CPP_APCS_PC_DEFAULT_SPEC
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
#if 0 /* XXX soft float doesn't seem to work! */
|
||||
/* Because TARGET_DEFAULT sets ARM_FLAG_SOFT_FLOAT */
|
||||
#undef CPP_FLOAT_DEFAULT_SPEC
|
||||
#define CPP_FLOAT_DEFAULT_SPEC "-D__SOFTFP__"
|
||||
#endif
|
||||
|
||||
/* Pass -X to the linker so that it will strip symbols starting with 'L' */
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
-X %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} \
|
||||
%{static:-Bstatic} %{assert*} \
|
||||
"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
@ -133,5 +157,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* Until they use ELF or something that handles dwarf2 unwinds
|
||||
and initialization stuff better. */
|
||||
#define DWARF2_UNWIND_INFO 0
|
||||
#undef DWARF2_UNWIND_INFO
|
||||
/* #define DWARF2_UNWIND_INFO 0 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user