Date: Fri, 23 Feb 2007 14:09:51 -0800 From: "Steven Hillis" <evultrole@gmail.com> To: freebsd-sparc64@freebsd.org Subject: Re: good (working) CFLAGS for SPARC64 Message-ID: <340594530702231409i15b257dwdb39d52a62ab9a0a@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
So, changing the __sparc_v9__ to __sparc64___ in 5 files (something for asm in bind9 and four files in contrib/gcc/config/sparc, only two of which are actually used) makes CPU flags work properly. I do not yet know whether it disables their effects or not (i.e. does setting it to __sparc_v9__ have some effect on the code output, or is it an arbitrary label with optimizations controlled by the -Av9a thing?) I have compiled the tree successfully using mcpu=ultrasparc after very few changes, and am trying to work up a proper benchmark to see if it actually did anything at all. The other side (if this just disabled their effects) consists of replacing all the ifdef __sparc64__ lines with if defined(__sparc64__) || defined(__sparc_v9__) in about 400 places, none of which are just standard lines I can swap out using sed... so I'm hoping I can fix it with the 5 changes rather than the other way around... I'll up a source diff after I get it worked out properly. Incidentally, bzip2 works at exactly the same speed with the mcpu flag set for compile and with a standard compile... that means one of three things: code is already set to ultrasparc || I disabled the mcpu flag effects || ultrasparc has too many cache hits for optimization to matter in compression programs. I don't really know enough about the internals of the GCC optimization settings and how flags affect it to be certain until I get some sort of real number on this (currently I'm trying to just use average build time for buildworld and comparing mcpu'd gcc with non) so if anyone can shed light on what that does (just a quick sentence or two) that would probably help.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?340594530702231409i15b257dwdb39d52a62ab9a0a>