Unverified Commit a653aed4 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'Ionic-bugfix/FTBFS-non-ELF' into 3.6.x

parents dd1ae176 06c14b83
......@@ -407,6 +407,23 @@ FreeBSD=
test "$nxconf_cv_freebsd" = yes && FreeBSD=yes
]) # NX_BUILD_ON_FreeBSD
# Check to see if we're generating binaries in ELF format.
AC_DEFUN([NX_TARGET_USE_ELF],
[AC_CACHE_CHECK([if target system is ELF-based], [nxconf_cv_targetelf],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#ifndef __ELF__
#error not an ELF-based system
error!
#endif
]],
[[
]])],
[nxconf_cv_targetelf=yes], [nxconf_cv_targetelf=no])])
AM_CONDITIONAL([TARGET_ELF], [test x"$nxconf_cv_targetelf" = "xyes"])
]) # NX_TARGET_USE_ELF
AC_DEFUN([LIBJPEG_FALLBACK_CHECK],[
AC_MSG_CHECKING([for libjpeg shared libary file and headers])
AC_CHECK_LIB([jpeg], [jpeg_destroy_compress],
......
......@@ -47,6 +47,8 @@ AC_LANG([C++])
NX_COMPILER_BRAND
NX_DEFAULT_OPTIONS
NX_TARGET_USE_ELF
AC_ARG_ENABLE([cxx11],
[AS_HELP_STRING([--enable-cxx11],
[enable optional features requiring C++11 support (disabled by default)])],
......
......@@ -39,10 +39,14 @@ AM_CPPFLAGS = \
libXcompshad_la_LDFLAGS = \
-version-number @LT_COMPSHAD_VERSION@ -no-undefined \
-Wl,--enable-new-dtags \
-R '$(libdir)/nx/X11' \
$(NULL)
if TARGET_ELF
libXcompshad_la_LDFLAGS += \
-Wl,--enable-new-dtags \
endif TARGET_ELF
libXcompshadincludedir = $(includedir)/nx
libXcompshadinclude_HEADERS = \
$(top_srcdir)/include/Shadow.h \
......
......@@ -26,6 +26,8 @@ AC_LANG([C])
NX_COMPILER_BRAND
NX_DEFAULT_OPTIONS
NX_TARGET_USE_ELF
dnl This is a workaround for a nasty libtool bug.
dnl We actually compile libXcomp with pthread support, but libtool uses g++ ... -nostdlib ... -pthread
dnl on Linux. -nostdlib causes -pthread to be ignored.
......
......@@ -15,8 +15,13 @@ nxproxy_LDADD = \
nxproxy_LDFLAGS = \
$(PTHREAD_LDFLAGS) \
$(NULL)
if TARGET_ELF
nxproxy_LDFLAGS += \
-Wl,--enable-new-dtags \
$(NULL)
endif TARGET_ELF
nxproxy_CFLAGS = \
$(BASE_CFLAGS) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment