This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: Newlib-1.8.0


> > I had exactly the same problems (except that the unknown flag is
> > -mrelocatable-lib and not -mrelocatable). I believe that the cygnus
> > people use a newer version of gcc which already knows these flags.
> > The gas from binutils 2.8.1 knows these flags, but gcc does not pass
> > them to it.
> 
> I believe one can get source for the newer GCC by downloading
> beta 18 of the cygwin32 stuff.  See the cygnus homepage.  
> 
> That is how I found coldfire support for gcc although the m68k.md
> required fiddling before everything would nicely compile.
> 
> --rod.

I got the cygwin32 beta18 sources to get a newer gcc version which
understands -mrelocatable-lib and -mno-eabi, but I encountered subsequent
failures:

--- begin of make output ---
make[2]: Entering directory
         `/scratch/local/src/cdk/powerpc-eabi/libgloss/rs6000'
make[2]: *** No rule to make target `unlink.o', needed by `libsim.a'.
Stop.
--- end of make output ---

I solved the problem by adding the line
   'unlink.o: $(srcdir)/../unlink.c'
to libgloss/rs6000/Makefile.in.

Afterwards, I got an error because make didn't make the targets
close.o, fstat.o, unlink.o, ... in libgloss/rs6000.
This was due to the fact that the dependency lines were of the form
   'close.o: $(srcdir)/../close.c'
and the file 'close.c' was not in the current directory. But the rule
'.c.o:' matches only if the whole pathname before '.c' resp. '.o'
matches, which is not the case in the given rule. Therefore, I
generated symbolic links from the local directory to the files in
'$(srcdir)/..' by the rule:
   '%.c: $(srcdir)/../%.c
           ln -s $< .'

Then everything worked fine.

Here is the patch (sorry if there is something wrong. I am not
familiar with generating patches):
------------------- start of patch -------------------
diff -c -r libgloss.original/rs6000/Makefile.in libgloss/rs6000/Makefile.in
*** libgloss.original/rs6000/Makefile.in Thu Jul 24 16:02:25 1997
--- libgloss/rs6000/Makefile.in Thu Jul 24 15:52:22 1997
***************
*** 228,233 ****
--- 228,237 ----
  sol-cfuncs.o: sol-cfuncs.c
  sol-syscall.o: sol-syscall.S
  =

+ %.c: $(srcdir)/../%.c
+  ln -s $< .
+ =

+ unlink.o: $(srcdir)/../unlink.c
  close.o: $(srcdir)/../close.c
  fstat.o: $(srcdir)/../fstat.c
  getpid.o: $(srcdir)/../getpid.c
------------------- end of patch -------------------

-jr
-- 
Johannes Reisinger / Vienna / AUSTRIA         e-mail: hannes@linus.priv.at