diff mbox

build: avoid putting local absolute symbols in symbol tables

Message ID 56F4083C02000078000E02BD@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich March 24, 2016, 2:31 p.m. UTC
They're not really useful past the building stage and only needlessly
increase binary file sizes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
build: avoid putting local absolute symbols in symbol tables

They're not really useful past the building stage and only needlessly
increase binary file sizes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -50,6 +50,7 @@ ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/c
 CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+CFLAGS += -Wa,--strip-local-absolute
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
 CFLAGS-$(verbose)       += -DVERBOSE

Comments

Andrew Cooper March 24, 2016, 2:36 p.m. UTC | #1
On 24/03/16 14:31, Jan Beulich wrote:
> They're not really useful past the building stage and only needlessly
> increase binary file sizes.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Douglas Goldstein March 29, 2016, 8:07 p.m. UTC | #2
On 3/24/16 9:31 AM, Jan Beulich wrote:
> They're not really useful past the building stage and only needlessly
> increase binary file sizes.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -50,6 +50,7 @@ ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/c
>  CFLAGS += -nostdinc -fno-builtin -fno-common
>  CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
>  CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
> +CFLAGS += -Wa,--strip-local-absolute
>  CFLAGS += '-D__OBJECT_FILE__="$@"'
>  
>  CFLAGS-$(verbose)       += -DVERBOSE
> 

This was committed as 607044bf9a8c8a8b37666a3a64c0d9b005875b13 and
breaks the build on clang.

https://travis-ci.org/xen-project/xen/jobs/119333381#L1004
https://travis-ci.org/xen-project/xen/jobs/119333382#L1002
Jan Beulich March 30, 2016, 7:51 a.m. UTC | #3
>>> On 29.03.16 at 22:07, <cardoe@cardoe.com> wrote:
> On 3/24/16 9:31 AM, Jan Beulich wrote:
>> They're not really useful past the building stage and only needlessly
>> increase binary file sizes.
>> 
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> 
>> --- a/xen/Rules.mk
>> +++ b/xen/Rules.mk
>> @@ -50,6 +50,7 @@ ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/c
>>  CFLAGS += -nostdinc -fno-builtin -fno-common
>>  CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
>>  CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
>> +CFLAGS += -Wa,--strip-local-absolute
>>  CFLAGS += '-D__OBJECT_FILE__="$@"'
>>  
>>  CFLAGS-$(verbose)       += -DVERBOSE
>> 
> 
> This was committed as 607044bf9a8c8a8b37666a3a64c0d9b005875b13 and
> breaks the build on clang.
> 
> https://travis-ci.org/xen-project/xen/jobs/119333381#L1004 
> https://travis-ci.org/xen-project/xen/jobs/119333382#L1002 

Yet I do not know clang, and hence don't know what to do about it.
Care to suggest a fix (or rather workaround, considering that I'd
expect them to be reasonably command line compatible with gcc)?
Simply omitting the new command line option for clang is clearly
not what we want.

Jan
diff mbox

Patch

--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -50,6 +50,7 @@  ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/c
 CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+CFLAGS += -Wa,--strip-local-absolute
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
 CFLAGS-$(verbose)       += -DVERBOSE