Rich Felker <dal...@libc.org> wrote: > I worked around it and opened an issue for it: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67812 > > But trying the patch on vanilla GCC trunk without my usual J2 target > setup revealed some additional issues I need to address. I'm getting > ICE in the code that generates the libgcc bitshift calls, which > weren't used on J2. This is my fault for failing to extend the changes > made to other parts of sh.md to the patterns for the new shifts (the > same ones that broke the kernel) and perhaps also some other things. > I'm going to go back and review that code and get it done right before > resubmitting the patch against trunk. > > If you have any other general comments on the patch in the mean time > I'd be happy to hear them.
FYI, the patch can be applied to trunk almost as is. I've tried to build/make -k check for cross sh4-unknown-linux-gnu. > #ifndef SUBTARGET_ASM_SPEC > -#define SUBTARGET_ASM_SPEC "" > +#define SUBTARGET_ASM_SPEC "%{!mno-fdpic:--fdpic}" > #endif With it, plain sh4-unknown-linux-gnu compiler adds --fdpic to the AS command unless -mno-fdpic is specified and the build fails during linking the target libgcc.so. I've changed it into #ifndef SUBTARGET_ASM_SPEC -#define SUBTARGET_ASM_SPEC "" +#ifdef FDPIC_DEFAULT +#define SUBTARGET_ASM_SPEC "%{!mno-fdpic:--fdpic}" +#else +#define SUBTARGET_ASM_SPEC "%{mfdpic:--fdpic}" +#endif #endif There are no new failures with the top level "make -k check" on sh4-unknown-linux-gnu. Regards, kaz