임베디드리눅스에서 cvm(cdc)포팅중 에러입니다.
글쓴이: pjs0919 / 작성시간: 일, 2006/05/21 - 12:04오후
안녕하세요.
다름이 아니라 pxa255보드에 vm을 올리기위해서 툴체인을 만들었습니다.
그후 cdc를 다운로드 받고 아래와 같이 컴파일했지만 어셈블러처리 부분에서 잘못된 명령어로 에러가 나네요..
기존 x86 gcc로는 이상없이 컴파일되어 바이트코드가 실행됩니다.
제가 포팅을 이번에 처음해보는 거라서, 문제가 발생하면 해결해야 하는 순서도 정확히 모르고, 삽질만 하고 있습니다.
혹시 아시는분 알려주시면 감사하겠습니다.
$ cd foundation/build/linux-x86-suse $ vi GNUmakefile ----------------------------------------------------- ASM_ARCH_FLAGS = #CC_ARCH_FLAGS = -march=i686 # Fix gcc fp bug on x86 and avoid cvm problems #CC_ARCH_FLAGS_FDLIB = -ffloat-store # Don't inline the interpreter loop helper functions. This helps # reduce register pressure on x86 and improve generated code. CC_ARCH_FLAGS_LOOP = -fno-inline LINK_ARCH_FLAGS = LINK_ARCH_LIBS = -lm -lfloat ... ------------------------------------------------------- $ arm-linux-gcc -v Reading specs from /usr/local/cross3.4/lib/gcc/arm-linux/3.4.2/specs Configured with: ../configure --target=arm-linux --prefix=/usr/local/cross3.4 --program-prefix=arm-linux- --with-headers=/usr/local/src/linux-2.6.15.6/include --with-cpu=xscale --with-softfloat-support=internal --enable-languages=c,c++ --nfp Thread model: posix gcc version 3.4.2 $ make CVM_DEBUG=true CVM_TARGET_TOOLS_DIR=/usr/local/cross3.4/bin \ CVM_TARGET_TOOLS_PREFIX=arm-linux- CVM_TARGET=arm-linux J2ME_CLASSLIB=foundation ... mkdir ../../build/arm-linux/generated/javavm/runtime ... mkdir ../../build/arm-linux/generated/classes touch ../../build/arm-linux/generated/empty.mk CVM_HOST = i686-unknown-linux CVM_TARGET = arm-linux SHELL = sh -e CC = /usr/local/cross3.4/bin/arm-linux-gcc CCC = /usr/local/cross3.4/bin/arm-linux-gcc AS = /usr/local/cross3.4/bin/arm-linux-gcc LD = /usr/local/cross3.4/bin/arm-linux-gcc HOST_CC = /usr/bin/cc HOST_CCC = /usr/bin/cc JAVAC = /usr/local/java/bin/javac AR_CREATE = /usr/local/cross3.4/bin/arm-linux-ar AR_UPDATE = /usr/local/cross3.4/bin/arm-linux-ranlib LINKFLAGS = -g -Wl,-export-dynamic LINKLIBS = -lpthread -ldl -lm -lfloat ASM_FLAGS = -c -fno-common CCCFLAGS = -fno-rtti CCFLAGS_SPEED = -c -fno-common -Wall -g CCFLAGS_SPACE = -c -fno-common -Wall -g CCFLAGS_LOOP = -c -fno-common -Wall -g -fno-inline CCFLAGS_FDLIB = -c -fno-common -Wall -g CVM_DEFINES = -DCVM_DEBUG -DCVM_DEBUG_CLASSINFO -DCVM_DEBUG_STACKTRACES -DCVM_DEBUG_DUMPSTACK -DCVM_DEBUG_ASSERTS -DCVM_CLASSLOADING -DCVM_SERIALIZATION -DCVM_REFLECT -DCVM_DYNAMIC_LINKING -DCVM_TRACE -DJ2ME_CLASSLIB=foundation -DTARGET_CPU_FAMILY=x86 -DCVM_TRACE_ENABLED -D_GNU_SOURCE ... mkdir ../../build/arm-linux/generated/flags Flag CVM_CCM_COLLECT_STATS changed. Cleaning up. Flag CVM_CLASSLIB_JCOV changed. Cleaning up. Flag CVM_CLASSLOADING changed. Cleaning up. Flag CVM_CSTACKANALYSIS changed. Cleaning up. Flag CVM_DEBUG changed. Cleaning up. Flag CVM_DEBUG_ASSERTS changed. Cleaning up. Flag CVM_DEBUG_CLASSINFO changed. Cleaning up. Flag CVM_DEBUG_DUMPSTACK changed. Cleaning up. Flag CVM_DEBUG_STACKTRACES changed. Cleaning up. Flag CVM_DUAL_STACK changed. Cleaning up. Flag CVM_DYNAMIC_LINKING changed. Cleaning up. Flag CVM_GCCHOICE changed. Cleaning up. Flag CVM_GPROF changed. Cleaning up. Flag CVM_HOST changed. Cleaning up. Flag CVM_INSTRUCTION_COUNTING changed. Cleaning up. Flag CVM_INTERPRETER_LOOP changed. Cleaning up. Flag CVM_JAVAC_DEBUG changed. Cleaning up. Flag CVM_JIT changed. Cleaning up. Flag CVM_JIT_COLLECT_STATS changed. Cleaning up. Flag CVM_JIT_DEBUG changed. Cleaning up. Flag CVM_JIT_ESTIMATE_COMPILATION_SPEED changed. Cleaning up. Flag CVM_JIT_PROFILE changed. Cleaning up. Flag CVM_JIT_USE_FP_HARDWARE changed. Cleaning up. Flag CVM_JVMDI changed. Cleaning up. Flag CVM_JVMPI changed. Cleaning up. Flag CVM_JVMPI_TRACE_INSTRUCTION changed. Cleaning up. Flag CVM_LVM changed. Cleaning up. Flag CVM_NO_CODE_COMPACTION changed. Cleaning up. Flag CVM_NO_LOSSY_OPCODES changed. Cleaning up. Flag CVM_OPTIMIZED changed. Cleaning up. Flag CVM_PRELOAD_LIB changed. Cleaning up. Flag CVM_PRELOAD_TEST changed. Cleaning up. Flag CVM_PRODUCT changed. Cleaning up. Flag CVM_REFLECT changed. Cleaning up. Flag CVM_SERIALIZATION changed. Cleaning up. Flag CVM_STATICLINK_LIBS changed. Cleaning up. Flag CVM_SYMBOLS changed. Cleaning up. Flag CVM_TEST_GC changed. Cleaning up. Flag CVM_TEST_GENERATION_GC changed. Cleaning up. Flag CVM_TIMESTAMPING changed. Cleaning up. Flag CVM_TRACE changed. Cleaning up. Flag CVM_TRACE_JIT changed. Cleaning up. Flag CVM_USE_CVM_MEMALIGN changed. Cleaning up. Flag CVM_USE_NATIVE_TOOLS changed. Cleaning up. Flag CVM_VERIFY_HEAP changed. Cleaning up. Flag CVM_XRUN changed. Cleaning up. Flag J2ME_CLASSLIB changed. Cleaning up. Flag OPT_PKGS changed. Cleaning up. ... generating ../../build/arm-linux/generated/javavm/include/build_defs.h /*** Definitions generated at build time ***/ #ifndef _BUILD_DEFS_H #define _BUILD_DEFS_H #define CVM_BUILD_OPTIONS \ "CVM_CCM_COLLECT_STATS=false\n" \ "CVM_CLASSLIB_JCOV=false\n" \ "CVM_CLASSLOADING=true\n" \ "CVM_CSTACKANALYSIS=false\n" \ "CVM_DEBUG=true\n" \ "CVM_DEBUG_ASSERTS=true\n" \ "CVM_DEBUG_CLASSINFO=true\n" \ "CVM_DEBUG_DUMPSTACK=true\n" \ "CVM_DEBUG_STACKTRACES=true\n" \ "CVM_DUAL_STACK=false\n" \ "CVM_DYNAMIC_LINKING=true\n" \ "CVM_GCCHOICE=generational\n" \ "CVM_GPROF=false\n" \ "CVM_HOST=i686-unknown-linux\n" \ "CVM_INSTRUCTION_COUNTING=false\n" \ "CVM_INTERPRETER_LOOP=Standard\n" \ "CVM_JAVAC_DEBUG=true\n" \ "CVM_JIT=false\n" \ "CVM_JIT_COLLECT_STATS=false\n" \ "CVM_JIT_DEBUG=false\n" \ "CVM_JIT_ESTIMATE_COMPILATION_SPEED=false\n" \ "CVM_JIT_PROFILE=false\n" \ "CVM_JIT_USE_FP_HARDWARE=false\n" \ "CVM_JVMDI=false\n" \ "CVM_JVMPI=false\n" \ "CVM_JVMPI_TRACE_INSTRUCTION=false\n" \ "CVM_LVM=false\n" \ "CVM_NO_CODE_COMPACTION=false\n" \ "CVM_NO_LOSSY_OPCODES=false\n" \ "CVM_OPTIMIZED=false\n" \ "CVM_PRELOAD_LIB=false\n" \ "CVM_PRELOAD_TEST=false\n" \ "CVM_PRODUCT=premium\n" \ "CVM_REFLECT=true\n" \ "CVM_SERIALIZATION=true\n" \ "CVM_STATICLINK_LIBS=false\n" \ "CVM_SYMBOLS=true\n" \ "CVM_TEST_GC=false\n" \ "CVM_TEST_GENERATION_GC=false\n" \ "CVM_TIMESTAMPING=false\n" \ "CVM_TRACE=true\n" \ "CVM_TRACE_JIT=false\n" \ "CVM_USE_CVM_MEMALIGN=false\n" \ "CVM_USE_NATIVE_TOOLS=false\n" \ "CVM_VERIFY_HEAP=false\n" \ "CVM_XRUN=false\n" \ "J2ME_CLASSLIB=foundation\n" \ "OPT_PKGS=\n" \ #define CVM_PROP_JAVA_VERSION "1.0.2-b08" #define CVM_PROP_JAVA_VENDOR "Sun Microsystems Inc." #define CVM_PROP_JAVA_VENDOR_URL "http://java.sun.com/" #define CVM_PROP_JAVA_VENDOR_URL_BUG "http://java.sun.com/cgi-bin/bugreport.cgi" #define CVM_PROP_JAVA_SPEC_NAME "J2ME(TM) Foundation Profile Specification" #define CVM_PROP_JAVA_SPEC_VERSION "1.0b" #define CVM_PROP_JAVA_SPEC_VENDOR "Sun Microsystems Inc." #define CVM_PROP_JAVA_CLASS_VERSION "47.0" #define CVM_PROP_JAVA_VM_NAME "Java ME CDC VM" #define CVM_PROP_JAVA_VM_VERSION "1.0.2-b08" #define CVM_PROP_SUN_MISC_PRODUCT "Java ME CDC/FP" #define CVM_PROP_JAVA_VM_INFO "interpreter loop" #define CVM_PROP_JAVA_VM_VENDOR "Sun Microsystems Inc." #define CVM_PROP_JAVA_VM_SPEC_NAME "Java Virtual Machine Specification" #define CVM_PROP_JAVA_VM_SPEC_VERSION "1.0" #define CVM_PROP_JAVA_VM_SPEC_VENDOR "Sun Microsystems Inc." #define CVM_CLASSLIB_JAR_NAME "foundation.jar" #endif /* _BUILD_DEFS_H */ ... mkdir ../../build/arm-linux/obj ... mkdir ../../build/arm-linux/bin ... mkdir ../../build/arm-linux/generated/javavm/runtime/opcodeconsts ... mkdir ../../build/arm-linux/generated/classes/sun/misc ... mkdir ../../build/arm-linux/generated/jni ... mkdir ../../build/arm-linux/generated/cni ... mkdir ../../build/arm-linux/generated/offsets ... mkdir ../../build/arm-linux/btclasses ... mkdir ../../build/arm-linux/testclasses ... mkdir ../../build/arm-linux/lib ... mkdir ../../build/arm-linux/lib/security ... mkdir ../../build/arm-linux/foundation_classes ... mkdir ../../build/arm-linux/classes.jcc Checking for build-time classes to compile ... ... generating sun.misc.DefaultLocaleList.java ... ../../build/arm-linux/generated/classes/sun/misc/DefaultLocaleList.java Compiling build-time classes... ... btclasses.zip Checking for Java ME CDC/FP classes to compile ... Compiling Java ME CDC/FP classes... ... ../../build/arm-linux/lib/foundation.jar Checking for test classes to compile ... Compiling test classes... ... testclasses.zip ... generating jni class headers ... ../../build/arm-linux/classes.jcc/GenOpcodes.class ... ../../src/share/javavm/include/opcodes.list ... ../../build/arm-linux/classes.jcc/JavaCodeCompact.class jcc romjava.c files 742 Total Classes ... of which 139 classes have static initializers (6393/10414 quickening sites) 6754 method blocks ... of which 6754 blocks are writable ... for 696 classes ... of which 1964 have checkinit opcodes in the code 330682 bytes of Java code 1248 catch frames 2999 field blocks 581 inner class attribute entries 7582 constant pool entries 3158 Java strings ... ../../build/arm-linux/generated/javavm/runtime/system_properties.c cc ../../build/arm-linux/obj/gen_semispace.o cc ../../build/arm-linux/obj/gen_markcompact.o cc ../../build/arm-linux/obj/gc_common.o cc ../../build/arm-linux/obj/gc_impl.o cc ../../build/arm-linux/obj/gc_stat.o cc ../../build/arm-linux/obj/indirectmem.o cc ../../build/arm-linux/obj/interpreter.o cc ../../build/arm-linux/obj/named_sys_monitor.o cc ../../build/arm-linux/obj/objsync.o cc ../../build/arm-linux/obj/stackmaps.o cc ../../build/arm-linux/obj/sync.o cc ../../build/arm-linux/obj/float_arch.o /tmp/ccfW8tQX.s: Assembler messages: /tmp/ccfW8tQX.s:27: Error: bad instruction `pushl $575' /tmp/ccfW8tQX.s:29: Error: bad instruction `fldcw (%esp)' /tmp/ccfW8tQX.s:31: Error: bad instruction `popl %eax' make: *** [../../build/arm-linux/obj/float_arch.o] 오류 1
Forums:
zzz
\(´∇`)ノ.大韓兒 朴鐘緖人
찾아냈습니다. ..
float_arch.c파일을 보니 인라인 어셈으로 작성되어 있더군요.
\(´∇`)ノ.大韓兒 朴鐘緖人
댓글 달기