Skip to content

SPARC build failed #99

Open
Open
@syoyo

Description

@syoyo

SPARC build of iv/lv5 fails with libgc related issue.

http://qiita.com/syoyo/items/0068f514f606a6b1a91e

It looks like some file(s) are missing in CMakeList.txt when targeting SPARC architecture.

At least, with the following patch, I could get success to build libgc.

$ make
…

Building C object iv/lv5/third_party/gc/CMakeFiles/gcmt-lib.dir/thread_local_alloc.c.o
Building ASM object iv/lv5/third_party/gc/CMakeFiles/gcmt-lib.dir/src/sparc_mach_dep.S.o
Linking CXX executable gctest
Linking CXX shared library libgcmt-dll.so
Linking CXX static library libgcmt-lib.a
[100%] Built target gctest
[100%] Built target gcmt-dll
[100%] Built target gcmt-lib

$ cd test
$ ./gctest 
Completed 1 tests
Allocated 748193 collectable objects
Allocated 202 uncollectable objects
Allocated 1250000 atomic objects
Allocated 21760 stubborn objects
Finalized 2206/2206 objects - finalization is probably ok
Total number of bytes allocated is 103987300
Final heap size is 10211328 bytes
Completed 78 collections
Collector appears to work
diff --git a/iv/lv5/third_party/gc/CMakeLists.txt b/iv/lv5/third_party/gc/CMakeLists.txt
index e538f23..4cf1b9c 100644
--- a/iv/lv5/third_party/gc/CMakeLists.txt
+++ b/iv/lv5/third_party/gc/CMakeLists.txt
@@ -22,6 +22,7 @@
 #

 SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
+enable_language(ASM)

 PROJECT(gc)

@@ -62,7 +63,7 @@ SET(SRC alloc.c reclaim.c allchblk.c misc.c mach_dep.c os_dep.c
         mark_rts.c headers.c mark.c obj_map.c blacklst.c finalize.c
         new_hblk.c dbg_mlc.c malloc.c stubborn.c dyn_load.c
         typd_mlc.c ptr_chck.c gc_cpp.cc mallocx.c checksums.c
-        thread_local_alloc.c)
+        thread_local_alloc.c src/sparc_mach_dep.S)
 SET(LIBS)
 OPTION(enable_threads "TODO" NO)
 IF(enable_threads)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions