aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@gmail.com>2017-01-05 15:28:37 -0800
committerGitHub <noreply@github.com>2017-01-05 15:28:37 -0800
commit1041710fce2fc72949aa61f8e81e1710457ca0ca (patch)
tree65d9f134fd771a5b8b39a3d0663f191b5d610e26 /src
parent24f0d5691ead5d4849f0d2eea204c0e9838b3790 (diff)
parentb40d318650ccde8893400c32814df6f4cdd24fe5 (diff)
downloadprotobuf-1041710fce2fc72949aa61f8e81e1710457ca0ca.tar.gz
protobuf-1041710fce2fc72949aa61f8e81e1710457ca0ca.tar.bz2
protobuf-1041710fce2fc72949aa61f8e81e1710457ca0ca.zip
Merge pull request #2565 from acozzette/cross-compilation
Fixed cross compilations with the Autotools build
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 37204ea0..5130d0b1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -484,13 +484,16 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/csharp/csharp_wrapper_field.cc \
google/protobuf/compiler/csharp/csharp_wrapper_field.h
-bin_PROGRAMS = protoc js_embed
+bin_PROGRAMS = protoc
protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
protoc_SOURCES = google/protobuf/compiler/main.cc
# The special JS code for the well-known types is linked into the compiler via
-# well_known_types_embed.cc, which is generated from .js source files.
-js_embed_SOURCES = google/protobuf/compiler/js/embed.cc
+# well_known_types_embed.cc, which is generated from .js source files. We have
+# to build the js_embed binary using $(CXX_FOR_BUILD) so that it is executable
+# on the build machine in a cross-compilation setup.
+js_embed$(EXEEXT): google/protobuf/compiler/js/embed.cc
+ $(CXX_FOR_BUILD) -o $@ $<
js_well_known_types_sources = \
google/protobuf/compiler/js/well_known_types/any.js \
google/protobuf/compiler/js/well_known_types/struct.js \