Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ports/toybox/nacl.patch

Issue 1417223003: Switch from using 'nacl_main' to 'main' entry point (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/toybox/build.sh ('k') | ports/tree/build.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/.config b/.config 1 diff --git a/.config b/.config
2 --- a/.config 2 --- a/.config
3 +++ b/.config 3 +++ b/.config
4 @@ -1,81 +1,81 @@ 4 @@ -1,81 +1,81 @@
5 # 5 #
6 # Automatically generated make config: don't edit 6 # Automatically generated make config: don't edit
7 # ToyBox version: KCONFIG_VERSION 7 # ToyBox version: KCONFIG_VERSION
8 -# Mon Nov 18 07:48:07 2013 8 -# Mon Nov 18 07:48:07 2013
9 +# Fri Jan 3 14:13:06 2014 9 +# Fri Jan 3 14:13:06 2014
10 # 10 #
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 607
608 +#define _SKIP_LIBC_HEADERS 608 +#define _SKIP_LIBC_HEADERS
609 +#include <setjmp.h> 609 +#include <setjmp.h>
610 +#include <stdio.h> 610 +#include <stdio.h>
611 #include "toys.h" 611 #include "toys.h"
612 612
613 #undef NEWTOY 613 #undef NEWTOY
614 diff --git a/scripts/make.sh b/scripts/make.sh 614 diff --git a/scripts/make.sh b/scripts/make.sh
615 --- a/scripts/make.sh 615 --- a/scripts/make.sh
616 +++ b/scripts/make.sh 616 +++ b/scripts/make.sh
617 @@ -162,9 +162,11 @@ echo "Library probe..." 617 @@ -165,6 +165,7 @@ echo "Library probe..."
618 # that doesn't exist, so we have to detect and skip nonexistent libraries 618 OPTLIBS="$(for i in util crypt m; do echo "int main(int argc, char *argv[]) {re turn 0;}" | ${CROSS_COMPILE}${CC} -xc - -o /dev/null -Wl,--as-needed -l$i > /dev /null 2>/dev/null && echo -l$i; done)"
619 # for it.
620
621 -OPTLIBS="$(for i in util crypt m; do echo "int main(int argc, char *argv[]) {re turn 0;}" | ${CROSS_COMPILE}${CC} -xc - -o /dev/null -Wl,--as-needed -l$i > /dev /null 2>/dev/null && echo -l$i; done)"
622 +OPTLIBS="$(for i in glibc-compat nacl_io util crypt m; do echo "int main(int ar gc, char *argv[]) {return 0;}" | ${CROSS_COMPILE}${CC} -xc - -o /dev/null -Wl,-- as-needed -l$i > /dev/null 2>/dev/null && echo -l$i; done)"
623 619
624 echo "Compile toybox..." 620 echo "Compile toybox..."
625 +OPTLIBS="${LDFLAGS}" 621 +OPTLIBS="${LIBS}"
626 +echo $OPTLIBS
627 622
628 do_loudly() 623 do_loudly()
629 { 624 {
625 @@ -172,7 +173,7 @@ do_loudly()
626 "$@"
627 }
628
629 -do_loudly ${CROSS_COMPILE}${CC} $CFLAGS -I . -o toybox_unstripped $OPTIMIZE \
630 +do_loudly ${CROSS_COMPILE}${CC} $CFLAGS $LDFLAGS -I . -o toybox_unstripped $OPT IMIZE \
631 main.c lib/*.c $TOYFILES -Wl,--as-needed $OPTLIBS || exit 1
632 do_loudly ${CROSS_COMPILE}${STRIP} toybox_unstripped -o toybox || exit 1
633 # gcc 4.4's strip command is buggy, and doesn't set the executable bit on
630 diff --git a/toys.h b/toys.h 634 diff --git a/toys.h b/toys.h
631 --- a/toys.h 635 --- a/toys.h
632 +++ b/toys.h 636 +++ b/toys.h
633 @@ -5,6 +5,8 @@ 637 @@ -5,6 +5,8 @@
634 638
635 #include "generated/config.h" 639 #include "generated/config.h"
636 640
637 +#ifndef _SKIP_LIBC_HEADERS 641 +#ifndef _SKIP_LIBC_HEADERS
638 + 642 +
639 #include "lib/portability.h" 643 #include "lib/portability.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 + return gr_name; 836 + return gr_name;
833 +#else 837 +#else
834 struct group *gr = getgrgid(gid); 838 struct group *gr = getgrgid(gid);
835 839
836 sprintf(TT.gid_buf, "%u", (unsigned)gid); 840 sprintf(TT.gid_buf, "%u", (unsigned)gid);
837 return gr ? gr->gr_name : TT.gid_buf; 841 return gr ? gr->gr_name : TT.gid_buf;
838 +#endif 842 +#endif
839 } 843 }
840 844
841 // Figure out size of printable entry fields for display indent/wrap 845 // Figure out size of printable entry fields for display indent/wrap
OLDNEW
« no previous file with comments | « ports/toybox/build.sh ('k') | ports/tree/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698