[PATCH] Implement a workaround for GNU mak jobserver

Martin Liška mliska@suse.cz
Thu Oct 29 09:40:50 GMT 2020


On 10/27/20 8:12 PM, H.J. Lu via Binutils wrote:
> On Tue, Oct 27, 2020 at 11:58 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Okt 27 2020, H.J. Lu wrote:
>>
>>> The problem is that the new Makefile triggers regenerating ldemul-list.h.
>>
>> Why is that a problem?
>>
> 
> You can try PGO+LTO build without touch -r.
> Martin, can you help Andreas reproduce the issue?

I'm sorry but I don't understand the details of the discussion.

In general, LTO leverages jobserver and one needs to use '+' for sub-rules as
documented in the GCC manual:

"""
You can also specify -flto=jobserver to use GNU make’s job server mode to determine the number of parallel jobs. This is useful when the Makefile calling GCC is already executing in parallel. You must prepend a ‘+’ to the command recipe in the parent Makefile for this to work. This option likely only works if MAKE is GNU make. Even without the option value, GCC tries to automatically detect a running GNU make’s job server.
"""

Martin


More information about the Binutils mailing list