mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-23 04:09:48 +00:00
always build ld64, regardless if we are on a 64 bit system or not
fixed an issue in include/foreign/i386/_types.h which prevented compiling on 32 bit systems
This commit is contained in:
parent
e837833872
commit
e16831b7b5
@ -13,6 +13,7 @@ CXX=clang++
|
||||
CFLAGS="`cat tmp/cflags 2>/dev/null` -O3"
|
||||
CXXFLAGS="`cat tmp/libcxx-conf 2>/dev/null || echo -stdlib=libc++` `cat tmp/cxxflags 2>/dev/null` -O3"
|
||||
LDFLAGS="`cat tmp/ldflags 2>/dev/null`"
|
||||
export LD_LIBRARY_PATH="`cat tmp/ldpath 2>/dev/null`"
|
||||
|
||||
CPP="clang -E"
|
||||
|
||||
@ -249,28 +250,6 @@ AC_SUBST(CRYPT_LIBS)
|
||||
AC_C_BIGENDIAN([AC_SUBST([ENDIAN_FLAG],[-D__BIG_ENDIAN__=1])],
|
||||
[AC_SUBST([ENDIAN_FLAG],[-D__LITTLE_ENDIAN__=1])])
|
||||
|
||||
#compile ld_classic or not. only for 32bit.
|
||||
LD_CLASSIC=""
|
||||
cat > conftest.c <<EOF
|
||||
#if defined(__x86_64__) || (!defined(__i386__) && defined(__LP64__))
|
||||
host_address=64
|
||||
#else
|
||||
host_address=32
|
||||
#endif
|
||||
EOF
|
||||
OSBIT=`${CC-cc} -E conftest.c | grep host_address=`
|
||||
rm -f conftest.c
|
||||
|
||||
if test "$OSBIT" = "host_address=32"; then
|
||||
AC_MSG_NOTICE(["Your system is 32bit, enable ld_classic build"])
|
||||
LD_CLASSIC="ld"
|
||||
else
|
||||
AC_MSG_NOTICE(["Your system is 64bit, disable ld_classic"])
|
||||
fi
|
||||
|
||||
AC_SUBST([LD_CLASSIC], [$LD_CLASSIC])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile libstuff/Makefile])
|
||||
AC_CONFIG_FILES([ar/Makefile])
|
||||
AC_CONFIG_FILES([as/Makefile])
|
||||
|
@ -43,8 +43,8 @@ typedef short __int16_t;
|
||||
typedef unsigned short __uint16_t;
|
||||
typedef int __int32_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
typedef long int __int64_t;
|
||||
typedef unsigned long int __uint64_t;
|
||||
typedef long long int __int64_t;
|
||||
typedef unsigned long long int __uint64_t;
|
||||
|
||||
typedef long __darwin_intptr_t;
|
||||
typedef unsigned int __darwin_natural_t;
|
||||
|
@ -14,6 +14,7 @@ function try()
|
||||
echo -n "-L$LLVM_LIB_DIR -lLTO " > tmp/ldflags
|
||||
echo -n "-DLTO_SUPPORT=1 " > tmp/cflags
|
||||
echo -n "-DLTO_SUPPORT=1 " > tmp/cxxflags
|
||||
echo -n "$LLVM_LIB_DIR" > tmp/ldpath
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user