The HP linker for the hppa64-*-hpux* target lacks support for weak undefined symbols. So, we have a stub archive library to resolve various weak undefined symbols. The attached change
adds a stub for the gnu_lto_v1 symbol.  It is now needed for lto.
Tested on hppa64-hp-hpux11.11.  Committed to trunk.

Dave

--
John David Anglin  dave.ang...@bell.net

2018-01-21  John David Anglin  <dang...@gcc.gnu.org>

        PR lto/83452
        * config/pa/stublib.c (L_gnu_lto_v1): New stub definition.
        * config/pa/t-stublib (gnu_lto_v1-stub.o): Add make fragment.
        
Index: config/pa/stublib.c
===================================================================
--- config/pa/stublib.c (revision 256664)
+++ config/pa/stublib.c (working copy)
@@ -115,3 +115,7 @@
   return 0;
 }
 #endif
+
+#ifdef L_gnu_lto_v1
+char gnu_lto_v1;
+#endif
Index: config/pa/t-stublib
===================================================================
--- config/pa/t-stublib (revision 256664)
+++ config/pa/t-stublib (working copy)
@@ -3,7 +3,8 @@
        pthread_default_stacksize_np-stub.o \
        pthread_mutex_lock-stub.o \
        pthread_mutex_unlock-stub.o \
-       pthread_once-stub.o
+       pthread_once-stub.o \
+       gnu_lto_v1-stub.o
 
 rfi-stub.o: $(srcdir)/config/pa/stublib.c
        $(gcc_compile) -c -O2 -DL_register_frame_info $<
@@ -35,6 +36,9 @@
 pthread_once-stub.o: $(srcdir)/config/pa/stublib.c
        $(gcc_compile) -c -O2 -DL_pthread_once $<
 
+gnu_lto_v1-stub.o: $(srcdir)/config/pa/stublib.c
+       $(gcc_compile) -c -O2 -DL_gnu_lto_v1 $<
+
 libgcc_stub.a: $(LIBGCCSTUB_OBJS)
        -rm -rf $@
        $(AR) rc $@ $(LIBGCCSTUB_OBJS)

Reply via email to