Bug 65798

Summary: Bug in bsd.port.mk when USE_GCC not defined
Product: Ports & Packages Reporter: David E. O'Brien <obrien>
Component: Individual Port(s)Assignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description David E. O'Brien freebsd_committer freebsd_triage 2004-04-20 01:50:18 UTC
	A port no longer is told to use the compiler defined by 'CC' in the
	normal case of "USE_GCC" not being set.

	I think a ".else" was left out of the "USE_GCC" logic.

How-To-Repeat: 	$ make -V MAKE_ENV	# shows no CC=
Comment 1 David E. O'Brien freebsd_committer freebsd_triage 2004-04-20 04:16:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

for the testing queue.
Comment 2 Kris Kennaway 2004-04-20 04:23:31 UTC
On Mon, Apr 19, 2004 at 05:43:17PM -0700, David O'Brien wrote:

> 	A port no longer is told to use the compiler defined by 'CC' in the
> 	normal case of "USE_GCC" not being set.
> 
> 	I think a ".else" was left out of the "USE_GCC" logic.

Actually I think my previous change in this area was too overzealous;
I moved the MAKE_ENV setting under the .ifdef USE_GCC, forgetting that
it's also needed in other cases.  The fix would be to put it back
where it was.

Kris
Comment 3 Kris Kennaway 2004-04-20 07:36:23 UTC
On Mon, Apr 19, 2004 at 05:43:17PM -0700, David O'Brien wrote:

> >Description:
> 
> 	A port no longer is told to use the compiler defined by 'CC' in the
> 	normal case of "USE_GCC" not being set.
> 
> 	I think a ".else" was left out of the "USE_GCC" logic.
> 
> >How-To-Repeat:
> 	$ make -V MAKE_ENV	# shows no CC=
> 
> >Fix:
> 
> Index: bsd.port.mk
> ===================================================================
> RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
> retrieving revision 1.487
> diff -u -r1.487 bsd.port.mk
> --- bsd.port.mk	19 Apr 2004 01:37:11 -0000	1.487
> +++ bsd.port.mk	20 Apr 2004 00:39:37 -0000
> @@ -1320,6 +1321,7 @@
>  BUILD_DEPENDS+=	gcc34:${PORTSDIR}/lang/gcc34
>  GCCVERSION=		030400
>  .endif
> +.else
>  MAKE_ENV+=	CC="${CC}" CXX="${CXX}"
>  .endif

Actually, I can't find evidence that the behaviour you describe was
previously the case.  All I did in the recent USE_GCC commit was move
a bunch of separate MAKE_ENV settings into the outer .ifdef USE_GCC.

Kris
Comment 4 David E. O'Brien freebsd_committer freebsd_triage 2004-04-20 14:32:27 UTC
On Mon, Apr 19, 2004 at 11:36:23PM -0700, Kris Kennaway wrote:
> > >Description:
> > 
> > 	A port no longer is told to use the compiler defined by 'CC' in the
> > 	normal case of "USE_GCC" not being set.
> > 
> > 	I think a ".else" was left out of the "USE_GCC" logic.
> > 
> > >How-To-Repeat:
> > 	$ make -V MAKE_ENV	# shows no CC=
> > 
> > >Fix:
> > +.else
> >  MAKE_ENV+=	CC="${CC}" CXX="${CXX}"
> >  .endif
> 
> Actually, I can't find evidence that the behaviour you describe was
> previously the case.  All I did in the recent USE_GCC commit was move
> a bunch of separate MAKE_ENV settings into the outer .ifdef USE_GCC.

Far enought.  Do you think the ".else" should be added as a feature
request then?
 
-- 
-- David  (obrien@FreeBSD.org)
Comment 5 Kris Kennaway 2004-04-20 23:03:27 UTC
On Tue, Apr 20, 2004 at 06:32:27AM -0700, David O'Brien wrote:
> On Mon, Apr 19, 2004 at 11:36:23PM -0700, Kris Kennaway wrote:
> > > >Description:
> > > 
> > > 	A port no longer is told to use the compiler defined by 'CC' in the
> > > 	normal case of "USE_GCC" not being set.
> > > 
> > > 	I think a ".else" was left out of the "USE_GCC" logic.
> > > 
> > > >How-To-Repeat:
> > > 	$ make -V MAKE_ENV	# shows no CC=
> > > 
> > > >Fix:
> > > +.else
> > >  MAKE_ENV+=	CC="${CC}" CXX="${CXX}"
> > >  .endif
> > 
> > Actually, I can't find evidence that the behaviour you describe was
> > previously the case.  All I did in the recent USE_GCC commit was move
> > a bunch of separate MAKE_ENV settings into the outer .ifdef USE_GCC.
> 
> Far enought.  Do you think the ".else" should be added as a feature
> request then?

Well, that would still be wrong because it would avoid adding MAKE_ENV
when USE_GCC is set.  Doing what you mean, I'm not sure..how many
ports would this affect?

Kris
Comment 6 David E. O'Brien freebsd_committer freebsd_triage 2004-04-21 17:41:55 UTC
On Tue, Apr 20, 2004 at 03:03:27PM -0700, Kris Kennaway wrote:
> On Tue, Apr 20, 2004 at 06:32:27AM -0700, David O'Brien wrote:
> > On Mon, Apr 19, 2004 at 11:36:23PM -0700, Kris Kennaway wrote:
> > > > >Description:
> > > > 
> > > > 	A port no longer is told to use the compiler defined by 'CC' in the
> > > > 	normal case of "USE_GCC" not being set.
> > > > 
> > > > 	I think a ".else" was left out of the "USE_GCC" logic.
> > > > 
> > > > >How-To-Repeat:
> > > > 	$ make -V MAKE_ENV	# shows no CC=
> > > > 
> > > > >Fix:
> > > > +.else
> > > >  MAKE_ENV+=	CC="${CC}" CXX="${CXX}"
> > > >  .endif
> > > 
> > > Actually, I can't find evidence that the behaviour you describe was
> > > previously the case.  All I did in the recent USE_GCC commit was move
> > > a bunch of separate MAKE_ENV settings into the outer .ifdef USE_GCC.
> > 
> > Far enought.  Do you think the ".else" should be added as a feature
> > request then?
> 
> Well, that would still be wrong because it would avoid adding MAKE_ENV
> when USE_GCC is set.

That's quite true.  I wonder if the MAKE_ENV+= CC="${CC}" CXX="${CXX}"
should be down in all cases.  I thought it was in the distant past, but
maybe I'm remembering wrong.

-- 
-- David  (obrien@FreeBSD.org)
Comment 7 Kris Kennaway freebsd_committer freebsd_triage 2004-05-19 05:28:19 UTC
State Changed
From-To: open->closed

This wasn't a bug.