Skip to content

Commit

Permalink
[config.h] nix checks nobody uses anyway
Browse files Browse the repository at this point in the history
less headache
  • Loading branch information
krono committed Sep 17, 2020
1 parent 78ac502 commit 23ba4ad
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 158 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt
Expand Up @@ -421,14 +421,6 @@ else()
check_type_size("void*" SIZEOF_VOID_P)
endif()

if("${SIZEOF_LONG}" STREQUAL "8")
set(SQUEAK_INT64_TYPEDEF "long")
elseif("${SIZEOF_LONG_LONG}" STREQUAL "8")
set(SQUEAK_INT64_TYPEDEF "long long")
else()
message(FATAL_ERROR "Failed to find a 64 bits integer type.")
endif()

if(HAVE_LIBDL)
set(VM_DEPENDENCIES_LIBRARIES dl ${VM_DEPENDENCIES_LIBRARIES})
endif()
Expand Down Expand Up @@ -465,15 +457,6 @@ if(UUID_LIBRARY AND (HAVE_SYS_UUID_H OR HAVE_UUID_UUID_H OR HAVE_UUID_H) AND (HA
set(HAVE_VALID_UUID_LIBRARY True)
endif()

# misc
check_c_source_runs("
void f(int i){*(double *)i=*(double *)(i+4);}
int main(){char b[12];f(b);return 0;}" NO_DOUBLE_WORD_ALIGNMENT)
if(NOT NO_DOUBLE_WORD_ALIGNMENT)
set(DOUBLE_WORD_ALIGNMENT TRUE)
endif()


# Add the current directory.
include_directories(
.
Expand Down
6 changes: 0 additions & 6 deletions platforms/Plan9/vm/config.h
Expand Up @@ -91,10 +91,6 @@
#undef HAVE_TM_GMTOFF
#undef HAVE_TIMEZONE

/* typedefs */

#define squeakInt64 long long

/* architecture */

#define OS_TYPE "plan9"
Expand All @@ -112,12 +108,10 @@
#define VMENDIANNESS 0
#define VM_HOST "plan9"
#define VM_HOST_CPU "intel"
#define DOUBLE_WORD_ORDER 1
#define LSB_FIRST 1
#endif

#undef HAVE_LIBDL
/* #undef DOUBLE_WORD_ORDER */

/* other configured variables */

Expand Down
3 changes: 0 additions & 3 deletions platforms/iOS/vm/OSX/config.h
Expand Up @@ -125,15 +125,13 @@
# define SIZEOF_LONG 8
# define SIZEOF_LONG_LONG 8
# define SIZEOF_VOID_P 8
# define squeakInt64 long
#endif

#if (i386 || __i386 || __i386__) || (ppc || __ppc || __ppc__)
# define SIZEOF_INT 4
# define SIZEOF_LONG 4
# define SIZEOF_LONG_LONG 8
# define SIZEOF_VOID_P 4
# define squeakInt64 long long
#endif

/* structures */
Expand Down Expand Up @@ -182,7 +180,6 @@
#endif

/* picked up in 2020 */
#define DOUBLE_WORD_ALIGNMENT /**/
#define HAVE_DLERROR 1
#define HAVE_EXECINFO_H 1
#define HAVE_FCNTL_H 1
Expand Down
7 changes: 0 additions & 7 deletions platforms/iOS/vm/iPhone/config.h
Expand Up @@ -168,16 +168,10 @@
#define VMBIGENDIAN 0
#define VM_HOST "intel-apple-darwin8.5.0"
#define VM_HOST_CPU "intel"
#if COGVM
#else
#define DOUBLE_WORD_ORDER 1
#endif
#define LSB_FIRST 1
#endif

#define HAVE_LIBDL 1
/* #undef DOUBLE_WORD_ALIGNMENT */
/* #undef DOUBLE_WORD_ORDER */

/* damage containment */

Expand All @@ -202,7 +196,6 @@
#endif

/* picked up in 2020 */
#define DOUBLE_WORD_ALIGNMENT /**/
#define HAVE_DLERROR 1
#define HAVE_EXECINFO_H 1
#define HAVE_FCNTL_H 1
Expand Down
5 changes: 0 additions & 5 deletions platforms/minheadless/config.h.in
Expand Up @@ -160,10 +160,6 @@
#cmakedefine SUPPORT_TRADITIONAL_DISPLAY
#cmakedefine HAVE_SDL2

/* typedefs */

#define squeakInt64 @SQUEAK_INT64_TYPEDEF@

/* architecture */

#define OS_TYPE "@OS_TYPE@"
Expand All @@ -182,7 +178,6 @@
#endif

#cmakedefine WORDS_BIGENDIAN
#cmakedefine DOUBLE_WORD_ALIGNMENT

/* damage containment */

Expand Down
25 changes: 1 addition & 24 deletions platforms/unix/config/acinclude.m4
Expand Up @@ -88,23 +88,7 @@ AC_DEFUN([AC_REQUIRE_SIZEOF],[
AC_MSG_RESULT("okay"),
AC_MSG_RESULT("bad")
AC_MSG_ERROR("one or more basic data types has an incompatible size: giving up"))])

# Try to find a 64-bit integer data type.
# NOTE: `long long' is 64 bits in ANSI C99 [ISO/IEC 9899:1999 (E)].

AC_DEFUN([AC_CHECK_INT64_T],[
AC_CACHE_CHECK([for 64-bit integer type],ac_cv_int64_t,
AC_TRY_RUN([int main(){return(sizeof(long) == 8)?0:1;}],
ac_cv_int64_t="long",
AC_TRY_RUN([int main(){return(sizeof(long long) == 8)?0:1;}],
ac_cv_int64_t="long long",
ac_cv_int64_t="no")))
if test "$ac_cv_int64_t" = ""; then
AC_MSG_ERROR([could not find a 64-bit integer type])
fi
SQUEAK_INT64_T="$ac_cv_int64_t"
AC_DEFINE_UNQUOTED(squeakInt64, $ac_cv_int64_t, [64bit signed integer])])



AC_DEFUN([AC_NEED_SUNOS_H],
[case "$host" in
Expand Down Expand Up @@ -218,13 +202,6 @@ then CFLAGS="$CFLAGS -DLSB_FIRST=1"
fi])


AC_DEFUN([AC_C_DOUBLE_ALIGNMENT],
[AC_CACHE_CHECK([whether unaligned access to doubles is ok], ac_cv_double_align,
AC_TRY_RUN([f(int i){*(double *)i=*(double *)(i+4);}
int main(){char b[[12]];f(b);return 0;}],
ac_cv_double_align="yes", ac_cv_double_align="no"))
test "$ac_cv_double_align" = "no" && AC_DEFINE(DOUBLE_WORD_ALIGNMENT, [], [Unaligned double access])])

# this assumes that libtool has already been configured and built --
# if not then err on the side of conservatism.
AC_DEFUN([AC_MODULE_LIB_PREFIX],
Expand Down
6 changes: 0 additions & 6 deletions platforms/unix/config/config.h.in
Expand Up @@ -53,9 +53,6 @@
/* Defined when building on Darwin */
#undef DARWIN

/* Unaligned double access */
#undef DOUBLE_WORD_ALIGNMENT

/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA

Expand Down Expand Up @@ -487,7 +484,4 @@
/* socklen size */
#undef socklen_t

/* 64bit signed integer */
#undef squeakInt64

#endif /* __sq_config_h */
87 changes: 0 additions & 87 deletions platforms/unix/config/configure
Expand Up @@ -13195,62 +13195,6 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
$as_echo_n "checking for 64-bit integer type... " >&6; }
if ${ac_cv_int64_t+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(){return(sizeof(long) == 8)?0:1;}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_int64_t="long"
else
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(){return(sizeof(long long) == 8)?0:1;}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_int64_t="long long"
else
ac_cv_int64_t="no"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_int64_t" >&5
$as_echo "$ac_cv_int64_t" >&6; }
if test "$ac_cv_int64_t" = ""; then
as_fn_error $? "could not find a 64-bit integer type" "$LINENO" 5
fi
SQUEAK_INT64_T="$ac_cv_int64_t"

cat >>confdefs.h <<_ACEOF
#define squeakInt64 $ac_cv_int64_t
_ACEOF


# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
Expand Down Expand Up @@ -16254,37 +16198,6 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
if test $ac_cv_c_bigendian != yes
then CFLAGS="$CFLAGS -DLSB_FIRST=1"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unaligned access to doubles is ok" >&5
$as_echo_n "checking whether unaligned access to doubles is ok... " >&6; }
if ${ac_cv_double_align+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
f(int i){*(double *)i=*(double *)(i+4);}
int main(){char b[12];f(b);return 0;}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_double_align="yes"
else
ac_cv_double_align="no"
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_double_align" >&5
$as_echo "$ac_cv_double_align" >&6; }
test "$ac_cv_double_align" = "no" &&
$as_echo "#define DOUBLE_WORD_ALIGNMENT /**/" >>confdefs.h


case $host_os in
darwin*)
Expand Down
3 changes: 0 additions & 3 deletions platforms/unix/config/configure.ac
Expand Up @@ -244,8 +244,6 @@ AC_CHECK_PROG([LN], [ln], [ln])
AC_REQUIRE_SIZEOF(int, 4)
AC_REQUIRE_SIZEOF(double, 8)

AC_CHECK_INT64_T

AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
Expand Down Expand Up @@ -359,7 +357,6 @@ AC_MODULE_LIB_PREFIX
AC_64BIT_ARCH

AC_C_BYTEORDER
AC_C_DOUBLE_ALIGNMENT

case $host_os in
darwin*)
Expand Down

0 comments on commit 23ba4ad

Please sign in to comment.