This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386-driver]: Ignore -march and -mtune for native target when not compiled with gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]