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: [PowerPC] Tidy unwind support


Alan Modra <amodra@bigpond.net.au> writes:

> This patch removes one of the annoyances when bootstrapping a
> powerpc*-linux toolchain, the need for glibc headers.
> 
> 	* config/rs6000/linux64.h: Don't include signal.h or sys/ucontext.h.
> 	(struct kernel_old_ucontext): Delete.
> 	(struct gcc_pt_regs, gcc_sigcontext, gcc_ucontext): New.
> 	(MD_FALLBACK_FRAME_STATE_FOR): Use gcc_* structs.  Only define
> 	when IN_LIGGCC2.
> 
> Verified by comparing objdump -dr results for old and new unwind-dw2.o,
> all multilibs.  I haven't provided the equivalent linux.h patch here,
> because I'd like to move the unwind defines to another file,
> config/rs6000/linux-unwind.h, saving the duplication.  Then either add
> the new file to the list of tm_file's in config.gcc, or include into
> unwind-dw2.c via MD_UNWIND_SUPPORT as I did with my ill-thought patch
> in http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02541.html.  Either way,
> I'll commit this first to better track the changes.

Have you considered doing what ppc-darwin does, which is to move this
large and complicated macro into a function in its own .c file?


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