------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-01-20
09:51 -------
> This patch is a rework of the sparc-rtems* target based upon the ELF
> NetBSD/SPARC target. As a reqork, I was able to also fix
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14537 (unix is predefined).
>
> With this fix, I can build RTEMS and run C and C++ test applications.
Thanks for your efforts.
[Note the bogus reference to PR 14536 in the ChangeLog entry. And the format
is rather PR target/14537 than the other way around.]
> Is it OK to commit?
I'm not very fond of the patch because it trades an explicit dependency on
Solaris for an implicit dependency on NetBSD, bringing the bugs in the process.
For example:
+/* A 64 bit v9 compiler with stack-bias,
+ in a Medium/Low code model environment. */
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ \
+ + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
+
+#undef SPARC_DEFAULT_CMODEL
+#define SPARC_DEFAULT_CMODEL CM_MEDANY
Note the discrepancy between the comment (Medium/Low) and the actual setting
(Medium/Any). Then in the specs
+ %{p:-mcmodel=medlow} \
+ %{pg:-mcmodel=medlow}}"
This code model frobbing is a bug that I've asked the NetBSD maintainers to fix,
with no effect for the time being.
> The sparc-elf target probably be reworked in a similar fashion with some
> sharing with sparc-rtems. If a sparc maintainer feels this is the correct
> thing to do, then let's file a PR against sparc-elf and I will fix that. But
> that is beyond my maintainership responsibility.
The bugreport for sparc-elf was posted yesterday on gcc-patches so I now think
we need to find a generic solution for all the embedded targets. I proposed to
duplicate the Solaris configuration files for them and remove the offending bits
from there; this was agreed upon by Daniel and the RM so I'm going to do it now.
Once the work is done, sparc-rtems will very likely build again so your patch
would not be necessary anymore. But you're an RTEMS maintainer so I can't bar
you from installing it anyway if you deem it profitable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19364