[Bug driver/55781] -shared-libgcc does not completely undo -static-libgcc

2019-07-13 Thread maskray at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55781

Fangrui Song  changed:

   What|Removed |Added

 CC||maskray at google dot com

--- Comment #1 from Fangrui Song  ---
Still the case with gcc 9

% gcc a.o -static-libgcc -shared-libgcc '-###' |& grep -P --color '[-]lgcc\S+'
...  -lgcc -lgcc_eh -lc -lgcc -lgcc_eh

% g++ a.o -static-libgcc -shared-libgcc '-###' |& grep -P --color '[-]lgcc\S+'
... -lgcc -lgcc_eh -lc -lgcc -lgcc_eh

That is probably because it is difficult to take the last argument of
-static-libgcc and -shared-libgcc?

% gcc -dumpspecs
...
*libgcc:
%{static|static-libgcc|static-pie:-lgcc
-lgcc_eh}%{!static:%{!static-libgcc:%{!static-pie:%{!shared-libgcc:-lgcc
--push-state --as-needed -lgcc_s --pop-state}%{shared-libgcc:-lgcc_s%{!shared:
-lgcc}

[Bug target/65248] Copy relocation against protected symbol doesn't work

2019-06-17 Thread maskray at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248

Fangrui Song  changed:

   What|Removed |Added

 CC||maskray at google dot com

--- Comment #13 from Fangrui Song  ---
Ping (I hope this can be reopened)

Since we have R_*_GOTPCRELX now, we should fix the protected data issue
properly (by deleting the default HAVE_LD_PIE_COPYRELOC=1 behavior introduced
in gcc 5).

See https://gcc.gnu.org/ml/gcc/2019-05/msg00215.html