From patchwork Sun Jan 29 18:22:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [alpha] : Default to full IEEE compliance mode for Go language. Date: Sun, 29 Jan 2012 08:22:35 -0000 From: Uros Bizjak X-Patchwork-Id: 138458 Message-Id: To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com, Richard Henderson On Fri, Jan 20, 2012 at 12:39 AM, Ian Lance Taylor wrote >> Attached patch adds -mieee to tests that need full IEEE compliance to >> pass. While working on patch, I have noticed that go-test.exp doesn't >> pass DEFAULT_GOCFLAGS to go_target_compile procedure in expected >> format (so, these simply get ignored). With this issue fixed, we can >> add -mieee to DEFAULT_GOCFLAGS. Tests, compiled through torture >> procedure, expects their special flags in a separate driver file. > > And I just have to repeat that this patch is an ugly ugly hack, since > -mieee should be the default.  Perhaps we should investigate having > gcc/go/gospec.c or gcc/go/lang-specs.h somehow add -mieee for those > targets which require it. After trying some other approaches (including adding libgo.spec, similar to java soultion), I think that attached patch is the most straight-forward solution to enable full IEEE compliance to Go language. 2012-01-29 Uros Bizjak * config/alpha/alpha.c (alpha_option_overrride): Default to full IEEE compliance mode for Go language. Tested on alphaev68-pc-linux-gnu, where it fixes all go testsuite failures that depend of full IEEE compliance. OK for mainline? Uros. Index: config/alpha/alpha.c =================================================================== --- config/alpha/alpha.c (revision 183675) +++ config/alpha/alpha.c (working copy) @@ -250,6 +250,11 @@ alpha_option_override (void) SUBTARGET_OVERRIDE_OPTIONS; #endif + /* Default to full IEEE compliance mode for Go language. */ + if (strcmp (lang_hooks.name, "GNU Go") == 0 + && !(target_flags_explicit & MASK_IEEE)) + target_flags |= MASK_IEEE; + alpha_fprm = ALPHA_FPRM_NORM; alpha_tp = ALPHA_TP_PROG; alpha_fptm = ALPHA_FPTM_N;