All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Compiling files with .S with GCC
@ 2015-04-26 16:55 Wiles, Keith
       [not found] ` <D1628250.1DEA5%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Wiles, Keith @ 2015-04-26 16:55 UTC (permalink / raw)
  To: Wiles, Keith, dev-VfR2kkLFssw



On 4/26/15, 11:53 AM, "Wiles, Keith" <keith.wiles@intel.com> wrote:

>Hi All,
>
>I noticed in my builds with foo.S file I would get a warning from the
>compiler the foo_s.o.tmp linker file will not be used as the code is not
>linked. A strange error and the foo_s.o file would not be created. In the
>mk/internal/rte.compile-pre.mk we have the following
>
># command to assemble a .S file to generate an object
>ifeq ($(USE_HOST),1)
>S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS) $(HOST_EXTRA_CPPFLAGS)
>$< $(@).tmp && \
>    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o $@
>$(@).tmp
>S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
>else
>S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
>$(@).tmp && \
>    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
>S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
>endif
>
>I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this warning
>and get the foo_s.o file created. Using the .s the file name becomes
>foo_s.o.s

Compiler used on Ubuntu 14.04 'gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2'

>
>Did not try this with clang or any other compiler, but I expect we can
>safely change the Œ.tmp¹ to Œ.s¹ IMO
>
>Anyone else notice this problem?
>
>Regards,
>++Keith
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Compiling files with .S with GCC
       [not found] ` <D1628250.1DEA5%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-05-04  8:37   ` Olivier MATZ
       [not found]     ` <55472FE0.6010201-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Olivier MATZ @ 2015-05-04  8:37 UTC (permalink / raw)
  To: Wiles, Keith, dev-VfR2kkLFssw

Hello,

On 04/26/2015 06:55 PM, Wiles, Keith wrote:
> 
> 
> On 4/26/15, 11:53 AM, "Wiles, Keith" <keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> 
>> Hi All,
>>
>> I noticed in my builds with foo.S file I would get a warning from the
>> compiler the foo_s.o.tmp linker file will not be used as the code is not
>> linked. A strange error and the foo_s.o file would not be created. In the
>> mk/internal/rte.compile-pre.mk we have the following
>>
>> # command to assemble a .S file to generate an object
>> ifeq ($(USE_HOST),1)
>> S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS) $(HOST_EXTRA_CPPFLAGS)
>> $< $(@).tmp && \
>>    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o $@
>> $(@).tmp
>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
>> else
>> S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
>> $(@).tmp && \
>>    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
>> endif
>>
>> I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this warning
>> and get the foo_s.o file created. Using the .s the file name becomes
>> foo_s.o.s
> 
> Compiler used on Ubuntu 14.04 'gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2'
> 
>>
>> Did not try this with clang or any other compiler, but I expect we can
>> safely change the Œ.tmp¹ to Œ.s¹ IMO
>>
>> Anyone else notice this problem?

I tested a similar use-case and I don't reproduce the issue.
I don't don't understand why replacing $(@).tmp by $(@).s would
solve it.

The file $(@).tmp is used as a temporary file to store the preprocessed
version of the $(@).s file. I agree that using the .s extension is not
a bad choice (see below), but to me it is not the proper solution to
your problem.

>From https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html

  file.s
     Assembler code.
  file.S
  file.sx
     Assembler code that must be preprocessed.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Compiling files with .S with GCC
       [not found]     ` <55472FE0.6010201-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2015-05-04 14:49       ` Wiles, Keith
       [not found]         ` <D16CD406.1EAA4%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Wiles, Keith @ 2015-05-04 14:49 UTC (permalink / raw)
  To: Olivier MATZ, dev-VfR2kkLFssw



On 5/4/15, 1:37 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>Hello,
>
>On 04/26/2015 06:55 PM, Wiles, Keith wrote:
>> 
>> 
>> On 4/26/15, 11:53 AM, "Wiles, Keith" <keith.wiles@intel.com> wrote:
>> 
>>> Hi All,
>>>
>>> I noticed in my builds with foo.S file I would get a warning from the
>>> compiler the foo_s.o.tmp linker file will not be used as the code is
>>>not
>>> linked. A strange error and the foo_s.o file would not be created. In
>>>the
>>> mk/internal/rte.compile-pre.mk we have the following
>>>
>>> # command to assemble a .S file to generate an object
>>> ifeq ($(USE_HOST),1)
>>> S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS)
>>>$(HOST_EXTRA_CPPFLAGS)
>>> $< $(@).tmp && \
>>>    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o
>>>$@
>>> $(@).tmp
>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
>>> else
>>> S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
>>> $(@).tmp && \
>>>    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
>>> endif
>>>
>>> I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this warning
>>> and get the foo_s.o file created. Using the .s the file name becomes
>>> foo_s.o.s
>> 
>> Compiler used on Ubuntu 14.04 'gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2'
>> 
>>>
>>> Did not try this with clang or any other compiler, but I expect we can
>>> safely change the Œ.tmp¹ to Œ.s¹ IMO
>>>
>>> Anyone else notice this problem?
>
>I tested a similar use-case and I don't reproduce the issue.
>I don't don't understand why replacing $(@).tmp by $(@).s would
>solve it.

In the case I saw the compiler seemed to want the .s to under stand it was
not some other type of file. Not sure why the error occurred in my
external build. We can leave it using .tmp if you like, but I feel .s
would have been the correct name for the file.

If you think it needs to be changed to .s then you can submit a patch or I
can or just leave it along your option.

Regards,
++Keith
>
>The file $(@).tmp is used as a temporary file to store the preprocessed
>version of the $(@).s file. I agree that using the .s extension is not
>a bad choice (see below), but to me it is not the proper solution to
>your problem.
>
>From https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
>
>  file.s
>     Assembler code.
>  file.S
>  file.sx
>     Assembler code that must be preprocessed.
>
>Regards,
>Olivier


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Compiling files with .S with GCC
       [not found]         ` <D16CD406.1EAA4%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-05-04 15:42           ` Olivier MATZ
       [not found]             ` <5547934A.7050600-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Olivier MATZ @ 2015-05-04 15:42 UTC (permalink / raw)
  To: Wiles, Keith, dev-VfR2kkLFssw



