Bug 19957

Summary: request for static linked make
Product: Base System Reporter: Gaspar Chilingarov <nm>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Gaspar Chilingarov 2000-07-15 22:30:00 UTC
Because i'm using -current version i frequently get corrupted libc - so the one way to avoid this problem is to put /dev/ad :) in other computer mount it there and overwrite with old working version .

i have suggestion to have /*also*/ staticaly linked make to use it in case when make fails to load .

here it is a small patch to be plased in /usr/src/usr.bin/make.static

if you find this useless you can close pr without confirming with me.

Fix: 

PROG=   make.static
NOSHARED=yes
.PATH: ${.CURDIR}/../make
CFLAGS+= -I${.CURDIR}/../make
SRCS=   arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
    make.c parse.c str.c suff.c targ.c var.c util.c
SRCS+=  lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
    lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
    lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
    lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
    lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
.PATH:  ${.CURDIR}/../make/lst.lib
NOMAN=yes
.include <bsd.prog.mk>
How-To-Repeat: hmm .... cat /etc/tty > /usr/bin/libc.so 
:)
do not forget to remove schg flag :)
Comment 1 Johan.Karlsson 2000-08-02 13:30:20 UTC
Hi

I do not think this will buy us anything since
in order to recompile libc, gcc is used which also 
is dynamic....
Hence alot of programs have to be static :-)

I guess if you realy want to you can make all binaries static by
make -DNOSHARED buildworld
but I think that would increase the size of /usr alot.

/Johan K
-- 
Johan Karlsson              Phone : +46 (0)920 720 16 
Systemteknik, Datalogi      Fax   : +46 (0)920 721 91 
Luleå Tekniska Universitet  E-mail: Johan.Karlsson@SM.LuTH.SE
S-971 87 LULEÅ, SWEDEN
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-02 13:40:08 UTC
State Changed
From-To: open->closed

As Johan points out, the buildworld target is sensitive to 
the NOSHARED make variable, which seems to be what you want. 

I don't think it's feasible for us to introduce a bunch of 
WANT_STATIC_FOO variables, though. 

If you find parts of FreeBSD which do not honour NOSHARED, 
please do let us know. :-)