Skip to content

Commit ae3aefa

Browse files
committed
ssh_client: openssh: simplify the build a bit
We currently put "-pnacl" in the libs we create. I guess we did this so we could keep it separate from "-nacl" in the output/ dir, but that doesn't work well when we write all the objects from the plugin src/ w/out any suffixes to the output/ dir. Since we no longer support NaCl (only PNaCl), and because we're going to take a radically different approach for separating out wasm, drop the "-pnacl" suffix everywhere. While we're here, move the cache vars from the env to the configure invocation. This will help with later build migrations too. Change-Id: I816d7c3ac649839068bf419e83efe9bff6a63e8f Reviewed-on: https://chromium-review.googlesource.com/c/1289810 Reviewed-by: Vitaliy Shipitsyn <[email protected]> Tested-by: Mike Frysinger <[email protected]>
1 parent 916d28f commit ae3aefa

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

ssh_client/src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ $(POBJS): $(OUTPUT)/%_p.o : $(CURDIR)/%.cc
7777
$(PNACL_CXX) -o $@ -c $< $(PNACL_CXXFLAGS)
7878

7979
$(PROJECT)_nl.pexe : $(POBJS)
80-
$(PNACL_CXX) -o $@ $^ -lopenssh-pnacl -lssh-pnacl \
81-
-lopenbsd-compat-pnacl -lglibc-compat \
80+
$(PNACL_CXX) -o $@ $^ -lopenssh -lssh \
81+
-lopenbsd-compat -lglibc-compat \
8282
$(PNACL_LDFLAGS) $(PNACL_CXXFLAGS)
8383

8484
$(PROJECT)_nl_arm.dbg.nexe : $(PROJECT)_nl.pexe

ssh_client/third_party/openssh-7.8/build.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ readonly PATCH_FILE=$(echo "${FILESDIR}"/*.patch)
2222

2323
pushd output >/dev/null
2424

25-
if [[ -f libopenssh-pnacl.a ]]; then
25+
if [[ -f libopenssh.a ]]; then
2626
exit 0
2727
fi
2828

@@ -34,13 +34,11 @@ export AR=${NACLAR}
3434
export RANLIB=${NACLRANLIB}
3535

3636
# Assume PNaCl toolchain.
37-
readonly NACL_ARCH="pnacl"
3837
readonly NACL_TOOLCHAIN_INSTALL=${NACL_TOOLCHAIN_ROOT}/le32-nacl
3938

4039
readonly WEBPORTS_PREFIX=${NACL_TOOLCHAIN_INSTALL}/usr
4140
readonly WEBPORTS_INCLUDE=${WEBPORTS_PREFIX}/include
4241
readonly WEBPORTS_LIBDIR=${WEBPORTS_PREFIX}/lib
43-
readonly WEBPORTS_BIN=${WEBPORTS_PREFIX}/bin
4442

4543
export PKG_CONFIG_LIBDIR=${WEBPORTS_LIBDIR}
4644
export PKG_CONFIG_PATH=${PKG_CONFIG_LIBDIR}/pkgconfig
@@ -97,10 +95,11 @@ EXTRA_CONFIGURE_FLAGS=(
9795
# These don't work with newlib (used in PNaCl).
9896
--without-stackprotect
9997
--without-hardening
98+
99+
ac_cv_func_inet_aton=no
100+
ac_cv_func_inet_ntoa=no
101+
ac_cv_func_inet_ntop=no
100102
)
101-
export ac_cv_func_inet_aton=no
102-
export ac_cv_func_inet_ntoa=no
103-
export ac_cv_func_inet_ntop=no
104103

105104
# The prefix path matches what is used at runtime.
106105
if [[ ! -e Makefile ]]; then
@@ -128,9 +127,9 @@ make -j${ncpus} \
128127
"${objects[@]}" \
129128
libssh.a \
130129
openbsd-compat/libopenbsd-compat.a
131-
$AR rcs ../libopenssh-${NACL_ARCH}.a "${objects[@]}"
132-
cp -f libssh.a ../libssh-${NACL_ARCH}.a
133-
cp -f openbsd-compat/libopenbsd-compat.a ../libopenbsd-compat-${NACL_ARCH}.a
130+
$AR rcs ../libopenssh.a "${objects[@]}"
131+
cp -f libssh.a ../libssh.a
132+
cp -f openbsd-compat/libopenbsd-compat.a ../libopenbsd-compat.a
134133
cp -f *.[0-9].html ../
135134

136135
popd >/dev/null

0 commit comments

Comments
 (0)