[AD] removing asm in 4.3.10 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I was examining today what would be the best way to remove ASM from
allegro once and for all. What I wanted to highlight was:
- Given that we are dealing with 4.3.10+ branch which started as a copy
of a stable branch, we should keep the range of changes to minimum, not
to ruin its stability.
- We want the 4.4 out soon, so let's make the WIP-fixing process less
painfull possible, by reducing the changes of the proven-to-work code to
minumum.
- Wiping out any trace of ASM code from allegro cannot be done without
refactoring some parts of the build system and the code. Just think of
asmdef.c hacks and what not.
So would it be okay, IMO, to just define ALLEGRO_USE_C in the toplevel
makefile and let the build system handle it. This patch does just that.
Hides the ALLEGRO_USE_C option from the user and makes it default.
We can also remove some files from src/i386/, but not all.
This will break the watcom build as it doesn't support ALLEGRO_USE_C, if
anyone cares. Also, I assume that non-ASM version is generally less
tested becasue it wasn't a default choice, so this change might have
impact on allegro stability on some platforms.
So far, barely any changes were made to the existing build system, and
none to the code. Let's keep it that way.
--
Milan Mimica
http://sparklet.sf.net
Index: makefile.all
===================================================================
--- makefile.all (revision 9738)
+++ makefile.all (working copy)
@@ -49,6 +49,7 @@
# -------- check environment to see what type of library to build --------
+ALLEGRO_USE_C = 1
include makefile.inf
Index: configure.in
===================================================================
--- configure.in (revision 9738)
+++ configure.in (working copy)
@@ -19,12 +19,6 @@
dnl Build CFLAGS from scratch
CFLAGS=
-dnl Enable asm code in the library (default)
-AC_ARG_ENABLE(asm,
-[ --enable-asm[=x] enable the use of asm code [default=yes]],
-test "X$enableval" != "Xno" && allegro_enable_asm=yes,
-allegro_enable_asm=yes)
-
dnl Enable 8-bpp color depth (default).
AC_ARG_ENABLE(color8,
[ --enable-color8[=x] enable support for 8-bpp modes [default=yes]],
@@ -173,6 +167,9 @@
ALLEGRO_ACTEST_GCC_AMD64_MTUNE
fi
+dnl ASM code disabled since 4.3.10
+allegro_enable_asm="no"
+
dnl Test for asm support.
if test "X$allegro_enable_asm" = "Xyes"; then
if test "X$allegro_cv_processor_type" = "Xi386"; then
Index: makefile.inf
===================================================================
--- makefile.inf (revision 9738)
+++ makefile.inf (working copy)
@@ -59,7 +59,7 @@
endif
ifdef ALLEGRO_USE_C
- NO_ASM_SUFFIX = _c
+ NO_ASM_SUFFIX =
else
NO_ASM_SUFFIX =
endif