> On Mar 29, 2022, at 2:38 PM, Andrew Fish via groups.io 
> <afish=apple....@groups.io> wrote:
> 
> 
> 
>> On Mar 29, 2022, at 11:14 AM, gr...@grantlmul.xyz 
>> <mailto:gr...@grantlmul.xyz> wrote:
>> 
>> While I can't test this myself, the following does appear to result in a 
>> successful build using the same clang version:
>> 
>> 
>> diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile 
>> b/BaseTools/Source/C/DevicePath/GNUmakefile
>> index b05d2bddfa..81aa35aa31 100644
>> --- a/BaseTools/Source/C/DevicePath/GNUmakefile
>> +++ b/BaseTools/Source/C/DevicePath/GNUmakefile
>> @@ -14,7 +14,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o 
>> DevicePathFromText.o  DevicePathUtili
>>  include $(MAKEROOT)/Makefiles/app.makefile
>>  
>>  # gcc 12 trips over device path handling
>> -BUILD_CFLAGS += -Wno-error=stringop-overflow
>> +ifeq($(CC), gcc)
>> +  BUILD_CFLAGS += -Wno-error=stringop-overflow
>> +endif
>>  
> 
> Gerd,
> 
> I’m not sure if this was caused by my email client but your fix did not work 
> for me.
> GNUmakefile:17: *** missing separator.  Stop.
> 

Sorry I forgot to mention I was using an Xcode clang on macOS. 

Thanks,

Andrew Fish

> I had to add a space after `ifeq` to get it to work.
> diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile 
> b/BaseTools/Source/C/DevicePath/GNUmakefile
> index b05d2bddfa68..ebab1d3e2617 100644
> --- a/BaseTools/Source/C/DevicePath/GNUmakefile
> +++ b/BaseTools/Source/C/DevicePath/GNUmakefile
> @@ -14,7 +14,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o 
> DevicePathFromText.o  DevicePathUtili
>  include $(MAKEROOT)/Makefiles/app.makefile
>  
>  # gcc 12 trips over device path handling
> -BUILD_CFLAGS += -Wno-error=stringop-overflow
> +ifeq ($(CC), gcc)
> +  BUILD_CFLAGS += -Wno-error=stringop-overflow
> +endif
>  
>  LIBS = -lCommon
>  ifeq ($(CYGWIN), CYGWIN)
> 
> 
> I had been working around like this previously (I’m not sure about the 
> portability of -Wno-unknown-warning-option):
> 
> diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile 
> b/BaseTools/Source/C/DevicePath/GNUmakefile
> index b05d2bddfa68..d08588a81f80 100644
> --- a/BaseTools/Source/C/DevicePath/GNUmakefile
> +++ b/BaseTools/Source/C/DevicePath/GNUmakefile
> @@ -14,7 +14,7 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o 
> DevicePathFromText.o  DevicePathUtili
>  include $(MAKEROOT)/Makefiles/app.makefile
>  
>  # gcc 12 trips over device path handling
> -BUILD_CFLAGS += -Wno-error=stringop-overflow
> +BUILD_CFLAGS += -Wno-error=stringop-overflow -Wno-unknown-warning-option
>  
>  LIBS = -lCommon
>  ifeq ($(CYGWIN), CYGWIN)
> 
> Thanks,
> 
> Andrew Fish
>>  LIBS = -lCommon
>>  ifeq ($(CYGWIN), CYGWIN)
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88207): https://edk2.groups.io/g/devel/message/88207
Mute This Topic: https://groups.io/mt/89997416/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to