Author: emaste
Date: Fri Jan 22 02:28:17 2016
New Revision: 294542
URL: https://svnweb.freebsd.org/changeset/base/294542

Log:
  Remove old generated unwind.h when using LLVM libunwind
  
  When not using LLVM libunwind, unwind.h is a generated header and a stale
  copy may remain in the OBJDIR after enabling LLVM libunwind. Explicitly
  remove it.
  
  Reported by:  bz
  Reviewed by:  bdrewery
  Sponsored by: The FreeBSD Foundation
  Differential Revision:        https://reviews.freebsd.org/D5019

Modified:
  head/gnu/lib/libgcc/Makefile

Modified: head/gnu/lib/libgcc/Makefile
==============================================================================
--- head/gnu/lib/libgcc/Makefile        Fri Jan 22 02:23:18 2016        
(r294541)
+++ head/gnu/lib/libgcc/Makefile        Fri Jan 22 02:28:17 2016        
(r294542)
@@ -193,7 +193,12 @@ LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS:
 .endif
 
 COMMONHDRS=    tm.h tconfig.h options.h gthr-default.h
-.if ${MK_LLVM_LIBUNWIND} == no
+.if ${MK_LLVM_LIBUNWIND} != "no"
+# unwind.h is a generated file when MK_LLVM_LIBUNWIND == "no", and a stale
+# copy may be left behind in OBJDIR when switching, so remove it explicitly.
+beforebuild:
+       @rm -f ${.OBJDIR}/unwind.h
+.else
 COMMONHDRS+=   unwind.h
 .endif
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to