delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/20/07:18:49

From: pavenis AT lanet DOT lv
To: djgpp-workers AT delorie DOT com
Date: Wed, 20 Jun 2001 14:17:16 +0300
MIME-Version: 1.0
Subject: patch for src/libc/crt0/makefile
Message-ID: <3B30B06C.31375.95735D@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

Here is patch for src/libc/crt0/makefile which takes into account
change of behaviour of GCC when options -MMD or -MD are 
used:
	gcc-3.0 puts .d file in same directory where object file is written;
	earlier versions put .d file in current directory.

This breaks make in this director with gcc-3.0 as sed fails to find
crt0.d and gcrt0.d. Compiling them to current directory and moving
later to $(LIB) fixes the problem with gcc-3.0

Andris

*** djgpp/src/libc/crt0/makefile~6	Sun Aug 16 14:26:18 1998
--- djgpp/src/libc/crt0/makefile	Wed Jun 20 13:55:50 2001
***************
*** 24,32 ****
  	$(HOSTBIN)/djasm.exe sbrk16.asm sbrk16.ah
  
  $(LIB)/crt0.o : crt0.S exit16.ah sbrk16.ah
! 	$(XGCC) -MMD -c crt0.S -o $@
  	sed 's AT crt0 DOT o@$(LIB)/crt0.o@' crt0.d > crt02.d
  
  $(LIB)/gcrt0.o : gcrt0.S crt0.S exit16.ah sbrk16.ah
! 	$(XGCC) -MMD -c gcrt0.S -o $@
  	sed 's AT gcrt0 DOT o@$(LIB)/gcrt0.o@' gcrt0.d > gcrt02.d
--- 24,34 ----
  	$(HOSTBIN)/djasm.exe sbrk16.asm sbrk16.ah
  
  $(LIB)/crt0.o : crt0.S exit16.ah sbrk16.ah
! 	$(XGCC) -MMD -c crt0.S -o crt0.o
! 	mv -f crt0.o $@
  	sed 's AT crt0 DOT o@$(LIB)/crt0.o@' crt0.d > crt02.d
  
  $(LIB)/gcrt0.o : gcrt0.S crt0.S exit16.ah sbrk16.ah
! 	$(XGCC) -MMD -c gcrt0.S -o gcrt0.o
! 	mv -f gcrt0.o $@
  	sed 's AT gcrt0 DOT o@$(LIB)/gcrt0.o@' gcrt0.d > gcrt02.d

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019