On 05/04/2015 04:49 PM, Wiles, Keith wrote:
> 
> 
> On 5/4/15, 1:37 AM, "Olivier MATZ" <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> wrote:
> 
>> Hello,
>>
>> On 04/26/2015 06:55 PM, Wiles, Keith wrote:
>>>
>>>
>>> On 4/26/15, 11:53 AM, "Wiles, Keith" <keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I noticed in my builds with foo.S file I would get a warning from the
>>>> compiler the foo_s.o.tmp linker file will not be used as the code is
>>>> not
>>>> linked. A strange error and the foo_s.o file would not be created. In
>>>> the
>>>> mk/internal/rte.compile-pre.mk we have the following
>>>>
>>>> # command to assemble a .S file to generate an object
>>>> ifeq ($(USE_HOST),1)
>>>> S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS)
>>>> $(HOST_EXTRA_CPPFLAGS)
>>>> $< $(@).tmp && \
>>>>    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o
>>>> $@
>>>> $(@).tmp
>>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
>>>> else
>>>> S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
>>>> $(@).tmp && \
>>>>    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
>>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
>>>> endif
>>>>
>>>> I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this warning
>>>> and get the foo_s.o file created. Using the .s the file name becomes
>>>> foo_s.o.s
>>>
>>> Compiler used on Ubuntu 14.04 'gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2'
>>>
>>>>
>>>> Did not try this with clang or any other compiler, but I expect we can
>>>> safely change the Œ.tmp¹ to Œ.s¹ IMO
>>>>
>>>> Anyone else notice this problem?
>>
>> I tested a similar use-case and I don't reproduce the issue.
>> I don't don't understand why replacing $(@).tmp by $(@).s would
>> solve it.
> 
> In the case I saw the compiler seemed to want the .s to under stand it was
> not some other type of file. Not sure why the error occurred in my
> external build. We can leave it using .tmp if you like, but I feel .s
> would have been the correct name for the file.

Can you send a log of the error you've seen?
Can you reproduce it outside the dpdk framework by trying to assemble
a file called foo.tmp?
This would show that the problem really comes from the extension of
the file.


> 
> If you think it needs to be changed to .s then you can submit a patch or I
> can or just leave it along your option.

Until we really understand the cause of the issue, I don't think this
should be changed. But I'm not opposed to change it if we have a good
justification.


Regards,
Olivier



> 
> Regards,
> ++Keith
>>
>> The file $(@).tmp is used as a temporary file to store the preprocessed
>> version of the $(@).s file. I agree that using the .s extension is not
>> a bad choice (see below), but to me it is not the proper solution to
>> your problem.
>>
>>From https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
>>
>>  file.s
>>     Assembler code.
>>  file.S
>>  file.sx
>>     Assembler code that must be preprocessed.
>>
>> Regards,
>> Olivier
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Compiling files with .S with GCC
       [not found]             ` <5547934A.7050600-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2015-05-04 16:05               ` Wiles, Keith
  0 siblings, 0 replies; 6+ messages in thread
From: Wiles, Keith @ 2015-05-04 16:05 UTC (permalink / raw)
  To: Olivier MATZ, dev-VfR2kkLFssw



On 5/4/15, 8:42 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:

