[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2015-02-07 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.9.3   |5.0

--- Comment #6 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Both issues are fixed on trunk. Closing.


[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|4.9.2   |4.9.3

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
GCC 4.9.2 has been released.


[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-07-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|4.9.1   |4.9.2

--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org ---
GCC 4.9.1 has been released.


[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-04-30 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||steffen at hauihau dot de

--- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
*** Bug 60964 has been marked as a duplicate of this bug. ***


[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-04-22 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

Version|4.9.0   |4.9.1
   Target Milestone|--- |4.9.1


[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-03-22 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

--- Comment #2 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Variation of the problem without -march=native:

markus@x4 tmp % cat foo.ii
markus@x4 tmp % cat bar.ii
typedef int __m128i __attribute__ ((__vector_size__ (16)));
__m128i a, b, c;
void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); }
markus@x4 tmp % cat main.ii
void dequant_scaling();
int main () 
{
  dequant_scaling();
}
markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -c foo.ii
markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -msse4.1 -c bar.ii
markus@x4 tmp % g++ -flto -march=native -O2 -shared foo.o bar.o
markus@x4 tmp % ar cr test.a foo.o bar.o
markus@x4 tmp % g++ -march=amdfam10 -O2 main.ii test.a
bar.ii: In function ‘dequant_scaling’:
bar.ii:3:61: error: ‘__builtin_ia32_pmulld128’ needs isa option -m32 -msse4.1
 void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); }
 ^
lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/g++ returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug target/60607] -march=native command line option handling breaks LTO option machinery

2014-03-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Keywords||lto
   Last reconfirmed||2014-03-21
  Component|lto |target
 Ever confirmed|0   |1
Summary|Missing lto command line|-march=native command line
   |option handling causes  |option handling breaks LTO
   |build failures  |option machinery
   Severity|enhancement |normal

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
The issue is that -march=native explodes to explicit set options, including
negative ones such as -mno-sse4.1.  That's bad, as we now have conflicting
options for bar.o and foo.o which we merge like

  /* Do what the old LTO code did - collect exactly one option
 setting per OPT code, we pick the first we encounter.
 ???  This doesn't make too much sense, but when it doesn't
 then we should complain.  */

I think this option exploding done by -march=native is simply broken.

At least exploding to full positive _and_ negative lists is.  Either we
have a separate option for each target feature - then we don't need the
-mno-xxx stuff, or we don't - then we need to fix that.

Note that the plan for the future is to no longer merge any target options
for link-time but use target attributes more aggressively.  The current code
merely tries to make the link-step succeed somehow, not follow what the
user intended with setting specific target options on specific TUs.