[PATCH] Fix multilib build

Sebastian Huber sebastian.huber@embedded-brains.de
Tue Dec 13 06:13:00 GMT 2016



On 12/12/16 21:57, Jeff Johnston wrote:
> See comments below.
>
> ----- Original Message -----
>> >
>> >Jeff?  Can you take a look please?
>> >
>> >
>> >Thanks,
>> >Corinna
>> >
>> >
>> >On Dec  8 09:54, Sebastian Huber wrote:

[...]

>>> > >Signed-off-by: Sebastian Huber<sebastian.huber@embedded-brains.de>
>>> > >---
>>> > >  newlib/Makefile.am  | 30 +++++++++++++++++++++++-------
>>> > >  newlib/Makefile.in  | 32 ++++++++++++++++++++++++++------
>>> > >  newlib/configure    | 33 +++++++++++++++++++++++++++++++--
>>> > >  newlib/configure.in | 25 +++++++++++++++++++++++++
>>> > >  4 files changed, 105 insertions(+), 15 deletions(-)
>>> > >
>>> > >diff --git a/newlib/Makefile.am b/newlib/Makefile.am
>>> > >index 20ab163..88845e7 100644
>>> > >--- a/newlib/Makefile.am
>>> > >+++ b/newlib/Makefile.am
>>> > >@@ -77,16 +77,17 @@ toollibdir = $(tooldir)/lib$(MULTISUBDIR)
>>> > >  
>>> > >  AR_FLAGS = rc
>>> > >  
>>> > >+noinst_DATA = stmp-targ-include
>>> > >+
>>> > >  if USE_LIBTOOL
>>> > >  toollib_LTLIBRARIES = libm.la \
>>> > >  	libc.la
>>> > >  else
>>> > >  toollib_LIBRARIES = libm.a \
>>> > >  	libc.a
>>> > >+noinst_DATA += $(MULTISUBDIR_CRT0) $(MULTISUBDIR_LIBC) $(MULTISUBDIR_LIBM)
>>> > >  endif
>>> > >  
>>> > >-noinst_DATA = stmp-targ-include
>>> > >-
>>> > >  toollib_DATA = $(CRT0) $(CRT1)
>>> > >  
>>> > >  
>>> > >@@ -171,23 +172,38 @@ libc/libc.a: ; @true
>>> > >  
>>> > >  libm.a: libm/libm.a
>>> > >  	rm -f $@
>>> > >-	ln libm/libm.a $@ >/dev/null 2>/dev/null || cp libm/libm.a $@
>>> > >+	ln $< $@ >/dev/null 2>/dev/null || cp $< $@
>>> > >  
>>> > >  libm/libm.a: ; @true
>>> > >  
>>> > >  endif # USE_LIBTOOL
>>> > >
> If you're going to do this, it would be clearer if you set an AM_DEFINE for each variable
> you set and then you could do:
>
>
> $(with_multisubdir):
>       $(MKDIR_P) $@
>
> if MULTISUBDIR_CRT0_DEFINED
> MULTISUBDIR_CRT0: $(CRT0_DIR)$CRT0 $(with_multisubdir)
>        ...
> endif
>
> if MULTISUBDIR_LIBC_DEFINED
> MULTISUBDIR_LIBC: libc.a $(with_multisubdir)
>        ...
> endif
>
> if MULTISUBDIR_LIBM_DEFINED
> MULTISUBDIR_LIBM: libm.a $(with_multisubdir)
>    ...

I used the same technique as the already existing $(CRT0) and $(CRT1).

Maybe use one AM_DEFINE(WITH_MULTISUBDIR)?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Newlib mailing list