[m-rev.] diff: GCC back-end Mmake fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jul 27 15:53:42 AEST 2001
Branches: main
Estimated hours taken: 2
Fix a bug with the GCC back-end Mmake support that seems to have been
triggered somehow by stayl's .c_date changes.
scripts/Mmake.rules:
For the *__c_code.{o,pic_o} targets, depend on the .s/.pic_s
file rather than the .c file, since the .c file is generated
as a side effect of generating the .s/.pic_s file.
Workspace: /home/hg2/public/test_mercury/test_dirs/hg/mercury
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/Mmake.rules,v
retrieving revision 1.103
diff -u -d -r1.103 Mmake.rules
--- scripts/Mmake.rules 2001/07/24 14:19:23 1.103
+++ scripts/Mmake.rules 2001/07/27 05:48:54
@@ -209,12 +209,17 @@
$(os_subdir)%.pic_o : $(ss_subdir)%.pic_s
$(AS) $< $(OBJFILE_OPT)$@
-$(os_subdir)%__c_code.$O : $(cs_subdir)%.c
- $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< $(OBJFILE_OPT)$@
+# For *__c_code.{o,pic_o}, we depend on the .s or .pic_s file rather
+# than the .c file, since the .c file is produced as a side-effect of
+# generating the .s/.pic_s file.
-$(os_subdir)%__c_code.pic_o : $(cs_subdir)%.c
+$(os_subdir)%__c_code.$O : $(ss_subdir)%.s
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) \
+ -c $(cs_subdir)$*.c $(OBJFILE_OPT)$@
+
+$(os_subdir)%__c_code.pic_o : $(ss_subdir)%.pic_s
$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
- -c $< $(OBJFILE_OPT)$@
+ -c $(cs_subdir)$*.c $(OBJFILE_OPT)$@
endif
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list