quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] Re: config-cc patch


From: John Vandenberg
Subject: [Quilt-dev] Re: config-cc patch
Date: Sat, 13 Aug 2005 12:52:51 +1000

On 8/13/05, Jean Delvare <address@hidden> wrote:
> Hi John,
>
> I would like to merge your config-cc patch into quilt. Here are a few
> things I would like to see clarified or fixed before I do.

Great.  I have updated the patch to rectify the problems you have pointed out.

In order for quilt to work on Solaris, the patch sun-backup-files.diff
is also needed.  A few of the other patches in the series are need in
order for the test suite to run successfully.  The series file
contains a few notes regarding when each platform works.

> You add the following:
>
> > +LDLIBS   :=  @LIBS@
>
> but then use:
>
> > +     $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LIBS)
>
> It seems to me like there is a confusion between $(LDLIBS) and $(LIBS).
> Or am I missing something?

Thanks for picking this up.

> BTW, why are you adding this:
>
> > +$(LIB:%=lib/%) : $(LIB_SRC:%=lib/%)
> > +     $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LIBS)
>
> Isn't this the default rule already? It seems to work no differently for
> me without it.

It shouldn't have any affect on platforms other that Windows; without
this, backup-files is not built using MSYS gmake.

> >  LIB_SRC :=   backup-files.c
> > (...)
> > -DIRT +=              lib/backup-files lib/backup-files.o
> > +DIRT +=              lib/backup-files$(EXEEXT) $(LIB_SRC:%.c=%.o)
>
> I think there is a bug here, shouldn't this be $(LIB_SRC:%.c=lib/%.o)?

yes, thanks.

> I also don't quite understand this part. When compiling, no
> lib/backup-files.o seems to be created. lib/backup-files.c is compiled
> to lib/backup-files directly. So why do we mention lib/backup-files.o at
> all?
>
> How would we force the .o file to be generated if we wanted to?

The default make rule for .c -> .o will work on Windows, so this should do it..

$(LIB:%=lib/%) : $(LIB_SRC:%.c=lib/%.o)
       $(CC) -o $@ $(LDFLAGS) $^ $(LIBS)

> As a side note, I noticed that we are compiling with -g by default.
> Can't we change that? It doesn't seem correct to me.

Sounds like a good idea.  The updated patch discards autoconf CFLAGS,
and allows both of the following:

./configure CFLAGS="-O2"

make CLAGS="-g"

--
John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]