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

Unified Diff: ports/gcc-avr/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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/gawk/build.sh ('k') | ports/gcc/nacl.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/gcc-avr/nacl.patch
diff --git a/ports/gcc-avr/nacl.patch b/ports/gcc-avr/nacl.patch
index 00907426512ba64819c9d968cecb73181e3a1a66..5938cc21eaf1f702662ea62d0d8e78c4f4e80509 100644
--- a/ports/gcc-avr/nacl.patch
+++ b/ports/gcc-avr/nacl.patch
@@ -67,20 +67,6 @@ diff --git a/gcc/collect2.c b/gcc/collect2.c
/* On certain systems, we have code that works by scanning the object file
directly. But this code uses system-specific header files and library
functions, so turn it off in a cross-compiler. Likewise, the names of
-@@ -822,8 +831,13 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst,
-
- /* Main program. */
-
-+#if defined(__native_client__)
-+extern "C" int
-+nacl_main (int argc, char **argv)
-+#else
- int
- main (int argc, char **argv)
-+#endif
- {
- enum linker_select
- {
diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h
--- a/gcc/config/i386/cpuid.h
+++ b/gcc/config/i386/cpuid.h
@@ -128,183 +114,6 @@ diff --git a/gcc/configure b/gcc/configure
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
-diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c
---- a/gcc/gcc-ar.c
-+++ b/gcc/gcc-ar.c
-@@ -122,8 +122,13 @@ setup_prefixes (const char *exec_path)
- prefix_from_env ("PATH", &path);
- }
-
--int
-+#if defined(__native_client__)
-+extern "C" int
-+nacl_main (int ac, char **av)
-+#else
-+int
- main (int ac, char **av)
-+#endif
- {
- const char *exe_name;
- char *plugin;
-diff --git a/gcc/gcc-main.c b/gcc/gcc-main.c
---- a/gcc/gcc-main.c
-+++ b/gcc/gcc-main.c
-@@ -35,10 +35,17 @@ along with GCC; see the file COPYING3. If not see
- /* Implement the top-level "main" within the driver in terms of
- driver::main (implemented in gcc.c). */
-
--extern int main (int, char **);
--
--int
--main (int argc, char **argv)
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv);
-+#else
-+int main (int argc, char **argv);
-+#endif
-+
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv)
-+#else
-+int main (int argc, char **argv)
-+#endif
- {
- driver d;
-
-diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c
---- a/gcc/gcov-dump.c
-+++ b/gcc/gcov-dump.c
-@@ -40,7 +40,11 @@ static void tag_counters (const char *, unsigned, unsigned);
- static void tag_summary (const char *, unsigned, unsigned);
- static void dump_working_sets (const char *filename ATTRIBUTE_UNUSED,
- const struct gcov_ctr_summary *summary);
--extern int main (int, char **);
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv);
-+#else
-+int main (int argc, char **argv);
-+#endif
-
- typedef struct tag_format
- {
-@@ -77,8 +81,11 @@ static const tag_format_t tag_table[] =
- {0, NULL, NULL}
- };
-
--int
--main (int argc ATTRIBUTE_UNUSED, char **argv)
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc ATTRIBUTE_UNUSED, char **argv)
-+#else
-+int main (int argc ATTRIBUTE_UNUSED, char **argv)
-+#endif
- {
- int opt;
- const char *p;
-diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
---- a/gcc/gcov-tool.c
-+++ b/gcc/gcov-tool.c
-@@ -570,8 +570,11 @@ process_args (int argc, char **argv)
-
- /* Main function for gcov-tool. */
-
--int
--main (int argc, char **argv)
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv)
-+#else
-+int main (int argc, char **argv)
-+#endif
- {
- const char *p;
- const char *sub_command;
-diff --git a/gcc/gcov.c b/gcc/gcov.c
---- a/gcc/gcov.c
-+++ b/gcc/gcov.c
-@@ -405,10 +405,18 @@ static char *make_gcov_file_name (const char *, const char *);
- static char *mangle_name (const char *, char *);
- static void release_structures (void);
- static void release_function (function_t *);
--extern int main (int, char **);
-
--int
--main (int argc, char **argv)
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv);
-+#else
-+int main (int argc, char **argv);
-+#endif
-+
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv)
-+#else
-+int main (int argc, char **argv)
-+#endif
- {
- int argno;
- int first_arg;
-diff --git a/gcc/gengtype.c b/gcc/gengtype.c
---- a/gcc/gengtype.c
-+++ b/gcc/gengtype.c
-@@ -5195,9 +5195,13 @@ htab_eq_inputfile (const void *x, const void *y)
- return !filename_cmp (get_input_file_name (inpfx), get_input_file_name (inpfy));
- }
-
--
-+#if defined(__native_client__)
-+extern "C" int
-+nacl_main (int argc, char **argv)
-+#else
- int
- main (int argc, char **argv)
-+#endif
- {
- size_t i;
- static struct fileloc pos = { NULL, 0 };
-diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
---- a/gcc/lto-wrapper.c
-+++ b/gcc/lto-wrapper.c
-@@ -1332,8 +1332,11 @@ cont:
-
- /* Entry point. */
-
--int
--main (int argc, char *argv[])
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char *argv[])
-+#else
-+int main (int argc, char *argv[])
-+#endif
- {
- const char *p;
-
-diff --git a/gcc/main.c b/gcc/main.c
---- a/gcc/main.c
-+++ b/gcc/main.c
-@@ -24,14 +24,21 @@ along with GCC; see the file COPYING3. If not see
- #include "diagnostic-core.h"
- #include "toplev.h"
-
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv);
-+#else
- int main (int argc, char **argv);
-+#endif
-
- /* We define main() to call toplev::main(), which is defined in toplev.c.
- We do this in a separate file in order to allow the language front-end
- to define a different main(), if it so desires. */
-
--int
--main (int argc, char **argv)
-+#if defined(__native_client__)
-+extern "C" int nacl_main (int argc, char **argv)
-+#else
-+int main (int argc, char **argv)
-+#endif
- {
- toplev toplev (true, /* use_TV_TOTAL */
- true /* init_signals */);
diff --git a/libcpp/lex.c b/libcpp/lex.c
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
« no previous file with comments | « ports/gawk/build.sh ('k') | ports/gcc/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698