This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: Darwin/x86 fails to build


C++ currently won't build on Darwin/x86; the Linux PLT syntax is not tolerated by the Darwin assembler. Mach-O doesn't have a Procedure Linkage Table ("PLT"). Avoid using "%P" ("if PIC, print an @PLT suffix") to output symbols.

Tested against a C-only build and 'make check' on Darwin/x86. No new regressions (unlikely, thunks are rarely seen in C :-).

2002-01-09 Stuart Hastings <stuart@apple.com>

* gcc/config/i386/i386.c (x86_output_mi_thunk): Add Darwin/x86 support.

Index: gcc.pure/gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.502
diff -c -d -c -3 -p -r1.502 i386.c
*** gcc.pure/gcc/config/i386/i386.c 28 Dec 2002 13:57:58 -0000 1.502
--- gcc.pure/gcc/config/i386/i386.c 6 Jan 2003 18:50:58 -0000
*************** x86_output_mi_thunk (file, thunk, delta,
*** 14641,14646 ****
--- 14641,14655 ----
if (!flag_pic || (*targetm.binds_local_p) (function))
output_asm_insn ("jmp\t%P0", xops);
else
+ #if defined TARGET_MACHO
+ if (TARGET_MACHO)
+ {
+ if (ix86_regparm > 2)
+ abort ();
+ output_asm_insn ("jmp\t%0", xops);
+ }
+ else
+ #endif /* TARGET_MACHO */
{
tmp = gen_rtx_REG (SImode, 2 /* ECX */);
output_set_got (tmp);




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]