Hi.

On cross compile, I found an abnormal operation of make.sh.

In a cross compile system, mkflags excutable gives wrong result code
although completely created generated/flags.h
So, it goes to "exit 1".

line 177 - 178 in scripts/make.sh
-------------------------------------------------------------------------------------------------

*done | sort -s | sed -n 's/ A / /;t pair;h;s/\([^ ]*\).*/\1 " "/;x;b
single;:pair;h;n;:single;s/[^ ]* B //;H;g;s/\n/ /;p' |\generated/mkflags >
generated/flags.h || exit 1*
---------------------------------------------------------------------------------------------------------------------------------------------

Because above, I analyzed mkflags.c to find the reason why mkflags gives
wrong result code.
The result is that main() returns nothing if it normally exits.
main() function has int return type and it affacts an build process  on a
system.

plz, have a look.


diff --git a/scripts/mkflags.c b/scripts/mkflags.c
index 454fc03..1ae4c40 100644
--- a/scripts/mkflags.c
+++ b/scripts/mkflags.c
@@ -206,4 +206,5 @@ int main(int argc, char *argv[])
     if (i<0) return 1;
     out += i;
   }
+  return 0;
 }

Attachment: 0001-scripts-mkflags.c-main-function-need-return-0-if-nor.patch
Description: Binary data

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to