Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] docs/buildroot.html - package make file make command overrides configure script CC setting
@ 2008-10-22 11:36 John Schimandle
  0 siblings, 0 replies; 3+ messages in thread
From: John Schimandle @ 2008-10-22 11:36 UTC (permalink / raw)
  To: buildroot

I've been stumbling through adding a package to buildroot. Although I did
make a successful package I did find a potential problem with the
documenation, buildroot usage and documentation document at
docs/buildroot.html specifically the section entitled "Extending Buildroot
with more software". This section describes the package make file in
package/name/name.mk. It shows an example of the file which I think is
incorrect. Lines 33 and 34 specify a make statement that overrides the
variable settings of CC that are set in configure. The overriding action
causes all makes within the package to have the CC variable set to TARGET_CC
and not the CC variable defined in the configure script. The CC variable in
the configure script is set by TARGET_CONFIGURE_OPTS on line 22 of this
example. TARGET_CONFIGURE_OPTS contains architecture specific information
for the compiler which is important for some packages.
 
Original statement in example
 
33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
34          $(MAKE) CC=$(TARGET_CC) -C $(FOO_DIR)
 
I think the example should have the following statements (line 33 is
unchanged)
 
33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
34          $(MAKE) -C $(FOO_DIR)
 
Now the targets see the full CC arguments that were passed to the configure
script and were written into each Makefile in the package.
 
I don't know if this would be valid for all packages but it seems to me that
you would want to preserve the CC variable setting that was done with the
configure script.
 
Again, I'm not sure how to submit this change to the buildroot tree.
 
Regards,
 
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20081022/b2f0dc99/attachment-0001.htm 

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

* [Buildroot] docs/buildroot.html - package make file make command overrides configure script CC setting
       [not found] <002401c9343a$7b4fe1b0$6901a8c0@iguana3>
@ 2008-10-22 12:38 ` Bernhard Reutner-Fischer
  2008-10-22 15:14   ` [Buildroot] docs/buildroot.html - package make file makecommand " John Schimandle
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Reutner-Fischer @ 2008-10-22 12:38 UTC (permalink / raw)
  To: buildroot

On Wed, Oct 22, 2008 at 04:36:53AM -0700, John Schimandle wrote:
>I've been stumbling through adding a package to buildroot. Although I did
>make a successful package I did find a potential problem with the
>documenation, buildroot usage and documentation document at
>docs/buildroot.html specifically the section entitled "Extending Buildroot
>with more software". This section describes the package make file in
>package/name/name.mk. It shows an example of the file which I think is
>incorrect. Lines 33 and 34 specify a make statement that overrides the
>variable settings of CC that are set in configure. The overriding action
>causes all makes within the package to have the CC variable set to TARGET_CC
>and not the CC variable defined in the configure script. The CC variable in
>the configure script is set by TARGET_CONFIGURE_OPTS on line 22 of this
>example. TARGET_CONFIGURE_OPTS contains architecture specific information
>for the compiler which is important for some packages.
> 
>Original statement in example
> 
>33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
>34          $(MAKE) CC=$(TARGET_CC) -C $(FOO_DIR)
> 
>I think the example should have the following statements (line 33 is
>unchanged)
> 
>33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
>34          $(MAKE) -C $(FOO_DIR)

yes. I suggest you look at how often these documentation receives
updates, compared to the "code" itself..
> 
>Now the targets see the full CC arguments that were passed to the configure
>script and were written into each Makefile in the package.
> 
>I don't know if this would be valid for all packages but it seems to me that

This example should only be used for packages which do not use autotools
(autoconf / automake etc). These packages should use
package/Makefile.autotools.in and _not_ this oldish example code.

>you would want to preserve the CC variable setting that was done with the
>configure script.
> 
>Again, I'm not sure how to submit this change to the buildroot tree.

"
Changes can be submitted for inclusion by posting them to the buildroot
mailing list or to the Bug and Patch Tracking System.
"
(from the webpage)

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

* [Buildroot] docs/buildroot.html - package make file makecommand overrides configure script CC setting
  2008-10-22 12:38 ` [Buildroot] docs/buildroot.html - package make file make command overrides configure script CC setting Bernhard Reutner-Fischer
@ 2008-10-22 15:14   ` John Schimandle
  0 siblings, 0 replies; 3+ messages in thread
From: John Schimandle @ 2008-10-22 15:14 UTC (permalink / raw)
  To: buildroot

Sounds good. I'll submit some changes to the doc.

Might as well update the documentation the best I can since I'm going
through this learning curve on buildroot. That way other newbies can get a
faster start. 

-----Original Message-----
From: Bernhard Reutner-Fischer [mailto:rep.dot.nop at gmail.com] 
Sent: Wednesday, October 22, 2008 5:38 AM
To: John Schimandle
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] docs/buildroot.html - package make file makecommand
overrides configure script CC setting

On Wed, Oct 22, 2008 at 04:36:53AM -0700, John Schimandle wrote:
>I've been stumbling through adding a package to buildroot. Although I 
>did make a successful package I did find a potential problem with the 
>documenation, buildroot usage and documentation document at 
>docs/buildroot.html specifically the section entitled "Extending 
>Buildroot with more software". This section describes the package make 
>file in package/name/name.mk. It shows an example of the file which I 
>think is incorrect. Lines 33 and 34 specify a make statement that 
>overrides the variable settings of CC that are set in configure. The 
>overriding action causes all makes within the package to have the CC 
>variable set to TARGET_CC and not the CC variable defined in the 
>configure script. The CC variable in the configure script is set by 
>TARGET_CONFIGURE_OPTS on line 22 of this example. TARGET_CONFIGURE_OPTS 
>contains architecture specific information for the compiler which is
important for some packages.
> 
>Original statement in example
> 
>33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
>34          $(MAKE) CC=$(TARGET_CC) -C $(FOO_DIR)
> 
>I think the example should have the following statements (line 33 is
>unchanged)
> 
>33  $(FOO_DIR)/$(FOO_BINARY): $(FOO_DIR)/.configured
>34          $(MAKE) -C $(FOO_DIR)

yes. I suggest you look at how often these documentation receives updates,
compared to the "code" itself..
> 
>Now the targets see the full CC arguments that were passed to the 
>configure script and were written into each Makefile in the package.
> 
>I don't know if this would be valid for all packages but it seems to me 
>that

This example should only be used for packages which do not use autotools
(autoconf / automake etc). These packages should use
package/Makefile.autotools.in and _not_ this oldish example code.

>you would want to preserve the CC variable setting that was done with 
>the configure script.
> 
>Again, I'm not sure how to submit this change to the buildroot tree.

"
Changes can be submitted for inclusion by posting them to the buildroot
mailing list or to the Bug and Patch Tracking System.
"
(from the webpage)

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

end of thread, other threads:[~2008-10-22 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <002401c9343a$7b4fe1b0$6901a8c0@iguana3>
2008-10-22 12:38 ` [Buildroot] docs/buildroot.html - package make file make command overrides configure script CC setting Bernhard Reutner-Fischer
2008-10-22 15:14   ` [Buildroot] docs/buildroot.html - package make file makecommand " John Schimandle
2008-10-22 11:36 [Buildroot] docs/buildroot.html - package make file make command " John Schimandle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox