From sblank@tiscali.de  Sat Nov 23 07:48:08 2002
Return-Path: <sblank@tiscali.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5A42337B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 23 Nov 2002 07:48:08 -0800 (PST)
Received: from ally.privat.de (core117-d126.dialo.tiscali.de [62.246.117.126])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 07CDC43E9C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 23 Nov 2002 07:48:03 -0800 (PST)
	(envelope-from sblank@tiscali.de)
Received: by ally.privat.de (Postfix, from userid 1000)
	id 9048A257; Sat, 23 Nov 2002 16:47:22 +0100 (CET)
Message-Id: <20021123154722.9048A257@ally.privat.de>
Date: Sat, 23 Nov 2002 16:47:22 +0100 (CET)
From: Sascha Blank <sblank@tiscali.de>
Reply-To: Sascha Blank <sblank@tiscali.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: crt*.o files are installed multiple times during "make install"
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         45644
>Category:       i386
>Synopsis:       crt*.o files are installed multiple times during "make install"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 23 07:50:01 PST 2002
>Closed-Date:    Sat Nov 23 09:48:26 PST 2002
>Last-Modified:  Sat Nov 23 09:48:26 PST 2002
>Originator:     Sascha Blank
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD ally.privat.de 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Nov 22 09:46:33 CET 2002 sblank@ally.privat.de:/disc2/obj/disc2/src/sys/ALLY i386

$ ident /usr/src/lib/csu/i386-elf/Makefile
     $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.6.2.4 2002/08/07 16:31:48 ru Exp $

>Description:

a "make install" in the above directory installs the *.o file four times in a
row, though once would suffice.  Look at this:

# make install
install -o root -g wheel -m 444  crt1.o crti.o crtn.o gcrt1.o /usr/lib
install -o root -g wheel -m 444  crt1.o crti.o crtn.o gcrt1.o /usr/lib
install -o root -g wheel -m 444  crt1.o crti.o crtn.o gcrt1.o /usr/lib
install -o root -g wheel -m 444  crt1.o crti.o crtn.o gcrt1.o /usr/lib

>How-To-Repeat:

See above.

>Fix:

The "problem" is caused by a .for loop in the Makefile that looks like it has
been overseen at some point in the past.

The following diff solves this problem:

*** /usr/src/lib/csu/i386-elf/Makefile.orig	Wed Aug  7 18:31:48 2002
--- /usr/src/lib/csu/i386-elf/Makefile	Sat Nov 23 16:42:05 2002
***************
*** 19,27 ****
  	${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c
  
  realinstall:
- .for file in ${OBJS}
  	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
  	    ${OBJS} ${DESTDIR}${LIBDIR}
- .endfor
  
  .include <bsd.lib.mk>
--- 19,25 ----
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Sat Nov 23 09:48:12 PST 2002 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45644 
>Unformatted:
