bbconfig.h: Yes, it seems to be a different file that is not generated by scripts/mkconfigs. include/config/bbconfig.h looks to be only a single line, and it does not have quotes or "\n" in the file like include/bbconfigopts.h. Whether built with dash or bash using the unmodified mkconfigs, both include/config/bbconfig.h files look like this:
<br><br>#define CONFIG_BBCONFIG 1<br><br>I don't think scripts/mkconfigs generates include/config/bbconfig.h, I think it only generates bbconfigopts.h, despite the comment in the header. The main evidence for this is that the include define for the .h file it generates is always "_BBCONFIGOPTS_H", and is always generated. include/config/bbconfig.h does not contain any of the text that is always generated.
<br><br>To be honest, though, I am not sure what IS generating the include/config/bbconfig.h file. Some quick greps through the source tree do not turn anything up, but I know that this file gets replaced with a #undef CONFIG_BBCONFIG when that option is turned off.
<br><br>I could also clean up the comments and submit another patch if you are interested. There is another error in the comments where it refers to scripts/config/mkconfigs instead of scripts/mkconfigs, which is propogated to the generated
bbconfigopts.h.<br><br>ash: I just tested with ash. The unmodified version does work with the bbox ash. The unmodified version also works with bash, in case that wasn't clear from my other email. The modified version also works with ash, bash, and dash.
<br><br>I agree, presumably there was a reason. Maybe someone can shed some light. I will share some of my thoughts.<br><br>It might be that the reason for using the echo "` ... `" construction is simply to make the script look nicer, since the other lines in the script are all echo statements.
<br><br>The only difference that I see using an echo "` ... `" versus direct execution of the command is that the echo statement could process escape characters from the output of the backquote command. If it isn't the intent to process escape characters, then it seems like it might as well execute the command directly. In this case, the echo command of "dash" IS processing the escape characters, and this causes a problem, so it certainly doesn't seem like the intent is to use echo to process escape characters (which seems like a dubious intent, anyway.)
<br><br>The mkconfigs script appears to be simple. As the comments state, it is pulling lines from .config which start with "CONFIG_" or "# CONFIG_", replacing " with \", and prints each line as "<string>\n".
<br><br><br><div><span class="gmail_quote">On 2/3/07,
<b class="gmail_sendername">
Denis Vlasenko</b> <<a href="mailto:vda.linux@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vda.linux@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Saturday 03 February 2007 06:14, Brion Finlay wrote:<br>> Thanks for the responses. It helped knowing that my gnu compiler/c library<br>> configuration was correct. It also helped knowing what the<br>> bbconfigopts.hwas
supposed to look like.<br>><br>> I did some digging into the problem and found the following. The immediate<br>> cause of my problem is that Ubuntu 6.1 uses the "dash" shell 0.5.3-3 for<br>> /bin/sh. At the same time, scripts/mkconfigs uses an echo "`...`"
<br>> construction for generating bbconfigopts.h. This construction contains a<br>> "\n" sequence, which the dash echo command interprets literally. (See the<br>> attached bbconfigopts.h production to see what happens.)
<br>><br>> Linking /bin/sh to /bin/bash resolved this problem and allowed the build to<br>> complete successfully.<br>><br>> The fix that could be made to scripts/mkconfigs in order to work more<br>> generally, be less indirect, and avoid some of the backslash quoting would
<br>> be to eliminate the echo "`...`" construction and just execute the command<br>> directly. That is, change this:<br>><br>> echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print
<br>> "\\"" $0 "\\\\n\\"";}'`"<br>><br>> to this:<br>><br>> sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0
<br>> "\\n\"";}'<br>><br>> I tested this change under bash and dash and it works in both shells.<br><br>There is presumably a reason why it is done that way. Is bbconfig.h different?<br><br>Another question, does it (unmodified version, that is) work with bbox ash?
<br>--<br>vda<br></blockquote></div><br>