mirror of
https://github.com/deadw00d/AROS.git
synced 2025-11-22 03:09:23 +00:00
# detect a few more linux/native build host flavours. # make sure and expose -mfloat-abi=softfp for soft float ARM targets. # rework ARM target CPU selection code a little to simplify, and correct. let the correct values be picked where appropriate.
linux-arm -> armv7-a+nofp -mfloat-abi=softfp linux-armhf -> armv7-a+fp -mfpu=vfpv3 -mfloat-abi=hard raspi-armhf -> armv7-a+fp -mfpu=vfpv3-d16 -mfloat-abi=hard .. etc .. * aarch64, and riscv targets need tidied/corrected still.
This commit is contained in:
39
aclocal.m4
vendored
39
aclocal.m4
vendored
@ -732,6 +732,45 @@ AC_DEFUN([AM_RUN_LOG],
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
|
||||
dnl AX_GCC_ARM_MARCH_CONFIG([BASEARCH], [SOFTVAR], [HARDVAR])
|
||||
dnl BASEARCH: Base architecture (e.g. armv7-a)
|
||||
dnl SOFTVAR: Shell variable name to store the soft-float -march target
|
||||
dnl HARDVAR: Shell variable name to store the hard-float -march target
|
||||
|
||||
AC_DEFUN([AX_GCC_ARM_MARCH_CONFIG], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_GCC_TRADITIONAL])
|
||||
|
||||
m4_pushdef([BASEARCH], [$1])
|
||||
m4_pushdef([SOFTVAR], [$2])
|
||||
m4_pushdef([HARDVAR], [$3])
|
||||
|
||||
AC_MSG_CHECKING([GCC major version])
|
||||
GCC_VERSION_MAJOR=`$CC -dumpversion | cut -d. -f1`
|
||||
AC_MSG_RESULT([$GCC_VERSION_MAJOR])
|
||||
|
||||
if test "$GCC_VERSION_MAJOR" -lt "10"; then
|
||||
if test "$GCC_VERSION_MAJOR" -lt "8"; then
|
||||
SOFTVAR="BASEARCH"
|
||||
HARDVAR="BASEARCH"
|
||||
else
|
||||
SOFTVAR="BASEARCH+nofp"
|
||||
HARDVAR="BASEARCH+fp"
|
||||
fi
|
||||
aros_config_cflags="$aros_config_cflags ${CFLAGS_NO_COMMON}"
|
||||
else
|
||||
SOFTVAR="BASEARCH+nofp"
|
||||
HARDVAR="BASEARCH+fp"
|
||||
fi
|
||||
|
||||
AC_SUBST([SOFTVAR])
|
||||
AC_SUBST([HARDVAR])
|
||||
|
||||
m4_popdef([BASEARCH])
|
||||
m4_popdef([SOFTVAR])
|
||||
m4_popdef([HARDVAR])
|
||||
])
|
||||
|
||||
m4_include([scripts/autoconf/m4/python.m4])
|
||||
m4_include([scripts/autoconf/m4/sdl.m4])
|
||||
m4_include([acinclude.m4])
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
/* config/host-conf.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define if ALSA is available */
|
||||
#undef HAVE_ALSA
|
||||
|
||||
/* Define to 1 if you have the `clone' function. */
|
||||
#undef HAVE_CLONE
|
||||
|
||||
@ -17,6 +20,9 @@
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the <GL/glx.h> header file. */
|
||||
#undef HAVE_GL_GLX_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -26,15 +32,9 @@
|
||||
/* Define to 1 if you have the `kse_create' function. */
|
||||
#undef HAVE_KSE_CREATE
|
||||
|
||||
/* Define to 1 if you have the `png' library (-lpng). */
|
||||
#undef HAVE_LIBPNG
|
||||
|
||||
/* Define to 1 if you have the `makecontext' function. */
|
||||
#undef HAVE_MAKECONTEXT
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
@ -62,6 +62,9 @@
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
@ -86,18 +89,10 @@
|
||||
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
|
||||
#undef HAVE_STRUCT_TM_TM_ZONE
|
||||
|
||||
/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
|
||||
`HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
|
||||
#undef HAVE_ST_BLKSIZE
|
||||
|
||||
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
|
||||
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
|
||||
#undef HAVE_ST_BLOCKS
|
||||
|
||||
/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
|
||||
`HAVE_STRUCT_STAT_ST_RDEV' instead. */
|
||||
#undef HAVE_ST_RDEV
|
||||
|
||||
/* Define to 1 if you have the `swapcontext' function. */
|
||||
#undef HAVE_SWAPCONTEXT
|
||||
|
||||
@ -139,9 +134,15 @@
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ucontext.h> header file. */
|
||||
#undef HAVE_SYS_UCONTEXT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
#undef HAVE_SYS_VFS_H
|
||||
|
||||
@ -159,14 +160,11 @@
|
||||
`tzname'. */
|
||||
#undef HAVE_TZNAME
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <ucontext.h> header file. */
|
||||
#undef HAVE_UCONTEXT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ucontext.h> header file. */
|
||||
#undef HAVE_SYS_UCONTEXT_H
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
@ -189,10 +187,13 @@
|
||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
#undef STAT_MACROS_BROKEN
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
|
||||
macro is obsolete. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
@ -204,7 +205,7 @@
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* Define as a signed integer type capable of holding a process identifier. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
|
||||
178
configure.in
178
configure.in
@ -289,15 +289,30 @@ case "$host_os" in
|
||||
aros_host_arch="aros"
|
||||
aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
|
||||
case "$host_cpu" in
|
||||
*aarch64*)
|
||||
aros_host_cpu="aarch64"
|
||||
;;
|
||||
*arm*)
|
||||
aros_host_cpu="arm"
|
||||
;;
|
||||
*i?86*)
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
*m68k*)
|
||||
aros_host_cpu="m68k"
|
||||
;;
|
||||
*powerpc*)
|
||||
aros_host_cpu="ppc"
|
||||
;;
|
||||
*riscv64*)
|
||||
aros_host_cpu="riscv64"
|
||||
;;
|
||||
*riscv*)
|
||||
aros_host_cpu="riscv"
|
||||
;;
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
|
||||
aros_host_cpu="$host_cpu"
|
||||
@ -308,24 +323,36 @@ case "$host_os" in
|
||||
linux*)
|
||||
aros_host_arch="linux"
|
||||
aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
|
||||
android_build_os="linux-x86"
|
||||
android_tool="android"
|
||||
default_android_sdk="/opt/android-sdk-linux_x86"
|
||||
|
||||
if test "$aros_target_variant" = "android"; then
|
||||
android_build_os="linux-x86"
|
||||
android_tool="android"
|
||||
default_android_sdk="/opt/android-sdk-linux_x86"
|
||||
fi
|
||||
case "$host_cpu" in
|
||||
*aarch64*)
|
||||
aros_host_cpu="aarch64"
|
||||
;;
|
||||
*arm*)
|
||||
aros_host_cpu="arm"
|
||||
;;
|
||||
*i?86*)
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
;;
|
||||
*m68k*)
|
||||
aros_host_cpu="m68k"
|
||||
;;
|
||||
*powerpc*)
|
||||
aros_host_cpu="ppc"
|
||||
;;
|
||||
*arm*)
|
||||
aros_host_cpu="arm"
|
||||
*riscv64*)
|
||||
aros_host_cpu="riscv64"
|
||||
;;
|
||||
*riscv*)
|
||||
aros_host_cpu="riscv"
|
||||
;;
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
|
||||
@ -365,10 +392,14 @@ re-running configure])])
|
||||
AC_MSG_RESULT($LOC)
|
||||
aros_host_arch="darwin"
|
||||
host_cc_elf=no
|
||||
if [[ -z ${SED+x} ]]; then SED="gsed"; fi
|
||||
android_build_os="darwin-x86"
|
||||
android_tool="android"
|
||||
default_android_sdk="/android-sdk-mac_x86"
|
||||
if [[ -z ${SED+x} ]]; then
|
||||
SED="gsed";
|
||||
fi
|
||||
if test "$aros_target_variant" = "android"; then
|
||||
android_build_os="darwin-x86"
|
||||
android_tool="android"
|
||||
default_android_sdk="/android-sdk-mac_x86"
|
||||
fi
|
||||
case "$host_cpu" in
|
||||
*i?86*)
|
||||
aros_host_cpu="i386"
|
||||
@ -506,9 +537,11 @@ re-running configure])])
|
||||
aros_host_arch="cygwin"
|
||||
aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
|
||||
host_cc_elf=no
|
||||
android_build_os="windows"
|
||||
android_tool="android.bat"
|
||||
default_android_sdk="/cygdrive/c/android-sdk-windows-1.6_r1"
|
||||
if test "$aros_target_variant" = "android"; then
|
||||
android_build_os="windows"
|
||||
android_tool="android.bat"
|
||||
default_android_sdk="/cygdrive/c/android-sdk-windows-1.6_r1"
|
||||
fi
|
||||
|
||||
case "$host_cpu" in
|
||||
*i?86*)
|
||||
@ -525,47 +558,49 @@ re-running configure])])
|
||||
aros_host_arch="mingw32"
|
||||
aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
|
||||
host_cc_elf=no
|
||||
android_build_os="windows"
|
||||
android_tool="android.bat"
|
||||
default_android_sdk="/c/android-sdk-windows-1.6_r1"
|
||||
if test "$aros_target_variant" = "android"; then
|
||||
android_build_os="windows"
|
||||
android_tool="android.bat"
|
||||
default_android_sdk="/c/android-sdk-windows-1.6_r1"
|
||||
fi
|
||||
|
||||
libpng_libextra="-lws2_32"
|
||||
|
||||
case "$host_cpu" in
|
||||
*i?86*)
|
||||
dnl Currently there's neither 64-bit MinGW nor MSYS. Both environments are 32-bit
|
||||
dnl and run under emulation. Consequently, uname reports i386 even on 64-bit systems.
|
||||
dnl Here we attempt to detect Windows home platform by asking gcc about its target.
|
||||
dnl 64-bit gcc will output "x86_64-w64-mingw32" here.
|
||||
*i?86*)
|
||||
dnl Currently there's neither 64-bit MinGW nor MSYS. Both environments are 32-bit
|
||||
dnl and run under emulation. Consequently, uname reports i386 even on 64-bit systems.
|
||||
dnl Here we attempt to detect Windows home platform by asking gcc about its target.
|
||||
dnl 64-bit gcc will output "x86_64-w64-mingw32" here.
|
||||
|
||||
AC_MSG_CHECKING([for Windows native gcc target])
|
||||
host_cpu=`gcc -dumpmachine`
|
||||
AC_MSG_RESULT($host_cpu)
|
||||
;;
|
||||
AC_MSG_CHECKING([for Windows native gcc target])
|
||||
host_cpu=`gcc -dumpmachine`
|
||||
AC_MSG_RESULT($host_cpu)
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case "$host_cpu" in
|
||||
*i?86*)
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
*i?86*)
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
|
||||
mingw32*)
|
||||
dnl Native i386 gcc for MinGW32 reports 'mingw32' with -dumpmachine switch
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
mingw32*)
|
||||
dnl Native i386 gcc for MinGW32 reports 'mingw32' with -dumpmachine switch
|
||||
aros_host_cpu="i386"
|
||||
;;
|
||||
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
dnl Dragon's x86_64-w64-mingw32-gcc is a bit broken. It ignores standard $prefix/include
|
||||
dnl directory, so we have to add it explicitly here.
|
||||
aros_host_cflags="$aros_host_cflags -isystem /mingw/include"
|
||||
;;
|
||||
*x86_64*)
|
||||
aros_host_cpu="x86_64"
|
||||
dnl Dragon's x86_64-w64-mingw32-gcc is a bit broken. It ignores standard $prefix/include
|
||||
dnl directory, so we have to add it explicitly here.
|
||||
aros_host_cflags="$aros_host_cflags -isystem /mingw/include"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
|
||||
aros_host_cpu="$host_cpu"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
|
||||
aros_host_cpu="$host_cpu"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
@ -1223,7 +1258,7 @@ case "$target_cpu" in
|
||||
if test "$gcc_default_endian" = ""; then
|
||||
gcc_default_endian="little-endian"
|
||||
fi
|
||||
arm_isa_extra="ISA_ARM_FLAGS = -marm -m"$gcc_default_endian
|
||||
arm_isa_extra="ISA_ARM_FLAGS = -marm -mfloat-abi=softfp -m"$gcc_default_endian
|
||||
;;
|
||||
*m68k*)
|
||||
target_extra_cfg+="$export_newline""AROSROM_MODULE_CFLAGS = $""(CFLAGS_NO_BUILTIN)$export_newline"
|
||||
@ -1346,6 +1381,10 @@ case "$target_os" in
|
||||
kernel_tool_prefix="aarch64-linux-gnueabihf-"
|
||||
;;
|
||||
*armhf*)
|
||||
# we intentionaly leave
|
||||
# gcc_default_cpu empty here
|
||||
# so the correct value is loaded
|
||||
# later.
|
||||
aros_target_cpu="arm"
|
||||
target_cpu="armhf"
|
||||
aros_object_format="armelf_aros"
|
||||
@ -1364,7 +1403,10 @@ case "$target_os" in
|
||||
aros_kernel_includes="-isystem /usr/arm-linux-gnueabihf/include -isystem /usr/include"
|
||||
;;
|
||||
*arm*)
|
||||
gcc_default_cpu="armv7-a"
|
||||
# we intentionaly leave
|
||||
# gcc_default_cpu empty here
|
||||
# so the correct value is loaded
|
||||
# later.
|
||||
aros_target_cpu="arm"
|
||||
aros_object_format="armelf_aros"
|
||||
aros_flavour="emulation"
|
||||
@ -1772,7 +1814,6 @@ case "$target_os" in
|
||||
aros_nominal_width=1024
|
||||
aros_nominal_height=600
|
||||
aros_c_libs="$aros_c_libs -laeabi"
|
||||
gcc_default_cpu="armv7-a"
|
||||
gcc_default_fpu="vfpv3"
|
||||
aros_isa_flags="$aros_isa_flags -mtune=cortex-a8"
|
||||
aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
|
||||
@ -1830,14 +1871,12 @@ case "$target_os" in
|
||||
case "$target_cpu" in
|
||||
*aarch64*)
|
||||
aros_target_cpu="aarch64"
|
||||
gcc_default_cpu="armv8-a+crc"
|
||||
gcc_default_cpu="armv8-a+crc+simd"
|
||||
gcc_default_cpu_tune="cortex-a53"
|
||||
gcc_default_fpu="neon-fp-armv8"
|
||||
aros_object_format="aarch64elf_aros"
|
||||
;;
|
||||
*armhf*)
|
||||
aros_target_cpu="arm"
|
||||
target_cpu="armhf"
|
||||
# we intentionaly leave
|
||||
# gcc_default_cpu empty here
|
||||
# so the correct value is loaded
|
||||
@ -1854,11 +1893,14 @@ case "$target_os" in
|
||||
aros_c_libs="$aros_c_libs -laeabi"
|
||||
;;
|
||||
*arm*)
|
||||
aros_target_cpu="arm"
|
||||
gcc_default_cpu="armv7-a"
|
||||
# we intentionaly leave
|
||||
# gcc_default_cpu empty here
|
||||
# so the correct value is loaded
|
||||
# later."
|
||||
if test "$aros_object_format" = "" ; then
|
||||
aros_object_format="armelf_aros"
|
||||
fi
|
||||
aros_target_cpu="arm"
|
||||
aros_isa_flags="$""(ISA_ARM_FLAGS)"
|
||||
aros_config_cflags="$aros_config_cflags"
|
||||
aros_config_cxxflags="$aros_config_cxxflags"
|
||||
@ -2232,13 +2274,16 @@ if test "$aros_toolchain" = "gnu" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# from gcc 8, armv7-a+fp is used to specify
|
||||
# hard-float/vfpv3-d16
|
||||
arm_v7_flotattgt="armv7-a+fp"
|
||||
# from gcc 8, <arm arch><features> (e.g. armv7-a+fp) is used to specify
|
||||
# hard-float, etc.
|
||||
if test "$gcc_default_cpu" = ""; then
|
||||
default_arm_cpu=armv7-a
|
||||
else
|
||||
default_arm_cpu=$gcc_default_cpu
|
||||
fi
|
||||
|
||||
AX_GCC_ARM_MARCH_CONFIG($default_arm_cpu, [default_arm_softtgt], [default_arm_hardtgt])
|
||||
if test "$GCC_VERSION_MAJOR" -lt "10" ; then
|
||||
if test "$GCC_VERSION_MAJOR" -lt "8" ; then
|
||||
arm_v7_flotattgt="armv7-a"
|
||||
fi
|
||||
aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_COMMON)"
|
||||
fi
|
||||
|
||||
@ -2345,21 +2390,26 @@ case "$aros_target_cpu" in
|
||||
arm*)
|
||||
dnl use the ARM float defaults unless overriden in per-target section above)
|
||||
aros_isa_extra="$export_newline$arm_isa_extra"
|
||||
if test "$gcc_default_cpu" = ""; then
|
||||
gcc_default_cpu=$arm_v7_flotattgt
|
||||
fi
|
||||
|
||||
if test "$gcc_default_float_abi" = ""; then
|
||||
if test "$target_cpu" = "armhf"; then
|
||||
gcc_default_float_abi="hard"
|
||||
if test "$gcc_default_fpu" = ""; then
|
||||
gcc_default_fpu="vfpv3-d16"
|
||||
gcc_default_fpu="vfpv3"
|
||||
fi
|
||||
else
|
||||
gcc_default_float_abi="softfp"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$gcc_default_cpu" = ""; then
|
||||
if test "$gcc_default_float_abi" = "hard"; then
|
||||
gcc_default_cpu=$default_arm_hardtgt
|
||||
else
|
||||
gcc_default_cpu=$default_arm_softtgt
|
||||
fi
|
||||
fi
|
||||
|
||||
aros_target_nostartup_objects="$""(AROS_LIB)/arm-exidx-unwind.o"
|
||||
|
||||
AC_MSG_CHECKING([which minimum CPU to use])
|
||||
|
||||
Reference in New Issue
Block a user