From patchwork Tue Jul 25 14:44:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [esnacc-dev] cross-build: disable asn rose X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 18 X-Patchwork-Delegate: aconole@bytheb.org Message-Id: <20170725144450.30516-1-aconole@bytheb.org> To: dev@lists.esnacc.org Cc: Marty Galligan Date: Tue, 25 Jul 2017 10:44:50 -0400 From: Aaron Conole List-Id: eSNACC Development discussion When cross-compiling the system, it is not possible for the esnacc binary to correctly execute on the build system (well, not always). There is a method to combat this, which is the approach gcc takes, to generate a stage one version of the compiler and then execute that to generate the final tools (stage 2). That represents quite a bit of work. On the other hand, people are using esnacc *now* and as Marty Galligan reports at http://mail.esnacc.org/pipermail/dev/2017-July/000414.html there can be problems cross building, especially related to this. This commit detects that a cross-compilation is occuring and disables the generation of the asn.1 ROSE support. A future commit can enable this when it becomes necessary. Reported-by: Marty Galligan Signed-off-by: Aaron Conole --- configure.ac | 4 ++++ cxx-lib/automake.mk | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 26007ef..65b4b48 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,10 @@ AC_PROG_INSTALL AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) AC_PROG_CC AC_PROG_CXX + +AM_CONDITIONAL([SNACCROSE], [test "$cross_compiling" = no]) +test x"$cross_compiling" == xyes && AC_DEFINE([SNACCROSE], [0], [No ROSE support]) + AM_PATH_PYTHON(,, [:]) AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) AC_USE_SYSTEM_EXTENSIONS diff --git a/cxx-lib/automake.mk b/cxx-lib/automake.mk index 2c5b7ea..fc841ca 100644 --- a/cxx-lib/automake.mk +++ b/cxx-lib/automake.mk @@ -1,5 +1,9 @@ -lib_LTLIBRARIES += cxx-lib/libcxxasn1.la \ - cxx-lib/libcxxasn1rose.la +lib_LTLIBRARIES += cxx-lib/libcxxasn1.la + +if SNACCROSE +lib_LTLIBRARIES += cxx-lib/libcxxasn1rose.la +nobase_include_HEADERS += cxx-lib/inc/snaccrose.h +endif BUILT_SOURCES += cxx-lib/inc/snacc.h @@ -17,7 +21,6 @@ nobase_include_HEADERS += cxx-lib/inc/asn-buf.h \ cxx-lib/inc/snacc.h \ cxx-lib/inc/snaccdll.h \ cxx-lib/inc/snaccexcept.h \ - cxx-lib/inc/snaccrose.h \ cxx-lib/inc/tcl-if.h cxx_lib_libcxxasn1_la_SOURCES = \