[PATCH] Fix libbacktrace and libiberty tests fail on sanitized GCC due to wrong link options.

Maxim Ostapenko m.ostapenko@partner.samsung.com
Mon Sep 1 08:33:00 GMT 2014


On 09/01/2014 11:29 AM, Jakub Jelinek wrote:
> On Mon, Sep 01, 2014 at 11:19:07AM +0400, Maxim Ostapenko wrote:
>> libiberty/ChangeLog:
>>
>> 2014-09-01  Max Ostapenko  <m.ostapenko@partner.samsung.com>
>>
>> 	* testsuite/Makefile.in(LIBCFLAGS): Add LDFLAGS.
> Space before (.
Ugh, sorry.
>
>>   # Flags to pass down to makes which are built with the target environment.
>>   # The double $ decreases the length of the command line; those variables
>>   # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.  The
>> @@ -3518,9 +3526,9 @@ check-bfd:
>>   	@: $(MAKE); $(unstage)
>>   	@r=`${PWD_COMMAND}`; export r; \
>>   	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
>> -	$(HOST_EXPORTS) \
>> +	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
>>   	(cd $(HOST_SUBDIR)/bfd && \
>> -	  $(MAKE) $(FLAGS_TO_PASS)  check)
>> +	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
> I'd put the double space right before check instead of in between
> different flags, or use a single space everywhere.
Here the first space appears because extra_make_flags (EXTRA_GCC_FLAGS) 
is empty and autogen replaces this with a space. Removing the second one 
will lead to concatinating of $(EXTRA_GCC_FLAGS) and 
$(EXTRA_BOOTSTRAP_FLAGS). I know, two spaces look ugly, but is there 
more convenient way to avoid this?
>> @@ -4392,9 +4400,9 @@ check-opcodes:
>>   	@: $(MAKE); $(unstage)
>>   	@r=`${PWD_COMMAND}`; export r; \
>>   	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
>> -	$(HOST_EXPORTS) \
>> +	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
>>   	(cd $(HOST_SUBDIR)/opcodes && \
>> -	  $(MAKE) $(FLAGS_TO_PASS)  check)
>> +	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
> Ditto etc.
>
>> @@ -6138,7 +6146,7 @@ check-cgen:
>>   	@: $(MAKE); $(unstage)
>>   	@r=`${PWD_COMMAND}`; export r; \
>>   	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
>> -	$(HOST_EXPORTS) \
>> +	$(HOST_EXPORTS)  \
> Why?
This is pretty the same. For all libs, that wouldn't be bootstrapped, 
autogen inserts a space instead of $(EXTRA_HOST_EXPORTS).

Perhaps I should always insert $(EXTRA_HOST_EXPORTS) and 
$(EXTRA_BOOTSTRAP_FLAGS) with empty/nonempty values instead of tracking 
libraries, that would/wouldn't be bootstrapped?

-Maxim
> 	Jakub
>



More information about the Gcc-patches mailing list