Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 10:25 AM, SF Markus Elfring
 wrote:

> Can it be that the passing of the adjusted parameter "HOSTCFLAGS" has got a 
> significant
> influence (with unwanted side effects) in this use case?

That's probably it.  If I strip down your advanced original example to just

make defconfig
make HOSTCFLAGS=-S

then I get a similar error:

  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep: 1: scripts/basic/fixdep: .file: not found
scripts/basic/fixdep: 2: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 3: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 4: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 5: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 6: scripts/basic/fixdep: .section: not found

and so forth.  The problem is that, with -S, fixdep isn't build as an
executable:

jim@krebstar:~/linux-next/scripts/basic$ file fixdep
fixdep: assembler source, ASCII text
jim@krebstar:~/linux-next/scripts/basic$ more fixdep
.file"fixdep.c"
.comminsert_extra_deps,4,4
.commtarget,8,8
.commdepfile,8,8
.commcmdline,8,8
.section.rodata

I'm guessing that in your original example you wanted to look at the
assembly output gcc produced; you'd probably have better luck using
objdump for that.

-- 
Jim


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 10:25 AM, SF Markus Elfring
 wrote:

> Can it be that the passing of the adjusted parameter "HOSTCFLAGS" has got a 
> significant
> influence (with unwanted side effects) in this use case?

That's probably it.  If I strip down your advanced original example to just

make defconfig
make HOSTCFLAGS=-S

then I get a similar error:

  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep: 1: scripts/basic/fixdep: .file: not found
scripts/basic/fixdep: 2: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 3: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 4: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 5: scripts/basic/fixdep: .comm: not found
scripts/basic/fixdep: 6: scripts/basic/fixdep: .section: not found

and so forth.  The problem is that, with -S, fixdep isn't build as an
executable:

jim@krebstar:~/linux-next/scripts/basic$ file fixdep
fixdep: assembler source, ASCII text
jim@krebstar:~/linux-next/scripts/basic$ more fixdep
.file"fixdep.c"
.comminsert_extra_deps,4,4
.commtarget,8,8
.commdepfile,8,8
.commcmdline,8,8
.section.rodata

I'm guessing that in your original example you wanted to look at the
assembly output gcc produced; you'd probably have better luck using
objdump for that.

-- 
Jim


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread SF Markus Elfring
> Fine, but my point was to check that the basic things worked before
> trying the complicated, or "advanced" stuff.

Your suggestion is fine in this sense. I can observe that the following command 
variant
works as expected here.

my_build_dir=/tmp/fixdep-check-20161018-1 && mkdir "${my_build_dir}" && 
my_cc=/usr/bin/gcc-6 && make O="${my_build_dir}" HOSTCC="${my_cc}" allmodconfig 
&& make -j6 O="${my_build_dir}" HOSTCC="${my_cc}" drivers/md/


> If, somehow, fixdep didn't work in a basic setup then you'd know it wasn't 
> one of your
> advanced features that was causing the problem.

The command example above is an approximation for the configuration approach
which I would really want instead.


> And if fixdep did work with a basic setup , then that would suggest
> something wrong with your advanced command line.

How do you think about to clarify further which implementation detail could 
trigger
the shown software build difficulty?

Can it be that the passing of the adjusted parameter "HOSTCFLAGS" has got a 
significant
influence (with unwanted side effects) in this use case?

Regards,
Markus


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread SF Markus Elfring
> Fine, but my point was to check that the basic things worked before
> trying the complicated, or "advanced" stuff.

Your suggestion is fine in this sense. I can observe that the following command 
variant
works as expected here.

my_build_dir=/tmp/fixdep-check-20161018-1 && mkdir "${my_build_dir}" && 
my_cc=/usr/bin/gcc-6 && make O="${my_build_dir}" HOSTCC="${my_cc}" allmodconfig 
&& make -j6 O="${my_build_dir}" HOSTCC="${my_cc}" drivers/md/


> If, somehow, fixdep didn't work in a basic setup then you'd know it wasn't 
> one of your
> advanced features that was causing the problem.

The command example above is an approximation for the configuration approach
which I would really want instead.


> And if fixdep did work with a basic setup , then that would suggest
> something wrong with your advanced command line.

How do you think about to clarify further which implementation detail could 
trigger
the shown software build difficulty?

Can it be that the passing of the adjusted parameter "HOSTCFLAGS" has got a 
significant
influence (with unwanted side effects) in this use case?

Regards,
Markus


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 9:38 AM, SF Markus Elfring
 wrote:
>>> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
>>> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && 
>>> my_var="my_${X}" && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer 
>>> ${!my_var}" && LANG=C make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' 
>>> HOSTCFLAGS="-S ${my_parameters}" drivers/md/; done
> …
>> That's a very complicated command line.
>
> I find it "advanced".
>
> It shows a few of my imaginations around a specific software development task.
>
>
>> Does something basic, like
>>
>> make O=/tmp/$$ allmodconfig
>> make O=/tmp/$$
>>
>> work for you?
>
> Not really. - I would like to achieve the automatic selection of a few
> compilation settings by a for loop which I reduced in the shown example
> to one element.

Fine, but my point was to check that the basic things worked before
trying the complicated, or "advanced" stuff.  If, somehow, fixdep
didn't work in a basic setup then you'd know it wasn't one of your
advanced features that was causing the problem.

And if fixdep did work with a basic setup , then that would suggest
something wrong with your advanced command line.
-- 
Jim


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 9:38 AM, SF Markus Elfring
 wrote:
