+ git-klibc-mktemp-fix.patch added to -mm tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
usr/dash/mkbuiltins line 40
Quoted 9 lines · On Sat, Apr 08, 2006 at 12:05:54AM -0700, [email protected] wrote:
diff -puN
usr/dash/mkbuiltins~git-klibc-mktemp-fixusr/dash/mkbuiltinsusr/dash/mkbuiltins renamed from usr/dash/mkbuiltins~git-klibc-mktemp-fix +1
-1@@ -37,7 +37,7 @@ tempfile=tempfile if ! type tempfile > /dev/null 2>&1; then - tempfile=mktemp + tempfile="mktemp /tmp/tmp.XXXXXX"
Shouldn't that be:
usr/dash/mkbuiltins line 41
Quoted 1 line
usr/dash/mkbuiltins renamed from usr/dash/mkbuiltins~git-klibc-mktemp-fix +1
-0+ tempfile="$(mktemp /tmp/tmp.XXXXXX)"
Sam
Quoted 6 lines · Sam Ravnborg
Quoted 5 lines · On Sat, Apr 08, 2006 at 12:05:54AM -0700, [email protected] wrote:
diff -puN
usr/dash/mkbuiltins~git-klibc-mktemp-fixusr/dash/mkbuiltinsusr/dash/mkbuiltins renamed from usr/dash/mkbuiltins~git-klibc-mktemp-fix +0
-0@@ -37,7 +37,7 @@
Quoted 8 lines
usr/dash/mkbuiltins line 40
Quoted 4 lines
usr/dash/mkbuiltins renamed from usr/dash/mkbuiltins~git-klibc-mktemp-fix +1
-1tempfile=tempfile if ! type tempfile > /dev/null 2>&1; then - tempfile=mktemp + tempfile="mktemp /tmp/tmp.XXXXXX"Shouldn't that be:
usr/dash/mkbuiltins line 41
Quoted 1 line
usr/dash/mkbuiltins renamed from usr/dash/mkbuiltins~git-klibc-mktemp-fix +1
-0+ tempfile="$(mktemp /tmp/tmp.XXXXXX)"
No, it's invoked later on as:
temp=$($tempfile)
temp2=$($tempfile)
Either which way; I have a better fix for the bison issue (this all has to do with the fact that make's handling of tools that output more than one file at a time is at the very best insane); however, I'm getting rather unhappy with some of the code in dash.
In particular, mksyntax.c seems to assume it runs on the same machine that the resulting code is going to execute on, for example, it tries to detect whether or not "char" is signed, but that doesn't work when cross-compiling.
dash isn't actually necessary in the in-kernel build, although it's a very nice bonus for customizing initramfs to have a shell to glue things together with.
Herbert: can the code be restructured with appropriate casts so that signed/unsigned is factored out of mksyntax? As it currently stands, it's not cross-compile-safe, which is unacceptable.
-hpa
Quoted 4 lines · H. Peter Anvin
Herbert: can the code be restructured with appropriate casts so that signed/unsigned is factored out of mksyntax? As it currently stands, it's not cross-compile-safe, which is unacceptable.
Sure, I'll send you a patch to convert it to always use unsigned char.
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 3 lines · "H. Peter Anvin" (on Sat, 08 Apr 2006 13:27:06 -0700) wrote:
Either which way; I have a better fix for the bison issue (this all has to do with the fact that make's handling of tools that output more than one file at a time is at the very best insane)
Hit the same problem back in the 2.5 kbuild days, and worked around it with some dummy dependency rules. Like this one for bison/yacc.
side_effect(aicasm_gram.tab.h aicasm_gram.tab.c)
which expands to
$(objtree)/aicasm_gram.tab.h: $objtree/aicasm_gram.tab.c
@/bin/true
That forces make to wait until aicasm_gram.tab.c is built before using aicasm_gram.tab.h, and allows the following code to depend on either aicasm_gram.tab.h or aicasm_gram.tab.c without any races. The command should not get executed, but you still need a command to keep make happy.
Quoted 10 lines · Keith Owens
Quoted 1 line · "H. Peter Anvin" (on Sat, 08 Apr 2006 13:27:06 -0700) wrote:
Either which way; I have a better fix for the bison issue (this all has to do with the fact that make's handling of tools that output more than one file at a time is at the very best insane)
Hit the same problem back in the 2.5 kbuild days, and worked around it with some dummy dependency rules. Like this one for bison/yacc.
side_effect(aicasm_gram.tab.h aicasm_gram.tab.c)which expands to
Quoted 8 lines
$(objtree)/aicasm_gram.tab.h:
$objtree/aicasm_gram.tab.c@/bin/trueThat forces make to wait until
aicasm_gram.tab.cis built before usingaicasm_gram.tab.h, and allows the following code to depend on eitheraicasm_gram.tab.horaicasm_gram.tab.cwithout any races. The command should not get executed, but you still need a command to keep make happy.
A better way to do it for something like yacc/bison is to use a pattern rule. Having two things on the LHS means different things for explicit and for pattern rules!
-hpa