#54 Build Issues on Mac OS X (GccUnix.mak)

None
open
japheth
None
5
2013-10-13
2013-10-12
Ma Xiaojun
No

By installing Xcode and its Command Line Tools, OS X has GCC and clang.
But its ld(1) is a BSD one.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ld.1.html

Therefore, "-s" option won't work. A more portable way seems to be "strip" afterwards.
"-Wl,-Map ..." won't work; "-Wl,-map ..." will. I don't know how to do this in portable way, so remove it altogether.

There comes the attached Makefile. I also added "-f"s to the "rm"s in the "clean" target.

1 Attachments

Discussion

  • japheth
    japheth
    2013-10-13

    Ticket moved from /p/jwasm/bugs/290/

     
  • japheth
    japheth
    2013-10-13

    • Group: v210 -->
     
  • japheth
    japheth
    2013-10-13

    Thanks for the makefile!

    However, since I don't have an OS X system for tests, there's no jwasm support for this OS.