Bug 84295 - [7 Regression] glibc failed to build
Summary: [7 Regression] glibc failed to build
Status: CLOSED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 7.3.1
: P1 normal
Target Milestone: 7.4
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-08 20:14 UTC by H.J. Lu
Modified: 2018-02-09 17:26 UTC (History)
2 users (show)

See Also:
Host:
Target: s390x
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-02-09 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2018-02-08 20:14:02 UTC
r257498 on gcc-7-branch caused:

/export/gnu/import/git/toolchain/build/compilers/s390x-linux-gnu/glibc/s390x-linux-gnu/libc_pic.os:
In function `__cmsg_nxthdr':
/export/ssd/git/toolchain/build/compilers/s390x-linux-gnu/glibc-src/s390x-linux-gnu/socket/../sysdeps/unix/sysv/linux/cmsg_nxthdr.c:39:
undefined reference to `__s390_indirect_jump_r1use_r14'
/export/ssd/git/toolchain/build/compilers/s390x-linux-gnu/glibc-src/s390x-linux-gnu/socket/../sysdeps/unix/sysv/linux/cmsg_nxthdr.c:39:
undefined reference to `__s390_indirect_jump_r1use_r14'
collect2: error: ld returned 1 exit status
make[4]: *** [../Makerules:765:
/export/gnu/import/git/toolchain/build/compilers/s390x-linux-gnu/glibc/s390x-linux-gnu/libc.so]
Error 1
make[4]: Leaving directory
'/export/ssd/git/toolchain/build/compilers/s390x-linux-gnu/glibc-src/s390x-linux-gnu/elf'
make[3]: *** [Makefile:215: elf/subdir_lib] Error 2
make[3]: Leaving directory
'/export/ssd/git/toolchain/build/compilers/s390x-linux-gnu/glibc-src/s390x-linux-gnu'
make[2]: *** [Makefile:9: all] Error 2
make[2]: Leaving directory
'/export/ssd/git/toolchain/build/compilers/s390x-linux-gnu/glibc/s390x-linux-gnu'
Comment 1 Andreas Krebbel 2018-02-09 08:55:05 UTC
I'm testing the following fix:

index 62a60e2..298fdd1 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -16135,7 +16135,10 @@ s390_set_current_function (tree fndecl)
      several times in the course of compiling a function, and we don't want to
      slow things down too much or call target_reinit when it isn't safe.  */
   if (fndecl == s390_previous_fndecl)
-    return;
+    {
+      s390_indirect_branch_settings (fndecl);
+      return;
+    }
 
   tree old_tree;
   if (s390_previous_fndecl == NULL_TREE)
Comment 2 Andreas Krebbel 2018-02-09 17:25:06 UTC
Fixed with:

2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/PR84295
	* config/s390/s390.c (s390_set_current_function): Invoke
	s390_indirect_branch_settings also if fndecl didn't change.

gcc/testsuite/ChangeLog:

2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/PR84295
	* gcc.target/s390/pr84295.c: New test.
Comment 3 Andreas Krebbel 2018-02-09 17:26:05 UTC
GCC 7 backport:

https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=257523