Skip to content

Commit

Permalink
netkit-telnet: support the cross-compile
Browse files Browse the repository at this point in the history
when check the CC, only compile the object by CC, not run the object.
MCONFIG file includes more configuration, we can not clear it

Signed-off-by: Roy Li <[email protected]>
Signed-off-by: Martin Jansa <[email protected]>
  • Loading branch information
Roy Li authored and shr-project committed May 11, 2015
1 parent 91fd102 commit 0243648
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
To support the cross-compile

Upstream-Status: Pending

make the configure to support the cross-compile, by only to compile the
target, and not to run it

Roy Li <[email protected]>
Index: netkit-telnet-0.17/configure
===================================================================
--- netkit-telnet-0.17.orig/configure 2008-11-23 22:01:26.000000000 +0100
+++ netkit-telnet-0.17/configure 2008-11-23 22:05:00.000000000 +0100
@@ -94,7 +94,7 @@
echo -n 'Checking if C compiler works... '
if (
$CC __conftest.c -o __conftest || exit 1
- ./__conftest || exit 1
+ # Idiots belong shot! ./__conftest || exit 1
) >/dev/null 2>&1; then
echo 'yes'
else
@@ -141,7 +141,7 @@
echo -n 'Checking if C++ compiler works... '
if (
$CXX __conftest.cc -o __conftest || exit 1
- ./__conftest || exit 1
+ # Iditios belong shot! ./__conftest || exit 1
) >/dev/null 2>&1; then
echo 'yes'
else
@@ -284,7 +284,7 @@
else
if (
$CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest || exit 1
- ./__conftest || exit 1
+ # running still does not work./__conftest || exit 1
) >/dev/null 2>&1; then
echo '-D__USE_BSD_SIGNAL'
CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
@@ -501,7 +501,7 @@
EOF
if (
$CXX $CXXFLAGS __conftest.cc $LIBBSD -o __conftest || exit 1
- ./__conftest || exit 1
+ # argh! morons!./__conftest || exit 1
) >/dev/null 2>&1; then
echo 'ok'
else
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \
file://To-aviod-buffer-overflow-in-telnet.patch \
file://Warning-fix-in-the-step-of-install.patch \
file://telnet-xinetd \
file://cross-compile.patch \
"

EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
MANMODE=644 MANDIR=${mandir}"

do_configure () {
./configure --prefix=${prefix}
echo "LDFLAGS=${LDFLAGS}" > MCONFIG
sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \
-e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \
-e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \
-i MCONFIG
}

do_compile () {
Expand Down

0 comments on commit 0243648

Please sign in to comment.