This is the mail archive of the gcc@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: Build/Makefile question


On Mon, Oct 29, 2012 at 7:55 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Sat, 27 Oct 2012, Ian Lance Taylor wrote:
>
>> On Sat, Oct 27, 2012 at 1:45 PM, Caroline Tice <cmtice@google.com> wrote:
>> > Ian Tayler (in private communication) asked that I get the part of the
>> > build log that shows the .so and .a files being built and send it to
>> > the list.  Here it is.
>>
>> I see the problem.  libstdc++/libsupc++/Makefile.am overrides the
>> default CXXLINK to invoke libtool with --tag disable-shared.  Your new
>> shared libraries have only C input files, so they are being linked
>> with CXXLINK, they are being linked with LINK.  You need to override
>> the default value of LINK.
>
> Actually her Makefile.am contains C++ sources:
>
> ! vtv_init_sources = \
> !       vtv_init.cc
> !
> ! vtv_stubs_sources = \
> !       vtv_stubs.cc
>
> which should be enough to make it use CXXLINK, but her Makefile.in
> contains:
>
> + libvtv_init_la_LIBADD =
> + libvtv_init_la_SOURCES = vtv_init.c
> + libvtv_init_la_OBJECTS = vtv_init.lo
> + libvtv_stubs_la_LIBADD =
> + libvtv_stubs_la_SOURCES = vtv_stubs.c
> + libvtv_stubs_la_OBJECTS = vtv_stubs.lo
> ...
> ! SOURCES = $(libsupc___la_SOURCES) $(libsupc__convenience_la_SOURCES) \
> !       libvtv_init.c libvtv_stubs.c
>
> ... but then still ...
>
> ! vtv_init_sources = \
> !       vtv_init.cc
> !
> ! vtv_stubs_sources = \
> !       vtv_stubs.cc
>
> So, the first hunk of Makefile.in contains references to .c files.
> Caroline: did you edit Makefile.in yourself?  Otherwise I don't see how
> this file could have been generated by automake with this inconsistent use
> of .c/.cc.  Or maybe you have still .c sources lying around in your
> source tree?
>

Actually, I did have to edit the Makefile.in slightly.  When I
generate it with automake, it automatically adds the lines:

libvtv_init_la_LIBADD =
libvtv_init_la_SOURCES = libvtv_init.c
libvtv_init_la_OBJECTS = libvtv_init.lo
libvtv_stubs_la_LIBADD =
libvtv_stubs_la_SOURCES = libvtv_stubs.c
libvtv_stubs_la_OBJECTS = libvtv_stubs.lo

as well as the lines:

SOURCES = $(libsupc___la_SOURCES) $(libsupc__convenience_la_SOURCES) \
        libvtv_init.c libvtv_stubs.c



I don't know where it's getting those source file names, but they're
wrong.  I went in and removed the "lib" prefix from them, but I hadn't
noticed that it had made them ".c" files instead of ".cc" files.  If
you know how to fix the .am file so that it doesn't generate these
bogus & wrong source files in the .in file, I would appreciate your
sharing with me...

-- Caroline
cmtice@google.com

>
> Ciao,
> Michael.


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