[m-dev.] diff: GCC back-end: fix Mmake sub-modules bug

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jan 24 17:20:19 AEDT 2001


Estimated hours taken: 0.75

Fix a bug in the Mmake support for sub-modules for `--target asm'.

compiler/modules.m:
	Output rules needed for `--target asm' when compiling
	sub-modules where the file name doesn't match the module,
	like we do for the other back-ends.

Workspace: /home/hg/fjh/gcc-cvs/gcc/mercury
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.144
diff -u -d -r1.144 modules.m
--- compiler/modules.m	2001/01/18 15:54:54	1.144
+++ compiler/modules.m	2001/01/23 18:02:32
@@ -1956,6 +1956,21 @@
 					"\\\n",
 				"\t\t-c ", CFileName, " -o $@\n",
 				"endif # RM_C != :\n",
+				"ifeq ($(TARGET_ASM),yes)\n",
+				AsmFileName, " : ", SourceFileName, "\n",
+				"\trm -f ", AsmFileName, "\n",
+				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
+					"--target-code-only $< > ", ErrFileName,
+					" 2>&1\n",
+				PicAsmFileName, " : ", SourceFileName, "\n",
+				"\trm -f ", PicAsmFileName, "\n",
+				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",
+					"--target-code-only --pic-reg ",
+					"\\\n",
+				"\t\t--cflags ""$(GCCFLAGS_FOR_PIC)"" ",
+					"$< > ", ErrFileName,
+					" 2>&1\n",
+				"endif # TARGET_ASM\n",
 				ILFileName, " : ", SourceFileName, "\n",
 				"\trm -f ", ILFileName, "\n",
 				"\t$(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) ",

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list