>>> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
>>> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && 
>>> my_var="my_${X}" && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer 
>>> ${!my_var}" && LANG=C make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' 
>>> HOSTCFLAGS="-S ${my_parameters}" drivers/md/; done
> …
>> That's a very complicated command line.
>
> I find it "advanced".
>
> It shows a few of my imaginations around a specific software development task.
>
>
>> Does something basic, like
>>
>> make O=/tmp/$$ allmodconfig
>> make O=/tmp/$$
>>
>> work for you?
>
> Not really. - I would like to achieve the automatic selection of a few
> compilation settings by a for loop which I reduced in the shown example
> to one element.

Fine, but my point was to check that the basic things worked before
trying the complicated, or "advanced" stuff.  If, somehow, fixdep
didn't work in a basic setup then you'd know it wasn't one of your
advanced features that was causing the problem.

And if fixdep did work with a basic setup , then that would suggest
something wrong with your advanced command line.
-- 
Jim


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread SF Markus Elfring
>> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
>> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
>> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && 
>> LANG=C make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="-S 
>> ${my_parameters}" drivers/md/; done
…
> That's a very complicated command line.

I find it "advanced".

It shows a few of my imaginations around a specific software development task.


> Does something basic, like
> 
> make O=/tmp/$$ allmodconfig
> make O=/tmp/$$
> 
> work for you?

Not really. - I would like to achieve the automatic selection of a few
compilation settings by a for loop which I reduced in the shown example
to one element.

I am looking for a "convenient" way to get assembler source files from
the preferrred C compiler for some software build configurations.
I hope that I can avoid the switching of compilation results in the source
file directory hierarchy so that an occasional disassembly by a tool
like "objdump" could be compared.

Regards,
Markus


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread SF Markus Elfring
>> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
>> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
>> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && 
>> LANG=C make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="-S 
>> ${my_parameters}" drivers/md/; done
…
> That's a very complicated command line.

I find it "advanced".

It shows a few of my imaginations around a specific software development task.


> Does something basic, like
> 
> make O=/tmp/$$ allmodconfig
> make O=/tmp/$$
> 
> work for you?

Not really. - I would like to achieve the automatic selection of a few
compilation settings by a for loop which I reduced in the shown example
to one element.

I am looking for a "convenient" way to get assembler source files from
the preferrred C compiler for some software build configurations.
I hope that I can avoid the switching of compilation results in the source
file directory hierarchy so that an occasional disassembly by a tool
like "objdump" could be compared.

Regards,
Markus


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 6:54 AM, SF Markus Elfring
 wrote:
> Hello,
>
> The file "README" contains a section "BUILD directory for the kernel".
> I would like to use the functionality which is described there.
>
> One of my commands for such a build try is working as desired.
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> git checkout next-20161014 && 
> my_off=-O0 && for X in off; do 
> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && make 
> O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="${my_parameters}" 
> allmodconfig; done
> …
> #
> # configuration written to .config
> #
>
>
> I stumble on the following messages for another build command.
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && LANG=C 
> make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="-S 
> ${my_parameters}" drivers/md/; done
> make[1]: Entering directory …
>   HOSTCC  scripts/basic/fixdep - due to command line change
> scripts/basic/fixdep: line 1: .file: command not found
> scripts/basic/fixdep: line 2: .comm: command not found
> …
> scripts/basic/fixdep: line 6: .section: command not found
> scripts/basic/fixdep: line 7: .align: command not found
> scripts/basic/fixdep: line 8: .LC0:: command not found
> scripts/basic/fixdep: line 9: .string: command not found
> …
>
>
> I wonder why this approach does not work so far.
> I would appreciate your advices.

That's a very complicated command line.  Does something basic, like

make O=/tmp/$$ allmodconfig
make O=/tmp/$$

work for you?

-- 
Jim


Re: Difficulties around "fixdep" for the usage of a kernel build output directory

2016-10-18 Thread Jim Davis
On Tue, Oct 18, 2016 at 6:54 AM, SF Markus Elfring
 wrote:
> Hello,
>
> The file "README" contains a section "BUILD directory for the kernel".
> I would like to use the functionality which is described there.
>
> One of my commands for such a build try is working as desired.
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> git checkout next-20161014 && 
> my_off=-O0 && for X in off; do 
> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && make 
> O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="${my_parameters}" 
> allmodconfig; done
> …
> #
> # configuration written to .config
> #
>
>
> I stumble on the following messages for another build command.
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> my_off=-O0 && for X in off; do 
> my_output_dir=${my_build_dir}unchanged/optimisation/${X} && my_var="my_${X}" 
> && my_parameters="-Wall -std=gnu89 -fomit-frame-pointer ${!my_var}" && LANG=C 
> make V=2 O="${my_output_dir}" HOSTCC='/usr/bin/gcc-6' HOSTCFLAGS="-S 
> ${my_parameters}" drivers/md/; done
> make[1]: Entering directory …
>   HOSTCC  scripts/basic/fixdep - due to command line change
> scripts/basic/fixdep: line 1: .file: command not found
> scripts/basic/fixdep: line 2: .comm: command not found
> …
> scripts/basic/fixdep: line 6: .section: command not found
> scripts/basic/fixdep: line 7: .align: command not found
> scripts/basic/fixdep: line 8: .LC0:: command not found
> scripts/basic/fixdep: line 9: .string: command not found
> …
>
>
> I wonder why this approach does not work so far.
> I would appreciate your advices.

That's a very complicated command line.  Does something basic, like

make O=/tmp/$$ allmodconfig
make O=/tmp/$$

work for you?

-- 
Jim