This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, moxie] Add -mno-crt0 option

This patch adds a -mno-crt0 option, similar to what is found on the
mn10300 port.  I have checked it in.



2012-09-21  Anthony Green  <>

	* config/moxie/moxie.opt: Add -mno-crt0 option.
	* config/moxie/moxie.h (STARTFILE_SPEC): Handle -mno-crt0 option.
	* doc/invoke.texi (Option Summary): Document -mno-crt0 option.

Index: gcc/config/moxie/moxie.h
--- gcc/config/moxie/moxie.h	(revision 191288)
+++ gcc/config/moxie/moxie.h	(working copy)
@@ -1,5 +1,5 @@
 /* Target Definitions for moxie.
-   Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010, 2012  Free Software Foundation, Inc.
    Contributed by Anthony Green.

    This file is part of GCC.
@@ -22,7 +22,7 @@
 #define GCC_MOXIE_H

-#define STARTFILE_SPEC "crt0%O%s crti.o%s crtbegin.o%s"
+#define STARTFILE_SPEC "%{!mno-crt0:crt0%O%s} crti.o%s crtbegin.o%s"

 /* Provide an ENDFILE_SPEC appropriate for svr4.  Here we tack on our own
    magical crtend.o file (see crtstuff.c) which provides part of the
Index: gcc/config/moxie/moxie.opt
--- gcc/config/moxie/moxie.opt	(revision 191288)
+++ gcc/config/moxie/moxie.opt	(working copy)
@@ -25,3 +25,7 @@
 Target RejectNegative Report Mask(LITTLE_ENDIAN)
 Generate little-endian code
+; Ignored by the compiler
+Target RejectNegative
Index: gcc/doc/invoke.texi
--- gcc/doc/invoke.texi	(revision 191288)
+++ gcc/doc/invoke.texi	(working copy)
@@ -777,7 +777,7 @@
 -mno-crt0  -mrelax -mliw -msetlb}

 @emph{Moxie Options}
-@gccoptlist{-meb  -mel}
+@gccoptlist{-meb -mel -mno-crt0}

 @emph{PDP-11 Options}
 @gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10 @gol
@@ -16467,6 +16467,10 @@
 @opindex mel
 Generate little-endian code.

+@item -mno-crt0
+@opindex mno-crt0
+Do not link in the C run-time initialization object file.
 @end table

 @node PDP-11 Options

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]