[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gitlab breakage: [PATCH] Config.mk: correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS



Hi Jan,

This patch breaks the gitlab-ci pipeline, specifically it breaks the
hvmloader build with clang:


https://gitlab.com/xen-project/xen/-/pipelines/634274727
https://gitlab.com/xen-project/xen/-/jobs/2996114313

make[7]: Entering directory '/builds/xen-project/xen/tools/firmware/hvmloader'
clang   -m32 -march=i686 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall 
-Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-local-typedefs   
-O2 -fomit-frame-pointer 
-D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ -MMD -MP -MF 
.hvmloader.o.d -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-mno-tls-direct-seg-refs  -DNDEBUG -Werror -fno-pie -no-pie 
-fno-stack-protector -fno-exceptions -fno-asynchronous-unwind-tables 
-fcf-protection=none -ffreestanding -msoft-float -nostdinc 
-I/builds/xen-project/xen/tools/firmware/hvmloader/../../../tools/firmware/include
 -I/builds/xen-project/xen/tools/firmware/hvmloader/../../../tools/include 
-D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ -I../../libacpi  
-c -o hvmloader.o hvmloader.c 
clang: error: argument unused during compilation: '-nopie' 
[-Werror,-Wunused-command-line-argument]

Cheers,

Stefano


On Thu, 25 Aug 2022, Jan Beulich wrote:
> I haven't been able to find evidence of "-nopie" ever having been a
> supported compiler option. The correct spelling is "-no-pie".
> Furthermore like "-pie" this is an option which is solely passed to the
> linker. The compiler only recognizes "-fpie" / "-fPIE" / "-fno-pie", and
> it doesn't infer these options from "-pie" / "-no-pie".
> 
> Add the compiler recognized form, but for the possible case of the
> variable also being used somewhere for linking keep the linker option as
> well (with corrected spelling).
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- unstable.orig/Config.mk   2022-04-07 12:23:27.000000000 +0200
> +++ unstable/Config.mk        2022-08-25 08:58:00.044287451 +0200
> @@ -188,7 +188,7 @@ endif
>  APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
>  APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
>  
> -EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
> +EMBEDDED_EXTRA_CFLAGS := -fno-pie -no-pie -fno-stack-protector 
> -fno-stack-protector-all
>  EMBEDDED_EXTRA_CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables
>  
>  XEN_EXTFILES_URL ?= http://xenbits.xen.org/xen-extfiles
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.