Index | Thread | Search

From:
Denis Fondras <denis@openbsd.org>
Subject:
Re: Clean *.o.tmp files
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
Denis Fondras <denis@openbsd.org>, tech@openbsd.org
Date:
Mon, 27 Oct 2025 10:05:51 +0100

Download raw body.

Thread
Le Sun, Oct 26, 2025 at 06:19:40PM -0600, Theo de Raadt a écrit :
> I would like to know what creates these files.
> 

If I understand correctly, this is clang that creates these files.
There seems to exist an option -fno-temp-file in clang to disable that behavior.

> Denis Fondras <denis@openbsd.org> wrote:
> 
> > When I abort a compile task, there are remaining *.o.tmp files that are not
> > removed when I do a `make clean`.
> > 
> > This diff adds them to the clean task.
> > 
> > OK ?
> > 
> > Index: bsd.lib.mk
> > ===================================================================
> > RCS file: /cvs/src/share/mk/bsd.lib.mk,v
> > diff -u -p -r1.103 bsd.lib.mk
> > --- bsd.lib.mk	16 Jul 2025 16:22:58 -0000	1.103
> > +++ bsd.lib.mk	26 Oct 2025 16:39:44 -0000
> > @@ -256,7 +256,7 @@ ${DIST_LIB}: ${SELECTED_DOBJS}
> >  
> >  .if !target(clean)
> >  clean: _SUBDIRUSE
> > -	rm -f a.out [Ee]rrs mklog *.core y.tab.h \
> > +	rm -f a.out [Ee]rrs mklog *.core *.o.tmp y.tab.h \
> >  	    ${_LEXINTM} ${_YACCINTM} ${CLEANFILES}
> >  	rm -f lib${LIB}.a ${OBJS}
> >  	rm -f lib${LIB}_g.a ${GOBJS}
> > Index: bsd.prog.mk
> > ===================================================================
> > RCS file: /cvs/src/share/mk/bsd.prog.mk,v
> > diff -u -p -r1.83 bsd.prog.mk
> > --- bsd.prog.mk	9 Jun 2021 19:44:55 -0000	1.83
> > +++ bsd.prog.mk	26 Oct 2025 16:39:44 -0000
> > @@ -135,7 +135,7 @@ BUILDAFTER += ${PROG} ${PROGS} ${OBJS}
> >  
> >  .if !target(clean)
> >  clean: _SUBDIRUSE
> > -	rm -f a.out [Ee]rrs mklog *.core y.tab.h \
> > +	rm -f a.out [Ee]rrs mklog *.core *.o.tmp y.tab.h \
> >  	    ${PROG} ${PROGS} ${OBJS} ${_LEXINTM} ${_YACCINTM} ${CLEANFILES}
> >  .endif
> >  
> >