Skip to content

Commit 5a74f49

Browse files
authored
Merge pull request #1361 from tstack/revert-1360-fix_cross_rust
Revert "fix cross compilation in rust-related Makefile parts"
2 parents 64d62bf + 4f1bbd7 commit 5a74f49

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

configure.ac

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,10 @@ AC_PROG_INSTALL
4848
AC_PROG_RANLIB
4949
AM_PROG_AR
5050
AC_PROG_LN_S
51-
AC_PROG_GREP
5251
AC_PROG_MAKE_SET
5352

5453
AC_PATH_PROG(BASH, [bash])
5554
AC_PATH_PROG(CARGO_CMD, [cargo])
56-
AC_PATH_PROG(RUSTC_CMD, [rustc])
57-
if test x"$RUSTC_CMD" == x""; then
58-
RUSTC_PLATFORM=no
59-
else
60-
# for example, rustc expects x86_64-unknown-linux-gnu instead of x86_64-pc-linux-gnu
61-
# and armv7-unknown-linux-gnueabihf instead of armv7l-unknown-linux-gnueabihf
62-
AC_MSG_CHECKING([rustc --target argument])
63-
if "$RUSTC_CMD" --print target-list | $GREP "$host" > /dev/null; then
64-
RUSTC_PLATFORM="$host"
65-
else
66-
candidate=`echo "$host_cpu"-unknown-"$host_os" | sed -e 's/armv\(.\)l-/armv\1-/'`
67-
if "$RUSTC_CMD" --print target-list | $GREP "$candidate" > /dev/null; then
68-
RUSTC_PLATFORM="$candidate"
69-
else
70-
AC_MSG_ERROR("$RUSTC_CMD knows neither $host nor $candidate")
71-
fi
72-
AC_MSG_RESULT(["$RUSTC_PLATFORM"])
73-
fi
74-
fi
75-
AC_SUBST(RUSTC_PLATFORM)
76-
7755
AC_PATH_PROG(BZIP2_CMD, [bzip2])
7856
AC_PATH_PROG(RE2C_CMD, [re2c])
7957
AM_CONDITIONAL(HAVE_RE2C, test x"$RE2C_CMD" != x"")

src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) $(USER_CXXFLAGS)
126126
if HAVE_CARGO
127127
RUST_DEPS_CPPFLAGS = -DHAVE_RUST_DEPS=1
128128
PRQLC_DIR = third-party/prqlc-c/target
129-
RUST_DEPS_LIBS = $(PRQLC_DIR)/$(RUSTC_PLATFORM)/release/libprqlc_c.a
129+
RUST_DEPS_LIBS = $(PRQLC_DIR)/release/libprqlc_c.a
130130

131131
$(RUST_DEPS_LIBS): $(srcdir)/third-party/prqlc-c/src/lib.rs $(srcdir)/third-party/prqlc-c/Cargo.toml
132132
mkdir -p $(PRQLC_DIR)
133-
env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) build --target $(RUSTC_PLATFORM) --manifest-path \
133+
env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) build --manifest-path \
134134
$(srcdir)/third-party/prqlc-c/Cargo.toml --package prqlc-c --release
135135

136136
else

0 commit comments

Comments
 (0)