blob: 8757b4b74b14b57773974d28b2afeea02bb2fc50 [file] [log] [blame]
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -1737,7 +1737,7 @@ $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
sh $(srcdir)/link.sh
xxd/xxd$(EXEEXT): xxd/xxd.c
- cd xxd; CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
+ cd xxd; CC="$(CC)" EXEEXT="$(EXEEXT)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
$(MAKE) -f Makefile
# Build the language specific files if they were unpacked.
@@ -1926,7 +1926,9 @@ installvimbin: $(VIMTARGET) $(DESTDIR)$(exec_prefix) $(DEST_BIN)
rm -f $(DEST_BIN)/$(VIMNAME).rm; \
fi
$(INSTALL_PROG) $(VIMTARGET) $(DEST_BIN)
- $(STRIP) $(DEST_BIN)/$(VIMTARGET)
+ -if test "$(NACL_ARCH)" != "le32"; then \
+ $(STRIP) $(DEST_BIN)/$(VIMTARGET); \
+ fi
chmod $(BINMOD) $(DEST_BIN)/$(VIMTARGET)
# may create a link to the new executable from /usr/bin/vi
-$(LINKIT)
@@ -2063,7 +2065,9 @@ installtools: $(TOOLS) $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
rm -f $(DEST_BIN)/xxd.rm; \
fi
$(INSTALL_PROG) xxd/xxd$(EXEEXT) $(DEST_BIN)
- $(STRIP) $(DEST_BIN)/xxd$(EXEEXT)
+ -if test "$(NACL_ARCH)" != "le32"; then \
+ $(STRIP) $(DEST_BIN)/xxd$(EXEEXT) \
+ fi
chmod $(BINMOD) $(DEST_BIN)/xxd$(EXEEXT)
-$(SHELL) ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS)
diff --git a/src/auto/configure b/src/auto/configure
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -13006,16 +13006,16 @@ $as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
-$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
- if test "$gccmajor" -gt "3"; then
- CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+# { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
+#$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
+# if test "$gccmajor" -gt "3"; then
+# CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
+# { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+#$as_echo "yes" >&6; }
+# else
+# { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+#$as_echo "no" >&6; }
+# fi
fi
diff --git a/src/main.c b/src/main.c
--- a/src/main.c
+++ b/src/main.c
@@ -14,6 +14,10 @@
# include <spawno.h> /* special MS-DOS swapping library */
#endif
+#ifdef __native_client__
+#include <nacl_main.h>
+#endif
+
#ifdef __CYGWIN__
# ifndef WIN32
# include <cygwin/version.h>
@@ -165,6 +169,11 @@ main
int argc;
char **argv;
{
+#ifdef __native_client__
+ if (nacl_startup_untar(argv[0], "vim.tar", "/"))
+ return 1;
+#endif
+
char_u *fname = NULL; /* file name from command line */
mparm_T params; /* various parameters passed between
* main() and other functions. */
diff --git a/src/memfile.c b/src/memfile.c
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -639,7 +639,8 @@ mf_sync(mfp, flags)
# endif
/* OpenNT is strictly POSIX (Benzinger) */
/* Tandem/Himalaya NSK-OSS doesn't have sync() */
-# if defined(__OPENNT) || defined(__TANDEM)
+ /* TODO(sbc): remove once nacl_io provides sync() */
+# if defined(__OPENNT) || defined(__TANDEM) || defined(__native_client__)
fflush(NULL);
# else
sync();
diff --git a/src/xxd/Makefile b/src/xxd/Makefile
--- a/src/xxd/Makefile
+++ b/src/xxd/Makefile
@@ -1,7 +1,7 @@
# The most simplistic Makefile
-xxd: xxd.c
- $(CC) $(CFLAGS) $(LDFLAGS) -DUNIX -o xxd xxd.c
+xxd$(EXEEXT): xxd.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -DUNIX -o xxd$(EXEEXT) xxd.c
clean:
rm -f xxd xxd.o