Browse Source

Remove asm auto-detection due to cross-compilation issues.

Mike Pall 15 years ago
parent
commit
6163a90d6d
3 changed files with 5 additions and 12 deletions
  1. 4 1
      src/Makefile
  2. 0 10
      src/buildvm.c
  3. 1 1
      src/buildvm.h

+ 4 - 1
src/Makefile

@@ -231,7 +231,7 @@ HOST_T= $(BUILDVM_T)
 LJVM_S= lj_vm.s
 LJVM_O= lj_vm.o
 LJVM_BOUT= $(LJVM_S)
-LJVM_MODE= asm
+LJVM_MODE= elfasm
 
 LJLIB_O= lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o \
 	 lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o
@@ -293,6 +293,9 @@ ifeq (Windows,$(TARGET_SYS))
     TARGET_XCFLAGS+= -DLUA_BUILD_AS_DLL
   endif
 endif
+ifeq (Darwin,$(TARGET_SYS))
+  LJVM_MODE= machasm
+endif
 
 ifeq (static,$(BUILDMODE))
   TARGET_DYNCC= @:

+ 0 - 10
src/buildvm.c

@@ -398,16 +398,6 @@ int main(int argc, char **argv)
   }
 
   switch (ctx->mode) {
-  case BUILD_asm:
-#if defined(__ELF__)
-    ctx->mode = BUILD_elfasm;
-#elif defined(__MACH__)
-    ctx->mode = BUILD_machasm;
-#else
-    fprintf(stderr,"Error: auto-guessing the system assembler failed\n");
-    return 1;
-#endif
-    /* fallthrough */
   case BUILD_elfasm:
   case BUILD_coffasm:
   case BUILD_machasm:

+ 1 - 1
src/buildvm.h

@@ -49,7 +49,7 @@ struct dasm_State;
 #endif
 
 #define BUILDDEF(_) \
-  _(asm) _(elfasm) _(coffasm) _(machasm) BUILDDEFX(_) _(raw) \
+  _(elfasm) _(coffasm) _(machasm) BUILDDEFX(_) _(raw) \
   _(ffdef) _(libdef) _(recdef) _(vmdef) \
   _(folddef)