This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386-driver]: Ignore -march and -mtune for native target when not compiled with gcc
- From: Ian Lance Taylor <iant at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 02 Jun 2009 07:09:08 -0700
- Subject: Re: [PATCH, i386-driver]: Ignore -march and -mtune for native target when not compiled with gcc
- References: <5787cf470906020416v336c0afdiaf4906f833f15f51@mail.gmail.com>
Uros Bizjak <ubizjak@gmail.com> writes:
> Attached patch teaches i386 driver to ignore -march and -mtune
> switches for native target when the driver is not compiled with gcc.
> By ignoring the switches, the compiler generates code for its default
> target, which is max that we can do in this case (*). The driver also
> optimizes concatenation of options a bit.
That seems fine to me.
> - sprintf (size, "--param l1-cache-size=%u", level1.sizekb);
> - sprintf (line, "--param l1-cache-line-size=%u", level1.line);
> + sprintf (size, "--param l1-cache-size=%u ", level1.sizekb);
> + sprintf (line, "--param l1-cache-line-size=%u ", level1.line);
As long as you're touching these lines can you change the sprintf to
snprintf? Thanks.
Ian