[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:28:15 2018
New Revision: 258187

URL: https://gcc.gnu.org/viewcvs?rev=258187=gcc=rev
Log:
Backported from mainline
2018-02-09  Jakub Jelinek  

PR sanitizer/84285
* gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
-static-lib*san.

Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/gcc.c

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

--- Comment #6 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Fri Feb  9 06:44:06 2018
New Revision: 257515

URL: https://gcc.gnu.org/viewcvs?rev=257515=gcc=rev
Log:
PR sanitizer/84285
* gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
-static-lib*san.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcc.c

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread marcandre.lureau at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

--- Comment #4 from Marc-André Lureau  ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 43371 [details]
> gcc8-pr84285.patch
> 
> Untested fix.

Thanks
patch texted successfully.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

--- Comment #3 from Jakub Jelinek  ---
Created attachment 43371
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43371=edit
gcc8-pr84285.patch

Untested fix.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

Jakub Jelinek  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
   Last reconfirmed||2018-02-08
 Resolution|INVALID |---
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Actually, I believe we should treat -static like -static-lib*san for the
purpose of STATIC_LIB*SAN_LIBS.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-02-08 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Martin Liška  ---
For that we have:

-static-libubsan

   When the -fsanitize=undefined option is used to link a program, the
GCC driver automatically links against libubsan.  If libubsan is available as a
shared library, and the -static option is not used, then this links against the
shared version of
   libubsan.  The -static-libubsan option directs the GCC driver to
link libubsan statically, without necessarily linking other libraries
statically.