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: m68k PIC fixes


Daniel Jacobowitz wrote:
> I accidentally built an m68k-elf toolchain with --enable-shared the other
> day.  It doesn't work; building the m68000 multilib, target-libiberty will
> fail with an error about using bsr.l on a processor which does not support
> it.
> 
> This happens because of the code I change in m68k_output_pic_call in the
> patch below.  Bernardo, you added this - does my change look right to you?

Yes.  bsr.l is also unsupported on the ColdFire, so your
change also fixes -fpic there.

I didn't notice before because -fpic isn't used/tested
on m68k-uclinux.


> @@ -963,7 +963,7 @@ m68k_output_pic_call(rtx dest)
>         */
>    else if (TARGET_PCREL)
>      out = "bsr.l %o0";
> -  else if ((flag_pic == 1) || TARGET_68020)
> +  else if (TARGET_68020)
>  #if defined(USE_GAS)
>      out = "bsr.l %0@PLTPC";
>  #else

Please also remove the mis-spelled sentence "if we've using -fpic or"
from the block comment a few lines above it.  The comment also appears
to be mis-indented.


@@ -23,7 +23,6 @@ MULTILIB_EXCEPTIONS = m68000/msoft-float
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
 
-# from ../t-svr4
-EXTRA_PARTS=crtbegin.o crtend.o
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
 # no pic for now
 #CRTSTUFF_T_CFLAGS=-fpic


The t-uclinux fragment overrided EXTRA_PARTS to
disable crtbegin.o/crtend.o.  This needs to be
update to override EXTRA_MULTILIB_PARTS.

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/


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