diff mbox series

Fix GCC_LINUX_FUTEX to work with C99 compilers

Message ID 875zm5hkf1.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series Fix GCC_LINUX_FUTEX to work with C99 compilers | expand

Commit Message

Florian Weimer Sept. 6, 2019, 8:57 a.m. UTC
Without this change, libstdc++ is built without futex symbols if GCC
rejects implicit function declarations in default mode.

Thanks,
Florian

config/ChangeLog:

2019-09-06  Florian Weimer  <fweimer@redhat.com>

	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
	function.

libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:

2019-09-06  Florian Weimer  <fweimer@redhat.com>

	* configure: Regenerate.

Comments

Jonathan Wakely Sept. 6, 2019, 10:09 a.m. UTC | #1
On 06/09/19 10:57 +0200, Florian Weimer wrote:
>Without this change, libstdc++ is built without futex symbols if GCC
>rejects implicit function declarations in default mode.
>
>Thanks,
>Florian
>
>config/ChangeLog:
>
>2019-09-06  Florian Weimer  <fweimer@redhat.com>
>
>	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
>	function.
>
>libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:
>
>2019-09-06  Florian Weimer  <fweimer@redhat.com>
>
>	* configure: Regenerate.

I can't approve the top-level part but it's OK from the libstdc++ side
(for release branches too if desired).
Jakub Jelinek Sept. 6, 2019, 10:18 a.m. UTC | #2
On Fri, Sep 06, 2019 at 10:57:06AM +0200, Florian Weimer wrote:
> Without this change, libstdc++ is built without futex symbols if GCC
> rejects implicit function declarations in default mode.
> 
> Thanks,
> Florian
> 
> config/ChangeLog:
> 
> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
> 
> 	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
> 	function.
> 
> libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:
> 
> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
> 
> 	* configure: Regenerate.

Ok, thanks.

	Jakub
Jeff Law Sept. 6, 2019, 2:46 p.m. UTC | #3
On 9/6/19 2:57 AM, Florian Weimer wrote:
> Without this change, libstdc++ is built without futex symbols if GCC
> rejects implicit function declarations in default mode.
> 
> Thanks,
> Florian
> 
> config/ChangeLog:
> 
> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
> 
> 	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
> 	function.
> 
> libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:
> 
> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
> 
> 	* configure: Regenerate.
Do you think it's worthwhile for me to pause the builder, update the
compiler with this patch and restart stuff that's failed?  It's not hard
to do.

jeff
Florian Weimer Sept. 6, 2019, 2:49 p.m. UTC | #4
* Jeff Law:

> On 9/6/19 2:57 AM, Florian Weimer wrote:
>> Without this change, libstdc++ is built without futex symbols if GCC
>> rejects implicit function declarations in default mode.
>> 
>> Thanks,
>> Florian
>> 
>> config/ChangeLog:
>> 
>> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
>> 
>> 	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
>> 	function.
>> 
>> libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:
>> 
>> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
>> 
>> 	* configure: Regenerate.

> Do you think it's worthwhile for me to pause the builder, update the
> compiler with this patch and restart stuff that's failed?  It's not hard
> to do.

Yes, I think it's absolutely necessary.  Anything Qt-related fails to
build right now, and many more C++ programs are affected

Would it help if I backport the patches to the GCC 9 branch?  Or do you
just want to stick it to the existing implicit function declaration
patch?

Thanks,
Florian
Jeff Law Sept. 6, 2019, 2:56 p.m. UTC | #5
On 9/6/19 8:49 AM, Florian Weimer wrote:
> * Jeff Law:
> 
>> On 9/6/19 2:57 AM, Florian Weimer wrote:
>>> Without this change, libstdc++ is built without futex symbols if GCC
>>> rejects implicit function declarations in default mode.
>>>
>>> Thanks,
>>> Florian
>>>
>>> config/ChangeLog:
>>>
>>> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
>>>
>>> 	* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
>>> 	function.
>>>
>>> libgomp/ChangeLog, libitm/ChangeLog, libstdc++-v3/ChangeLog:
>>>
>>> 2019-09-06  Florian Weimer  <fweimer@redhat.com>
>>>
>>> 	* configure: Regenerate.
> 
>> Do you think it's worthwhile for me to pause the builder, update the
>> compiler with this patch and restart stuff that's failed?  It's not hard
>> to do.
> 
> Yes, I think it's absolutely necessary.  Anything Qt-related fails to
> build right now, and many more C++ programs are affected
> 
> Would it help if I backport the patches to the GCC 9 branch?  Or do you
> just want to stick it to the existing implicit function declaration
I just shoved it into the implicit function declaration patch.  New gcc
is building, which will take about an hour.

Given I'm going to restart anything that's failed, I'm going to let the
builder keep chewing through packages while the new compiler builds.


jeff
diff mbox series

Patch

Index: config/futex.m4
===================================================================
--- config/futex.m4	(revision 275450)
+++ config/futex.m4	(working copy)
@@ -22,6 +22,7 @@ 
 	AC_LINK_IFELSE(
 	 [AC_LANG_PROGRAM(
 	  [#include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;],
 	  [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],
 	  [save_LIBS="$LIBS"
@@ -48,6 +49,7 @@ 
 	AC_LINK_IFELSE(
 	 [AC_LANG_PROGRAM(
 	  [#include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;],
 	  [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[],
 	  [AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])])
Index: libgomp/configure
===================================================================
--- libgomp/configure	(revision 275450)
+++ libgomp/configure	(working copy)
@@ -15888,6 +15888,7 @@ 
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()
@@ -15940,6 +15941,7 @@ 
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()
Index: libitm/configure
===================================================================
--- libitm/configure	(revision 275450)
+++ libitm/configure	(working copy)
@@ -16481,6 +16481,7 @@ 
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()
@@ -16533,6 +16534,7 @@ 
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure	(revision 275450)
+++ libstdc++-v3/configure	(working copy)
@@ -72670,6 +72670,7 @@ 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()
@@ -72728,6 +72729,7 @@ 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+	   #include <unistd.h>
 	   int lk;
 int
 main ()