Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2016 13:34:38 -0600
From:      Ravi Pokala <rpokala@mac.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Alexander Kabaev <kan@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r310789 - head/lib/libpam/static_libpam
Message-ID:  <E6FB3AFF-4CAA-4D96-B105-11B04D236963@panasas.com>
In-Reply-To: <CAPyFy2AbsAgBR3zO0ng45z7fT4A7XFuv5rASd0P6VKOqWHfdBQ@mail.gmail.com>
References:  <201612292130.uBTLUqus011628@repo.freebsd.org> <1A7F0D4F-1F4D-4885-B7E9-F764D4FA72BF@panasas.com> <CAPyFy2AbsAgBR3zO0ng45z7fT4A7XFuv5rASd0P6VKOqWHfdBQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----
> From: <owner-src-committers@freebsd.org> on behalf of Ed Maste <emaste@freebsd.org>
> Date: 2016-12-30, Friday at 07:39
> To: Ravi Pokala <rpokala@mac.com>
> Cc: Alexander Kabaev <kan@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
> Subject: Re: svn commit: r310789 - head/lib/libpam/static_libpam
> 
> On 29 December 2016 at 19:59, Ravi Pokala <rpokala@mac.com> wrote:
>>
>> I'm a little confused - the original version had to have had a compile-only step to generate the object first, before running the link-only operation against the object. The new code replaces the link-only operation with a compile+link operation. Shouldn't the pre-existing compile-only operation be removed, since the new compile+link operation supersedes it?
> 
> Hi Ravi,
> 
> This change:
> 
>>> -     ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
>>> +     ${CC} -nostdlib ${CFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC}
> 
> is not actually compiling, it's just invoking the compiler driver to
> in turn invoke the linker. The input in ${.ALLSRC} is still a
> collection of object files.

Ahhh! My knowledge of `make' is terrible, so I thought ${.ALLSRC} must have been referring to actual source files in some non-obvious way. I also thought some special flag would be needed when passing an object file to the compiler, rather than a source file. Combine those two, and there was my problem.

Thanks for clarifying!

-Ravi (rpokala@)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E6FB3AFF-4CAA-4D96-B105-11B04D236963>