>
>
>On 05/04/2015 04:49 PM, Wiles, Keith wrote:
>> 
>> 
>> On 5/4/15, 1:37 AM, "Olivier MATZ" <olivier.matz@6wind.com> wrote:
>> 
>>> Hello,
>>>
>>> On 04/26/2015 06:55 PM, Wiles, Keith wrote:
>>>>
>>>>
>>>> On 4/26/15, 11:53 AM, "Wiles, Keith" <keith.wiles@intel.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I noticed in my builds with foo.S file I would get a warning from the
>>>>> compiler the foo_s.o.tmp linker file will not be used as the code is
>>>>> not
>>>>> linked. A strange error and the foo_s.o file would not be created. In
>>>>> the
>>>>> mk/internal/rte.compile-pre.mk we have the following
>>>>>
>>>>> # command to assemble a .S file to generate an object
>>>>> ifeq ($(USE_HOST),1)
>>>>> S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS)
>>>>> $(HOST_EXTRA_CPPFLAGS)
>>>>> $< $(@).tmp && \
>>>>>    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o
>>>>> $@
>>>>> $(@).tmp
>>>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
>>>>> else
>>>>> S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
>>>>> $(@).tmp && \
>>>>>    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
>>>>> S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
>>>>> S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
>>>>> endif
>>>>>
>>>>> I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this
>>>>>warning
>>>>> and get the foo_s.o file created. Using the .s the file name becomes
>>>>> foo_s.o.s
>>>>
>>>> Compiler used on Ubuntu 14.04 'gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2'
>>>>
>>>>>
>>>>> Did not try this with clang or any other compiler, but I expect we
>>>>>can
>>>>> safely change the Œ.tmp¹ to Œ.s¹ IMO
>>>>>
>>>>> Anyone else notice this problem?
>>>
>>> I tested a similar use-case and I don't reproduce the issue.
>>> I don't don't understand why replacing $(@).tmp by $(@).s would
>>> solve it.
>> 
>> In the case I saw the compiler seemed to want the .s to under stand it
>>was
>> not some other type of file. Not sure why the error occurred in my
>> external build. We can leave it using .tmp if you like, but I feel .s
>> would have been the correct name for the file.
>
>Can you send a log of the error you've seen?
>Can you reproduce it outside the dpdk framework by trying to assemble
>a file called foo.tmp?
>This would show that the problem really comes from the extension of
>the file.

OK will try, but out of town this week.
>
>
>> 
>> If you think it needs to be changed to .s then you can submit a patch
>>or I
>> can or just leave it along your option.
>
>Until we really understand the cause of the issue, I don't think this
>should be changed. But I'm not opposed to change it if we have a good
>justification.
>
>
>Regards,
>Olivier
>
>
>
>> 
>> Regards,
>> ++Keith
>>>
>>> The file $(@).tmp is used as a temporary file to store the preprocessed
>>> version of the $(@).s file. I agree that using the .s extension is not
>>> a bad choice (see below), but to me it is not the proper solution to
>>> your problem.
>>>
>>>From https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
>>>
>>>  file.s
>>>     Assembler code.
>>>  file.S
>>>  file.sx
>>>     Assembler code that must be preprocessed.
>>>
>>> Regards,
>>> Olivier
>> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Compiling files with .S with GCC
@ 2015-04-26 16:53 Wiles, Keith
  0 siblings, 0 replies; 6+ messages in thread
From: Wiles, Keith @ 2015-04-26 16:53 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Hi All,

I noticed in my builds with foo.S file I would get a warning from the
compiler the foo_s.o.tmp linker file will not be used as the code is not
linked. A strange error and the foo_s.o file would not be created. In the
mk/internal/rte.compile-pre.mk we have the following

# command to assemble a .S file to generate an object
ifeq ($(USE_HOST),1)
S_TO_O = $(CPP) $(HOST_CPPFLAGS) $($(@)_CPPFLAGS) $(HOST_EXTRA_CPPFLAGS)
$< $(@).tmp && \
    $(HOSTAS) $(HOST_ASFLAGS) $($(@)_ASFLAGS) $(HOST_EXTRA_ASFLAGS) -o $@
$(@).tmp
S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  HOSTAS $(@)")
else
S_TO_O = $(CPP) $(CPPFLAGS) $($(@)_CPPFLAGS) $(EXTRA_CPPFLAGS) $< -o
$(@).tmp && \
    $(AS) $(ASFLAGS) $($(@)_ASFLAGS) $(EXTRA_ASFLAGS) -o $@ $(@).tmp
S_TO_O_STR = $(subst ','\'',$(S_TO_O)) #'# fix syntax highlight
S_TO_O_DISP =  $(if $(V),"$(S_TO_O_STR)","  AS $(@)")
endif

I had to change the above Œ.tmp¹ strings to Œ.s¹ to remove this warning
and get the foo_s.o file created. Using the .s the file name becomes
foo_s.o.s


Did not try this with clang or any other compiler, but I expect we can
safely change the Œ.tmp¹ to Œ.s¹ IMO

Anyone else notice this problem?

Regards,
++Keith

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-04 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-26 16:55 Compiling files with .S with GCC Wiles, Keith
     [not found] ` <D1628250.1DEA5%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-04  8:37   ` Olivier MATZ
     [not found]     ` <55472FE0.6010201-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-05-04 14:49       ` Wiles, Keith
     [not found]         ` <D16CD406.1EAA4%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-04 15:42           ` Olivier MATZ
     [not found]             ` <5547934A.7050600-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-05-04 16:05               ` Wiles, Keith
  -- strict thread matches above, loose matches on Subject: below --
2015-04-26 16:53 Wiles, Keith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.