Ideas Needed for GCC internal Specs

Joel Sherrill joel at rtems.org
Sat Dec 23 15:44:16 UTC 2017


Hi

I have tried the following patch with gcc's master on the sparc/erc32 with
an
empty bsp_specs. It still is linking with crt0.o. I don't see where it is
coming from.
Do I have a subtle typo or is there something else I am missing?

Thanks

--joel

====================================
iff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index 439199d..2f592bb 100644
--- a/gcc/config/rtems.h
+++ b/gcc/config/rtems.h
@@ -30,11 +30,16 @@
  * Dummy start/end specification to let linker work as
  * needed by autoconf scripts using this compiler.
  */
+#if 0
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "crt0.o%s"
+#endif

+
+#if 0
 #undef ENDFILE_SPEC
 #define ENDFILE_SPEC   ""
+#endif

 /*
  * Some targets do not set up LIB_SPECS, override it, here.
diff --git a/gcc/config/sparc/rtemself.h b/gcc/config/sparc/rtemself.h
index 0fb56ee..1ad1d42 100644
--- a/gcc/config/sparc/rtemself.h
+++ b/gcc/config/sparc/rtemself.h
@@ -38,3 +38,6 @@

 /* Use the default */
 #undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{!qrtems: crt0.o%s} crti.o%s crtbegin.o%s"

====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20171223/8fda98dd/attachment.html>


More information about the devel mailing list