From nobody  Fri Jun  5 22:36:31 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id WAA25414;
          Fri, 5 Jun 1998 22:36:31 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199806060536.WAA25414@hub.freebsd.org>
Date: Fri, 5 Jun 1998 22:36:31 -0700 (PDT)
From: sepotvin@videotron.ca
To: freebsd-gnats-submit@freebsd.org
Subject: ${LIBDIR} not setted correctly when using BINFORMAT=elf
X-Send-Pr-Version: www-1.0

>Number:         6871
>Category:       conf
>Synopsis:       ${LIBDIR} not setted correctly when using BINFORMAT=elf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun  5 22:40:00 PDT 1998
>Closed-Date:    Thu Jul 23 01:30:34 PDT 1998
>Last-Modified:  Thu Jul 23 01:33:31 PDT 1998
>Originator:     Stephane E. Potvin
>Release:        FreeBSD 3.0-CURRENT
>Organization:
IBM Canada Ltd.
>Environment:
FreeBSD azimov.videotron.ca 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Fri Jun  5 05:28:00 EDT 1998     rubik@azimov.videotron.ca:/usr/local/src/sys/compile/AZIMOV  i386
>Description:
When setting BINFORMAT=elf in make.conf the ${LIBDIR} variable is 
incorrectly set to /usr/lib/aout. This is because bsd.own.mk is included
before /etc/make.conf and so ${LIBDIR} is assigned his value before
BINFORMAT could be read in.
>How-To-Repeat:
Just build and install any library with BINFORMAT=elf in /etc/make.conf
>Fix:
*** sys.mk.orig Sat Jun  6 01:04:24 1998
--- sys.mk      Sat Jun  6 01:28:03 1998
***************
*** 243,253 ****

  .endif

- .include <bsd.own.mk>
-
  .if exists(/etc/make.conf)
  .include </etc/make.conf>
  .endif

  # Architectures that use NetBSD syscalls:
  .if ${MACHINE_ARCH} == "alpha"
--- 243,253 ----

  .endif

  .if exists(/etc/make.conf)
  .include </etc/make.conf>
  .endif
+
+ .include <bsd.own.mk>

  # Architectures that use NetBSD syscalls:
  .if ${MACHINE_ARCH} == "alpha"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Thu Jul 23 01:30:34 PDT 1998 
State-Changed-Why:  
This was fixed (6 days later :) in rev. 1.38 of src/share/mk/sys.mk by 
peter.  He includes the following NOTE in his commit message: 

"...there are still problems with this, individual Makefilees cannot 
override BINFORMAT." 

This is, however, completely irrelevant to the PR I am closing. 
>Unformatted:
